Anyone help me with this basic fundemental problem getting Cacti 0.8.6b going. I've followed the install guide to the letter, but am getting the following error when trying to connect to the web site;
Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 323
I am running Cacti on Win2k server using;
Apache 2.0.52
Cacti 0.8.6b
Cactid 0.8.6b
Mysql 4.0.21
Net-snmp 5.1.2
Php 5.0.2
Rrdtool 1.0.48
TIA
tman
Basic config problem help!
Moderators: Developers, Moderators
-
- Posts: 13
- Joined: Thu Sep 16, 2004 12:32 pm
regarding cacti installation
Hi,
Here is a cacti installation document that I prepared based on the original installation procedure. Hope this helps.
Here is a cacti installation document that I prepared based on the original installation procedure. Hope this helps.
-
- Posts: 13
- Joined: Thu Sep 16, 2004 12:32 pm
The attachment did not come up. SOrry
Installing Under Windows
Install PHP
1. You can find the php downloads in the web page http://www.php.net/downloads.php. The version is php 4.3.9. Extract the PHP zip file to c:\ and rename the install directory (i.e., 'php5.0.1') to 'php'. This procedure makes use of the manual installation procedure. Please read the manual installation procedure in the PHP website (www.php.net) carefully before proceeding with the installation.
2. Note that while installing from a .msi or .exe file it is sufficient to specify the drive (eg. C in which installation should occur. There is no need to create directories. Also after each installation it is recommended that you restart the computer.
3. If using PHP 4, move the files in c:\php\dlls to c:\php. Also copy all the dll files in c:\php\sapi to c:\php. This helps a lot when the Apache web server is configured.
4. Add the following to your Windows PATH environment variable c:\php. The Windows path can be accessed via the Control Panel at: 'System', 'Advanced', 'Environment'.
5. Add the following two environment variables to your system using the procedure above: MIBS=ALL and MIBSDIR=c:\php\mibs. (Note that these are system variables and not user variables)
6. If using PHP 4.3.5 or less (not recommended), create the following directory c:\tmp.
7. Rename the file c:\php\php.ini.dist to php.ini, and make the following changes to it:
If using PHP 4 add the following lines.
extension_dir = c:\php\extensions
extension=php_snmp.dll
extension=php_sockets.dll
If using PHP 5 add the following lines.
extension_dir = c:\php\ext
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
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.
session.save_path=c:\tmp
8. 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.
Configure the Web-server (Apache)
1. Make sure you have stopped any IIS web servers before you proceed with Apache installation. The .msi file can be found in the website http://httpd.apache.org/download.cgi
2. 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.
3. 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: There are two files in the conf directory httpd and httpd.default. The file that we need to edit is the httpd file. Please ignore the other file.
4. LoadModule php4_module “c:/php/sapi/php4apache.dll”
5. AddModule mod_php4.c
6. AddType application/x-httpd-php .php
7. DirectoryIndex index.html index.htm index.php
8. 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, 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
If using 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
Please note that forward slashes are used and the directory path is specified within double quotes. Also be sure that the appropriate dlls are found in the path specified. If httpd.conf does not find the file, Apache web server does not start. If such an error is encountered try moving the php4apache2.dll to c:/php instead of c:/php/sapi. This helps a lot when Apache refuses to start up because the particular dll is not found. Trouble shooting can be done by running the apache test configuration in the start up menu. This usually pin points the source of error.
Install RRDTool
1. Extract the RRDTool zip file to c:\rrdtool and copy c:\rrdtool\src\tool_release\rrdtool.exe to c:\rrdtool.
The web-site for downloading rrdtool is http://www.fastmirrors.org/rrdtool/
Install MySQL
1. Extract the MySQL zip file to a temp directory and run setup.exe.
2. Install MySQL to the c:\mysql directory.
3. Start MySQL by running c:\mysql\bin\winmysqladmin.exe.
4. Set a password for the root user
5. shell> cd mysql\bin
6. shell> mysqladmin --user=root password somepassword
7. shell> mysqladmin --user=root --password reload
8. Create the MySQL database:
9. shell> mysqladmin --user=root --password create cacti
10. Import the default Cacti database:
11. shell> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
12. Optional: Create a MySQL username and password for Cacti.
13. shell> mysql --user=root --password mysql
14. mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
15. mysql> flush privileges;
It is easier if the MySQL control center is downloaded. This makes granting privileges to user much easier instead of using the command prompt. Both MySQL and MySQL control center downloads can be found at http://dev.mysql.com/downloads
Install Net-SNMP
1. 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. The .exe file download for windows can be found at the web-site http://sourceforge.net/project/showfile ... p_id=12694
Install Cactid
Cactid can be downloaded from the following web page http://www.cacti.net/cactid_download.php
1. Extract the Cactid zip file to c:\cactid and modify the cactid.conf file to include the following statements.
2. SNMP_Ver 1
3. DB_Host IP_Address or Hostname (not localhost)
4. DB_Database cacti
5. DB_User cactiuser
6. DB_Password cacti
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.
Make sure that the database user name and password are the same that you specified in the command prompt.
7. If you either have Cygwin installed, or plan on installing it, remove the 3 DLL files from the c:\cactid directory.
Install Cacti
1. 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. Cacti download can be found at http://www.cacti.net/download_cacti.php
2. Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
3. $database_default = "cacti";
4. $database_hostname = "localhost";
5. $database_username = "cactiuser";
6. $database_password = "cacti";
Make sure that the database user name and password are the same that you specified in the command prompt.
7. 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.
Note: The following instructions are based on Windows XP and Windows Server 2003. You should be able to follow these instructions close enough for Windows 2000 as well.
a. Select Start --> Settings --> Control Panel and double click on Scheduled Tasks.
b. Double click on Add Scheduled Task.
c. 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.
d. Click Next again without changing the time or date settings.
e. When entering a username and password make sure the user has read and write access to the following directories:
f. c:\apache2\htdocs\cacti\rra
g. c:\apache2\htdocs\cacti\log
Make sure the user has read, write, and execute access to the following directories:
c:\php
c:\php\sapi
h. Click Next and Finish to close the wizard.
i. Right click on the task you just created, and select Properties.
j. Select the Schedule tab.
k. Make sure Daily is selected and click the Advanced button.
l. Check the Repeat checkbox, set it for 5 minutes and set the duration for 24 hours.
m. Click Ok
n. In the Run textbox enter the following text making sure to use the appropriate paths.
o. c:\php\php.exe c:\apache2\htdocs\cacti\poller.php
The start in box should say c:\apache2\htdocs\cacti.
8. Point your web browser to:
http://your-server/cacti/
Log in the with a username of admin and password of admin. You will be required to change this password immediately.
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\snmpwalk.exe
Cacti Log file Path:
c:\apache2\htdocs\cacti\log\cacti.log
Cactid Path:
c:\cactid\cactid.exe
Installing Under Windows
Install PHP
1. You can find the php downloads in the web page http://www.php.net/downloads.php. The version is php 4.3.9. Extract the PHP zip file to c:\ and rename the install directory (i.e., 'php5.0.1') to 'php'. This procedure makes use of the manual installation procedure. Please read the manual installation procedure in the PHP website (www.php.net) carefully before proceeding with the installation.
2. Note that while installing from a .msi or .exe file it is sufficient to specify the drive (eg. C in which installation should occur. There is no need to create directories. Also after each installation it is recommended that you restart the computer.
3. If using PHP 4, move the files in c:\php\dlls to c:\php. Also copy all the dll files in c:\php\sapi to c:\php. This helps a lot when the Apache web server is configured.
4. Add the following to your Windows PATH environment variable c:\php. The Windows path can be accessed via the Control Panel at: 'System', 'Advanced', 'Environment'.
5. Add the following two environment variables to your system using the procedure above: MIBS=ALL and MIBSDIR=c:\php\mibs. (Note that these are system variables and not user variables)
6. If using PHP 4.3.5 or less (not recommended), create the following directory c:\tmp.
7. Rename the file c:\php\php.ini.dist to php.ini, and make the following changes to it:
If using PHP 4 add the following lines.
extension_dir = c:\php\extensions
extension=php_snmp.dll
extension=php_sockets.dll
If using PHP 5 add the following lines.
extension_dir = c:\php\ext
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
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.
session.save_path=c:\tmp
8. 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.
Configure the Web-server (Apache)
1. Make sure you have stopped any IIS web servers before you proceed with Apache installation. The .msi file can be found in the website http://httpd.apache.org/download.cgi
2. 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.
3. 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: There are two files in the conf directory httpd and httpd.default. The file that we need to edit is the httpd file. Please ignore the other file.
4. LoadModule php4_module “c:/php/sapi/php4apache.dll”
5. AddModule mod_php4.c
6. AddType application/x-httpd-php .php
7. DirectoryIndex index.html index.htm index.php
8. 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, 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
If using 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
Please note that forward slashes are used and the directory path is specified within double quotes. Also be sure that the appropriate dlls are found in the path specified. If httpd.conf does not find the file, Apache web server does not start. If such an error is encountered try moving the php4apache2.dll to c:/php instead of c:/php/sapi. This helps a lot when Apache refuses to start up because the particular dll is not found. Trouble shooting can be done by running the apache test configuration in the start up menu. This usually pin points the source of error.
Install RRDTool
1. Extract the RRDTool zip file to c:\rrdtool and copy c:\rrdtool\src\tool_release\rrdtool.exe to c:\rrdtool.
The web-site for downloading rrdtool is http://www.fastmirrors.org/rrdtool/
Install MySQL
1. Extract the MySQL zip file to a temp directory and run setup.exe.
2. Install MySQL to the c:\mysql directory.
3. Start MySQL by running c:\mysql\bin\winmysqladmin.exe.
4. Set a password for the root user
5. shell> cd mysql\bin
6. shell> mysqladmin --user=root password somepassword
7. shell> mysqladmin --user=root --password reload
8. Create the MySQL database:
9. shell> mysqladmin --user=root --password create cacti
10. Import the default Cacti database:
11. shell> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
12. Optional: Create a MySQL username and password for Cacti.
13. shell> mysql --user=root --password mysql
14. mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
15. mysql> flush privileges;
It is easier if the MySQL control center is downloaded. This makes granting privileges to user much easier instead of using the command prompt. Both MySQL and MySQL control center downloads can be found at http://dev.mysql.com/downloads
Install Net-SNMP
1. 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. The .exe file download for windows can be found at the web-site http://sourceforge.net/project/showfile ... p_id=12694
Install Cactid
Cactid can be downloaded from the following web page http://www.cacti.net/cactid_download.php
1. Extract the Cactid zip file to c:\cactid and modify the cactid.conf file to include the following statements.
2. SNMP_Ver 1
3. DB_Host IP_Address or Hostname (not localhost)
4. DB_Database cacti
5. DB_User cactiuser
6. DB_Password cacti
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.
Make sure that the database user name and password are the same that you specified in the command prompt.
7. If you either have Cygwin installed, or plan on installing it, remove the 3 DLL files from the c:\cactid directory.
Install Cacti
1. 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. Cacti download can be found at http://www.cacti.net/download_cacti.php
2. Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
3. $database_default = "cacti";
4. $database_hostname = "localhost";
5. $database_username = "cactiuser";
6. $database_password = "cacti";
Make sure that the database user name and password are the same that you specified in the command prompt.
7. 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.
Note: The following instructions are based on Windows XP and Windows Server 2003. You should be able to follow these instructions close enough for Windows 2000 as well.
a. Select Start --> Settings --> Control Panel and double click on Scheduled Tasks.
b. Double click on Add Scheduled Task.
c. 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.
d. Click Next again without changing the time or date settings.
e. When entering a username and password make sure the user has read and write access to the following directories:
f. c:\apache2\htdocs\cacti\rra
g. c:\apache2\htdocs\cacti\log
Make sure the user has read, write, and execute access to the following directories:
c:\php
c:\php\sapi
h. Click Next and Finish to close the wizard.
i. Right click on the task you just created, and select Properties.
j. Select the Schedule tab.
k. Make sure Daily is selected and click the Advanced button.
l. Check the Repeat checkbox, set it for 5 minutes and set the duration for 24 hours.
m. Click Ok
n. In the Run textbox enter the following text making sure to use the appropriate paths.
o. c:\php\php.exe c:\apache2\htdocs\cacti\poller.php
The start in box should say c:\apache2\htdocs\cacti.
8. Point your web browser to:
http://your-server/cacti/
Log in the with a username of admin and password of admin. You will be required to change this password immediately.
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\snmpwalk.exe
Cacti Log file Path:
c:\apache2\htdocs\cacti\log\cacti.log
Cactid Path:
c:\cactid\cactid.exe
Who is online
Users browsing this forum: No registered users and 5 guests