Yum install method
You need to install Cacti, snmpd, httpd, php, php-mysql, php-snmp, MySQL and MySQL Server, if you have any of these installed you can omit them from the command below.
Run the command:
yum install httpd cacti net-snmp php php-mysql php-snmp mysql mysql-server
Next modify the /etc/httpd/conf.d/cacti.conf (allow from line) to allow your local network:
Allow from 192.168.0.if that's your network.
Restart apache:
service httpd restart
Make sure apache, mysqld, and snmpd start at boot.
chkconfig httpd on chkconfig mysqld on chkconfig snmpd on
Make sure that snmpd accepts public as community from localhost.
You can use the command
snmpconf -g basic_setupto generate an snmpd.conf file.
Restart snmpd:
service snmpd restart
Yum should have setup the cacti database, if it did not then do the following:
mysqladmin create cacti mysql cacti
Create mysql user for cacti (use a decent password, not just password):
mysql> GRANT ALL ON * . * TO 'cactiuser'@'localhost' IDENTIFIED BY 'password';
Enable the user and privileges for the user:
mysql> flush privileges;
If you are running a yum based distribution then you should be able to go to:
http://serverip/cacti
You will be presented with the Cacti Installation Guide, click Next >>
Since this is a New Install you will click Next >> again.
Be sure that the values are correct and all the fields have [FOUND] above them, if they
do not then correct them and click Finish.
The default User Name is admin, and the default Password is admin, you will be forced to change this so pick a secure password
Now you should be in the console, click Devices, click localhost, now click Create Graphs for this Host, check all the check boxes at the left in the Graph Templates, and Data Query sections then click create. Now click create again.
Now if you click the graphs and you should be able to see the start of the graphs that are being created for the local host. These will take a bit of time to populate so expect to see data in about 10 minutes.
Source Method
To install via the source method, make sure you have the following required software installed and configured:
Apache
RRDTool 1.0.49 or 1.2.x or greater
MySQL 4.1.x or 5.x or greater
PHP 4.3.6 or greater, 5.x greater highly recommended for advanced features
Yum should need to setup the cacti database, do the following:
mysqladmin create cacti mysql cacti
Create mysql user for cacti (use a decent password, not just password):
mysql> GRANT ALL ON * . * TO 'cactiuser'@'localhost' IDENTIFIED BY 'password';
Enable the user and privileges for the user:
mysql> flush privileges;
Download cacti-xxxxx.tar.gz from sourceforge to /var/www/html or wherever your webserver DocumentRoot is located.
Untar gzip the file:
tar -zxf cacti-xxxxx.tar.gz
Rename the directory this creates
mv cacti-xxxxx cacti
Add a cacti user:
adduser -d /var/www/html/cacti cactiuser
Change the owner of the files to the user cacti:
chown -R cacti:cactiuser /var/www/html/cacti
Populate the cacti database (use your values for user and password)
mysql cacti -u cactiuser -ppassword < /var/www/html/cacti/cacti.sqlEdit the /var/www/html/cacti/include/config.php file to specify the user+password: Add the Cacti poller job as a cron job:
crontab -eAdd the following line:
*/5 * * * * cacti1 php /var/www/html/cacti1/poller.php > /dev/null 2>&1
Now you can go to http://serverip/cacti
You will be presented with the Cacti Installation Guide, click Next >>
Since this is a New Install you will click Next >> again.
Be sure that the values are correct and all the fields have [FOUND] above them, if they
do not then correct them and click Finish.
The default User Name is admin, and the default Password is admin, you will be forced to change this so pick a secure password
Now you should be in the console, click Devices, click localhost, now click Create Graphs for this Host, check all the check boxes at the left in the Graph Templates, and Data Query sections then click create. Now click create again.
Now if you click the graphs and you should be able to see the start of the graphs that are being created for the local host. These will take a bit of time to populate so expect to see data in about 10 minutes.
As always if you need further assistance with this or any other open source application or issue, the experts at Pantek Inc. are available 24/7 at info@pantek.com, 216-344-1614, and 1-877-LINUX-FIX! We look forward to working with you.
0 comments:
Post a Comment