Install Cacti in centos 5

langkah – langkah nya sebagai berikut :

1. buat revo baru dengan nama dag.repo :

vi /etc/yum.repos.d/dag.repo

kemudian isi kan file berikut didalam nya.

name=Dag RPM Repository for Red Hat Enterprise Linux

2. install php , apache , mysql dan snmp

yum install php httpd mysql mysql-server php-mysql vim-enhanced net-snmp

3. install cacti

tar xzvf cacti-0.8.7e.tar.gz
mv cacti-0.8.7e cacti
mv cacti /var/www/html

4. kemudian buat cactiuser dan group nya

/usr/sbin/groupadd cacti
/usr/sbin/useradd -g cacti cactiuser
passwd cactiuser

5. ganti ownership dari /var/www/html/cacti/rra/ dan /var/www/html/cacti/log/ directories ke cactiuser yang telah di buat
cd /var/www/html/cacti
chown -R cactiuser rra/ log/

6. buat mysql password misal : pass = 12345
/usr/bin/mysqladmin -u root password 12345

7. buat database cacti nya

mysqladmin –user=root –password=12345 create cacti

8. import database

cd /var/www/html/cacti
mysql –user=root –password=12345 cacti < cacti.sql 9. masuk ke mysql mysql --user=root --password=12345 mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘12345’;
flush privileges;

10. kemudian edit confg DB cacti nya

vi /var/www/html/cacti/include/config.php

/* make sure these values refect your actual database/host/user/password */
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “12345”;
$database_port = “3306”;

11. kemudian buat cron untuk cacti
vi /etc/crontab


*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

12 . edit php.ini >> ganti memory_limit jadi 128 M
vi /etc/php.ini

13. install rddtool

yum install rrdtool

14. restart service

/etc/init.d/mysqld restart
/etc/init.d/httpd restart

15. test akses cacti nya


user : admin
pass : admin

sumber :

installl mrtg on centos

1. install snmp

yum install net-snmp-utils net-snmp

-config snmp

# service snmpd start
# chkconfig –add snmpd
# chkconfig snmpd on

vi /etc/snmp/snmpd.conf

#pertama :

cari baris :

com2sec notConfigUser default public

ganti dengan (make sure you replace with your network/subnet) baris di bawah ini:

com2sec local localhost public
com2sec mynetwork public

#kedua /scroll ke bawah

cari baris:

group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser

ganti dengan :

group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork

#ketiga / scroll

Find line:

view systemview included system

Replace with:

view all included .1 80

#keempat /scroll

Find line:

access notConfigGroup “” any noauth exact systemview none none

Replace with:

access MyROGroup “” any noauth exact all none none
access MyRWGroup “” any noauth exact all all none

#kelima /scroll

Find lines:

syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)

Replace with (make sure you supply appropriate values):

syslocation Linux (RH3_UP2), Home Linux Router.
syscontact YourNameHere

(a) Make sure when linux comes up snmpd always starts after the system reboot:

# chkconfig snmpd on

(b) Start the snmpd service:

# service snmpd start

(c) Finally, test your snmp server:

# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex

2. Install MRTG

yum install mrtg

#config mrtg

(a) Create a document root to store mrtg graphs/html pages for Apache web-server, enter:

# mkdir -p /var/www/html/mymrtg/

(b) Run any one of the following cfgmaker command to create mrtg configuration file:

# cfgmaker –global ‘WorkDir: /var/www/html/mymrtg’ –output /etc/mrtg/mymrtg.cfg public@localhost

OR (make sure FQDN resolves. In the following example I’m using i.e. my router’s FQDN address)

# cfgmaker –global ‘WorkDir: /var/www/html/mymrtg’ –output /etc/mrtg/mymrtg1.cfg

(c) Create a default index page for your MRTG configuration, run:

# indexmaker –output=/var/www/html/mymrtg/index.html /etc/mrtg/mymrtg.cfg

(d) Copy all tiny png files to your mrtg path, run:

# cp -av /var/www/html/mrtg/*.png /var/www/html/mymrtg/

3. test mrtg di browser

(a) Run mrtg command from command line with your configuration file, enter:

# mrtg /etc/mrtg/mymrtg.cfg

Note: You may get few warning message for the first time; please ignore them.

(b) Fire your favorite web browser (like FireFox ) and type the url or http://your-ip-here/mymrtg/

sumber :