diff --git a/docs/build/manual.sgml b/docs/build/manual.sgml index 65dacd5706..b40f5e454d 100644 --- a/docs/build/manual.sgml +++ b/docs/build/manual.sgml @@ -11,6 +11,10 @@ Tony Roman + + Larry + Adams + 2005 @@ -209,31 +213,85 @@ $database_password = "cacti"; Installing Under Windows - Install PHP + Software Compoents Required - Extract the PHP zip file to c:\ and rename the install directory (ie. 'php5.0.1') to 'php'. + (Optional) Apache - This software is optional if running Windows Internet Information Server. - If using PHP 4, move the files in c:\php\dlls to c:\php. + Cacti - Install from the zip distribution and intstall in the web root or your choice. + Many choose to install into a "Cacti" sub folder. - Add the following to your Windows PATH environement variable c:\php. The Windows path can be accessed via - the Control Panel at: 'System', 'Advanced', 'Environment'. + Cactid - Install from the zip distribution into the c:\cacti + directory. Make sure your cactid.conf.dist is located in that directory as well. - Add the following two environment variables to your system using the procedure above: MIBDIRS=c:\php\mibs, and PHPRC=c:\php. + RRDTool - Install from the Cacti website. Install it into the c:\cacti directory. - If using PHP 4.3.5 or less (not recommended), create the following directory c:\tmp. + PHP 4.3.6+ or 5.x - Install into the c:\php folder. If you choose + to install into c:\Program Files\php, you will have to use 8.3 filenames + to reference it's binaries in Cacti. + + + + + MySQL 4.x or MySQL 5.x - Install into the default location. This is typically + c:\Program Files\MySQL\MySQL Server X.XX. + + + + + (Optional) Cygwin - Download and execute setup.exe from the Cygwin + website. Keep the setup.exe file for later use. + + + + + (Optional) Net-SNMP - Install to the c:\net-snmp directory. If you + choose to use c:\Program Files\net-snmp you will have tu use 8.3 filenames + to reference it's binaries in Cacti. + + + + + Configure PHP + + + If using PHP 4, move the files in c:\php\dlls to c:\php + + + + + Add the following directory to the existing Windows System PATH environment variable: + c:\php. The Windows path can be accessed via the Control Panel at: System | + Advanced | Environment Variables | System Variables. + + + + + Add the following directory to a new Windows System environment variable called PHPRC: + c:\php. + + + + + Add a new Windows System environment variable called MIBDIRS. If using + PHP 4, set it to c:\php\mibs. If using PHP 5, set it to c:\php\extras\mibs + + + + + If using PHP 4.3.5 or less, create the following directory c:\tmp. @@ -242,18 +300,24 @@ $database_password = "cacti"; following changes to it: - If using PHP 4 add the following lines. + If using PHP 4 add/uncomment the following lines. - extension_dir = c:\php\extensions -extension=php_snmp.dll -extension=php_sockets.dll + + extension_dir = c:\php\extensions + extension=php_snmp.dll + extension=php_sockets.dll + cgi.force_redirect = 0 + - If using PHP 5 add the following lines. + If using PHP 5 uncomment the following lines. - extension_dir = c:\php\ext -extension=php_mysql.dll -extension=php_snmp.dll -extension=php_sockets.dll + + extension_dir = c:\php\ext + extension=php_mysql.dll + extension=php_snmp.dll + extension=php_sockets.dll + cgi.force_redirect = 0 + If using PHP 4.3.5 or less include the following line. If using 4.3.6 or greater, you should remove this line if present. @@ -261,9 +325,21 @@ $database_password = "cacti"; - If you have had previous versions of PHP installed, you had likely moved the PHP system files to - in the Windows directory structure. If so, you will have to remove those files. Please review your PHP - installation documentation for instructions on removing those files. + In earlier installation guides to PHP, they recommended moving certain DLL's to the + c:\winnt\system32 directory. If so, you will have to remove those files. Please + review the PHP installation documentation for instructions on removing those files. + + + + + If you want to allow template importing, uncomment the following line: + file_uploads = On + + + + + Give the user who will be running the scheduled task, modify rights to the .index + file in the location pointed to by the MIBDIRS Windows System environment variable. @@ -271,59 +347,57 @@ $database_password = "cacti"; Configure the Webserver (Apache) - Make sure you have stopped any IIS web servers before you proceed with Apache installation. - - - - - Install the Apache web server. This is as simple as double clicking the .msi file and - following the prompts. Make sure to install it as a service and for the sake of the - HOWTO, install it to c:\apache or c:\apache2. + Make sure you have stopped any IIS web servers before you proceed with Apache installation, or make + sure Apache is configured on an alternate port. If you are using Apache 1.3.x, installation of PHP 5 is not recommended. - If using PHP 4, add the following lines to your httpd.conf file in the - c:\apache\conf directory: - - LoadModule php4_module c:\php\sapi\php4apache.dll -AddModule mod_php4.c -AddType application/x-httpd-php .php -DirectoryIndex index.html index.htm index.php - - - - If you are using Apache 2.x, add the following lines to your httpd.conf - file in the c:\apache2\conf directory: + If using PHP 4, add the following lines to your httpd.conf file. You can edit + that file by selecting Start | All Programs | Apache HTTP Server X.XX | Configure Server | Edit the + httpd.conf file pick from the Taskbar. - If using PHP 4, then add the following lines. + If using Apache 1.3.x and PHP 4, then add the following lines: - LoadModule php4_module c:\php\sapi\php4apache2.dll -AddType application/x-httpd-php .php -DirectoryIndex index.html index.htm index.php + + LoadModule php4_module c:\php\sapi\php4apache.dll + AddModule mod_php4.c + AddType application/x-httpd-php .php + DirectoryIndex index.html index.htm index.php + - If using PHP 5, then add the following lines. + If using Apache 2.x and PHP 4, then add the following lines: - LoadModule php5_module c:\php\php5apache2.dll -AddType application/x-httpd-php .php -DirectoryIndex index.html index.htm index.php + + LoadModule php4_module c:\php\sapi\php4apache2.dll + AddType application/x-httpd-php .php + DirectoryIndex index.html index.htm index.php + + + If using Apache 2.x and PHP 5, then add the following lines. + + + LoadModule php5_module c:\php\php5apache2.dll + AddType application/x-httpd-php .php + DirectoryIndex index.html index.htm index.php + Configure the Webserver (IIS) - Start the Microsoft Management Console, right click on Default Web Site (in most cases) - and select Properties. + Start the Internet Information Services (IIS) Manager, right click on the Default Web Site (in most cases) and select Properties. Under the Home Directory tab, select Configuration and click Add. Browse to the path of php4isapi.dll or - php5isapi.dll, and type in .php as the extension. + php5isapi.dll, and type in .php as the extension. Note: if using IIS6, + Enable All Verbs and Script Engine. @@ -340,14 +414,73 @@ $database_password = "cacti"; - Completely stop and start the IIS service using the following commands: + If using IIS6, goto Web Service Extensions and add a new Web Service Extension. + Name the extension "php", and click Add and browse to the php4isapi.dll + or php5isapi.dll file, enable Set Extension status to Enable, and click OK. - net stop iisadmin -net start w3svc - Give the IUSR_XXXX user read and execute permissions to the file c:\winnt\system32\cmd.exe. + Give the IUSR_XXXX and IIS_WPG users read & execute permissions to the file %windir%\system32\cmd.exe. + They will also need read permissions on cacti_web_root/cacti and it's subfolders. + + + + + If using IIS6, give the IIS_WPG user modify permissions to the folders cacti_web_root/cacti/log + and cacti_web_root/cacti/rrd. + + + + + Completely stop and start the IIS service using the following commands: + + + net stop iisadmin + net start w3svc + + + + + Install Cygwin (optional) + + + Installing a single instance of Cygwin, and using it for all applications that require it is + recommended so you do not have different versions of the Cygwin dlls laying around on your system, + which can cause conflicts. + + + + + Run setup.exe you previously download. + + + + + Once you reach the portion of setup entitled Select Packages, install the following: + + + Base (include all items) + Libs + libart_lgpl + libfreetype26 + libpng12 + zlib + openssl + Utils + patch + Web + wget + + + + + Add c:\wingwin\bin to your Windows System PATH environment variable. + + + + + Move setup.exe to c:\cygwin for future use. @@ -355,7 +488,7 @@ $database_password = "cacti"; Install RRDTool - Extract the RRDTool zip file to c:\rrdtool and copy c:\rrdtool\src\tool_release\rrdtool.exe to c:\rrdtool. + Extract the RRDTool zip file from the Cacti web site to c:\cacti\rrdtool.exe. @@ -368,52 +501,78 @@ $database_password = "cacti"; - Install MySQL to the c:\mysql directory. + Install MySQL to the default directory, or for the purposes of this manual to the c:\mysql directory. - Start MySQL by running c:\mysql\bin\winmysqladmin.exe. + If running an older version of MySQL, start it by running c:\mysql\bin\winmysqladmin.exe. + In more recent versions, this is not required. Set a password for the root user - shell> cd mysql\bin -shell> mysqladmin --user=root password somepassword -shell> mysqladmin --user=root --password reload + + shell> cd mysql\bin + shell> mysqladmin --user=root password somepassword + shell> mysqladmin --user=root --password reload + Create the MySQL database: - shell> mysqladmin --user=root --password create cacti + + shell> mysqladmin --user=root --password create cacti + Import the default Cacti database: - shell> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql + + shell> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql + - Optional: Create a MySQL username and password for Cacti. + Create a MySQL username and password for Cacti. - shell> mysql --user=root --password mysql -mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; -mysql> flush privileges; + + shell> mysql --user=root --password mysql + mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; + mysql> flush privileges; + + + + + If you are running MySQl 4.1 and above, you will need to apply the old password setting in order + to authenticate with Cacti. To make this change, stop the MySQL service and add the following to + the Start Parameter field. Start it again once it has been added. + + + --old-password + + + You will also need to update the cactiuser account with the old password style. + + + shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipwd') WHERE Host = 'localhost' AND User = 'cactiuser'; + mysql> FLUSH PRIVILEGES; + Install Net-SNMP - If you plan to use any hosts with SNMP v2c support, you must download and install the - Net-SNMP libraries. Net-SNMP provides installers - to install their product. However, caution must be taken not to use long file names as Cacti does not - support them in this version. We suggest you install Net-SNMP in a directory - such as c:\net-snmp. + If you plan to use any hosts with SNMP v2c support, and are using early versions of PHP, you must + download and install the Net-SNMP libraries. Net-SNMP + provides installers to install their product. However, caution must be taken if you choose to use + long file names as Cacti does not them as long file names. You will have to user 8.3 notation. For + example c:\Program Files\Net-SNMP\bin becomes c:\progra~1\net-snmp\bin. @@ -421,50 +580,135 @@ $database_password = "cacti"; Install Cactid - Extract the Cactid zip file to c:\cactid and modify the cactid.conf file to + Extract the Cactid zip file to c:\cacti and modify the cactid.conf.dist file to include the following statements. - DB_Host IP_Address or Hostname (not localhost) -DB_Database cacti -DB_User cactiuser -DB_Password cacti + + DB_Host 127.0.0.1 or hostname (not localhost) + DB_Database cacti + DB_User cactiuser + DB_Password cacti + DB_Port 3306 + - All other pre 0.8.6 settings are obsolete. Cactid may not complain if you leave them in, but they - are not longer required. Cactid now comes with a binary distribution. Therefore, a full installation - of Cygwin is not longer required. + All other pre 0.8.6 settings are obsolete. - If you either have Cygwin installed, or plan on installing it, remove the 3 - DLL files and the SH.EXE file from the c:\cactid directory. + Cactid now comes with a binary distribution. However, we strongly suggest that you install + Cygwin and then remove all the DLL files and sh.exe from the + c:\cacti directory. - Install Cacti + Configure Cacti - Extract the Cacti distribution archive. These instructions will assume that the archive has been - extracted to C:\Apache\htdocs\cacti, although you can use a different - path if you wish. Make sure you extract with "Use folder names" enabled, so that the - necessary sub-folders will be used. + Edit cacti_web_root/cacti/include/config.php and specify the MySQL user, + password, database, and database port for your Cacti configuration. + + + $database_default = "cacti"; + $database_hostname = "localhost"; + $database_username = "cactiuser"; + $database_password = "cacti"; + $database_port = "3306"; + + + + + Pint your web browser to: + + + http://your-server/cacti/ + + + Log in using the username and password of admin/admin. You will be required to change this + password immediately. - Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration. + From Cacti, go to Settings->Paths and verify/udate + your paths to point to the correct locations. Recommended examples are posted below. If you + plan on using Cactid, then it is very important that all paths include forward slashes instead + of backslashes. - $database_default = "cacti"; -$database_hostname = "localhost"; -$database_username = "cactiuser"; -$database_password = "cacti"; + + PHP Binary Path: + + c:/php/php.exe + + RRDTool Binary Path: + + c:/cacti/rrdtool.exe + + SNMPGET, SNMPWALK, SNMPBULKWALK Paths: + + c:/progra~1/net-snmp/bin/snmpget.exe + c:/progra~1/net-snmp/bin/snmpget.exe + c:/progra~1/net-snmp/bin/snmpbulkwalk.exe + + Cacti Logfile Path: + + c:/mycacti/website/cacti/log/cacti.log + + Cactid Path: + + c:/cacti/cactid.exe - You are going to need to schedule a task so poller.php can run every - 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to - begin. + Click on Devices. Delete the Localhost devices as it intended for Linux environments In the upper + right corner, click Add. Fill in the following information and then click Add. + + + Description: My Windows localhost + Hostname: localhost + Host Template: Windows 2000/XP + + + + + You should now be looking at the localhost device screen. Right under it's name, there should be + some SNMP information listed, if not you should double check the SNMP settings on the server and + firewall settings. In the upper right-hand corner, click on Create Graphs for this Host. On the + following screen, select a disk partition and network interface. At the bottom of the page, + click on Create. + + + + + Log into the user account you'll be using for the scheduled task and verify starting a Cacti + polling cycle works. Do this by running the following from the command prompt: + + + php c:/cacti_web_root/cacti/poller.php + + The output should look something like the following: + + + C:\>php c:\inetpub\wwwroot\cacti\poller.php + OK u:0.00 s:0.06 r:1.32 + OK u:0.00 s:0.06 r:1.32 + OK u:0.00 s:0.16 r:2.59 + OK u:0.00 s:0.17 r:2.62 + 10/28/2005 04:57:12 PM - SYSTEM STATS: Time:4.7272 Method:cmd.php Processes:1 + Threads:N/A Hosts:1 HostsPerProcess:2 DataSources:4 RRDsProcessed:2 + + + After this has ran once, you should have cacti.log in /cacti/log/ + and rrd files in /cacti/rra/. + + + + + You are going to need to schedule a task while logged on as an Administrator. This task is + required to you can run poller.php every 5 minutes. Make sure the + Task Scheduler service is started and follow the steps below to begin. Note: The following instructions are based on Windows XP and Windows Server @@ -485,8 +729,7 @@ $database_password = "cacti"; Click Next and Browse on the following screen. Find c:\php and select - php.exe. If using PHP 5, use php-win.exe instead. Choose Daily - on and click Next. + php.exe. Choose Daily on and click Next. @@ -498,13 +741,17 @@ $database_password = "cacti"; When entering a username and password make sure the user has read and write access to the following directories: - c:\apache2\htdocs\cacti\rra -c:\apache2\htdocs\cacti\log + + cacti_web_root/cacti/rra + cacti_web_root/log + Make sure the user has read, write, and execute access to the following directories: - c:\php -c:\php\sapi + + c:\php + c:\php\sapi + @@ -547,51 +794,31 @@ c:\php\sapi + + + Apply Patches - Point your web browser to: + There are two methods of applying patches to Cacti: -
- - http://your-server/cacti/ - -
+ + + + If you have Cygwin installed, then the patch instructions which use wget and patch, will work. + + + + + The other method requires you to visit http://www.cacti.net/downloads/patches/0.8.6h/pre-patched/ + and manually download and replace the patched files. + + + +
+ - Log in the with a username of admin and password of admin. You - will be required to change this password immediately. + You might need to reapply file/folder security on the files patched. Double check they are correct. - - Once logged in, you must go to Settings->Paths and verify/update your - paths to point to the correct locations. Recommended examples are posted below. - - - PHP Binary Path: - - - If using PHP 4, you should change this to: - - c:\php\php.exe - - If using PHP 5, you should change this to: - - c:\php\php-win.exe - - RRDTool Binary Path: - - c:\rrdtool\rrdtool.exe - - SNMPGET, SNMPWALK Paths: - - c:\net-snmp\bin\snmpget.exe -c:\net-snmp\bin\snmpget.exe - - Cacti Logfile Path: - - c:\mycacti\website\cacti\log\cacti.log - - Cactid Path: - - c:\cactid\cactid.exe
@@ -3215,7 +3442,7 @@ disk / - RRDTool Says: ERROR: unknown option '--slope-mode' or RRDTool Says: ERROR: Garbage ':39:24 To 2005/10/22 16:39:24\c' after command: COMMENT:From 2005/10/21 16:39:24 To 2005/10/22 16:39:24\c + RRDTool Says: ERROR: unknown option '--slope-mode' or RRDTool Says: ERROR: Garbage ':39:24 To 2005/10/22 16:39:24\c' after command: COMMENT:From 2005/10/21 16:39:24 To 2005/10/22 16:39:24\c @@ -3566,4 +3793,4 @@ disk / - + \ No newline at end of file