How to install Cacti on Centos
Cacti is free software was designed as making graphic network, cacti is advanced for graphic, with using RRDTool as data stored, multiple data, managed user, and monitoring server. For installation we need package php-snmp, rrdtool, et-snmp, net-snmp-utils, httpd, php, php-mysql, mysql, mysql-server. This step for processing installation on CentOS 5.2.
Please wait while we retrieve data from server .............
1. Install RPMforge Repository
[root@localhost ~]# yum -y install yum-priorities
2. Edit file
[root@localhost ~]# Edit /etc/yum/pluginconf.d/priorities.conf
[main]
enabled=1
3. Download and install RPMforge
[root@localhost ~]# wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
[root@localhost ~]# rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
[root@localhost ~]# rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
[root@localhost ~]# rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm
4. Install other package.
[root@localhost ~]# yum install httpd php mysql php-mysql mysql-server php-snmp net-snmp net-snmp-utils rrdtool
5. Make user and change password cacti
[root@localhost ~]# groupadd cacti
[root@localhost ~]# useradd -g cacti cactiuser
[root@localhost ~]# passwd cactiuser
Changing password for user cactiuser.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
6. Download paket cacti
[root@localhost ~]# wget http://www.cacti.net/downloads/cacti-0.8.7b.tar.gz
7. Tarball paket cacti
[root@localhost ~]# tar zxvf cacti-0.8.7b.tar.gz
8. Moving to folder /var/www/html/
[root@localhost ~]# mv cacti-0.8.7b /var/www/html/
[root@localhost ~]# cd /var/www/html/
[root@localhost html]# mv cacti-0.8.7b cacti
[root@localhost html]# cd /cacti
9. Running mysql service
[root@localhost cacti]# service mysqld start
Starting MySQL: [ OK ]
10. Make database cacti
[root@localhost cacti]# mysqladmin -u root password password
[root@localhost cacti]# mysqladmin -u root -p
Enter password:
mysql> create databases cacti;
Query OK, 0 rows affected (0.00 sec)
11. User cacti will managing database cacti
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘cactipassword’;
Query OK, 0 rows affected (0.00 sec)
12. This syntax for import file cacti.sql to database cacti.
[root@localhost cacti]# mysql -u root -p cacti < cacti.sql
13. Edit configuration file include/config.php
[root@localhost cacti]# nano include/config.php
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “password”;
$database_port = “3306″;
syncronization your configuration with your database.
14. Change own user from folder rra and log
[root@localhost cacti]# chown -R cactiuser rra/ log/
15. Make crontab for cacti.
[root@localhost cacti]# crontab -e
*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1
16. Restart mysql service.
[root@localhost cacti]# service mysqld restart
17. And then install from web browser
running this addres http://ip_komputer/cacti/ will looking installation page:
11
click next for continue installation.
2
Next again for continued.
3
Make sure your page like picture in top.
4
user admin and password admin for login.
5
Automatically cacti will requesting for change your password for secure.