mv /etc/localtime /etc/localtime.bak
2. Create symbolic link
ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
a. zipdir/scripts/mikrotik_wireless_interfaces.php -> usr/share/cacti/scripts/mikrotik_wireless_interfaces.php
b. zipdir/scripts/mikrotik_ppp_connections.php -> usr/share/cacti/scripts/mikrotik_ppp_connections.php
c. zipdir/resources/script_server/mikrotik_wireless_interfaces.xml -> usr/share/cacti/resources/script_server/mikrotik_wireless_interfaces.xml
d. zipdir/resources/snmp_queries/mikrotik_queue_simple.xml -> usr/share/cacti/resources/snmp_queries/mikrotik_queue_simple.xml
e. zipdir/resources/snmp_queries/mikrotik_queue_tree.xml -> usr/share/cacti/resources/snmp_queries/mikrotik_queue_tree.xml
f. zipdir/resources/snmp_queries/mikrotik_wireless_client.xml -> usr/share/cacti/resources/snmp_queries/mikrotik_wireless_client.xml
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cacti |
| mysql |
| test |
+--------------------+
4 rows in set (0.01 sec)
mysql> use cacti;
mysql> show tables;Output:
+---------------------------+Remove database tertentu:
| Tables_in_cacti |
+---------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| plugin_config |
| plugin_db_changes |
| plugin_hooks |
| plugin_realms |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+---------------------------+
52 rows in set (0.00 sec)
mysql> drop database cacti;Output:
Query OK, 52 rows affected (0.04 sec)
yum install httpd httpd-devel mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli
net-snmp-utils net-snmp-libs
php-snmp php-pear-Net-SMTP php-mysql httpd
#/etc/init.d/httpd start#/etc/init.d/mysqld start#/etc/init.d/snmpd start
#/sbin/chkconfig --levels 345 httpd on #/sbin/chkconfig --levels 345 mysqld on #/sbin/chkconfig --levels 345 snmpd on
## RHEL/CentOS 6 64-Bit ##5.Konfigurasi file snmpd.conf
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
/etc/snmp/snmpd.conf
Isi dengan data sbb:6. Restart Service SNMPcom2sec local localhost public group MyRWGroup v1 local group MyRWGroup v2c local group MyRWGroup usm local view all included .1 80 access MyRWGroup "" any noauth exact all all none syslocation Unknown (edit /etc/snmp/snmpd.conf) syscontact Root (configure /etc/snmp/snmp.local.conf) pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
/etc/init.d/snmpd restart
7. Pastikan mendapat informasi dari snmpd:
snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
Contoh hasil perintah di atas:IP-MIB::ipAdEntIfIndex.10.20.40.153 = INTEGER: 2 IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
# yum install cacti
10. Login ke MySQL dengan user "root" dan password yang baru dibuat.# mysqladmin -u root password PASSWORD-BARU
11. Create database dengan nama "cacti"# mysql -u root -p
12. Create user dengan nama "cacti" untuk akses database "cacti" yang baru dibuat, dan berikan password untuk itu.mysql> create database cacti;
13. Install table "cacti" ke MySQLmysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'password-cacti'; mysql> FLUSH privileges; mysql> quit;
- Outputnya kurang lebih seperti ini:rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8b/cacti.sql- Setelah menemukan path-nya, kita install table dengan perintah berikut (perlu password user "cacti" yang dicreate sebelumnya) :
mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
14. Konfigurasi setting MySQL untuk cactiLakukan perubahan sebagai berikut:nano /etc/cacti/db.php
15. Konfigurasi Apache Server untuk Instalasi Cacti/* make sure these values reflect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cacti"; $database_password = "password-cacti"; $database_port = "3306"; $database_ssl = false;
nano /etc/httpd/conf.d/cacti.conf
Berikan izin akses untuk cacti, bisa "all" atau per IP pada jaringan yang dikehendaki.16. Restart Service ApacheAlias /cacti /usr/share/cactiOrder Deny,Allow Deny from all Allow from all
service httpd restart17. Setting Cronjob untuk Cacti
nano /etc/cron.d/cactiHilangkan "#" pada baris ini. Script poller.php akan berjalan setiap 5 menit untuk graph data pada device yang didaftarkan pada cacti.
18. Cacti sudah bisa diakses dengan*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
http://ip_server/cacti19. Pada Web Browser, Klik "Next", Pilih "New Install" dan kemudian "Next", terus hingga "Finish"
Note:
Kalau terjadi crash dll, Cacti dapat diuninstall sbb:
- yum remove cacti