Source :
> http://www.unixmen.com/install-cacti-network-monitoring-tool-on-centos-6-4-rhel-6-4-scientific-linux-6-4/
Cacti Installation
Nagios with Cacti through the NPC plugin on CentOS 6.3
/var/www/html
[root@test html]# ll
total 4
lrwxrwxrwx 1 root root 12 Jan 10 12:56 cacti -> cacti-0.8.8b
drwxr-xr-x 13 1000 users 4096 Aug 7 2013 cacti-0.8.8b
[root@test html]#
> http://www.unixmen.com/install-cacti-network-monitoring-tool-on-centos-6-4-rhel-6-4-scientific-linux-6-4/
Cacti Installation
Nagios with Cacti through the NPC plugin on CentOS 6.3
------------------------------------------------------------------------------------------
[root@test html]# pwd/var/www/html
[root@test html]# ll
total 4
lrwxrwxrwx 1 root root 12 Jan 10 12:56 cacti -> cacti-0.8.8b
drwxr-xr-x 13 1000 users 4096 Aug 7 2013 cacti-0.8.8b
[root@test html]#
--------------------------------------------------------------------------------------------
[root@server ~]# yum install httpd httpd-devel -y
yum install mysql mysql-server -yyum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql -yyum install php-snmp -yyum install net-snmp-utils net-snmp-libs php-pear-Net-SMTP -yyum install rrdtool -y[root@server ~]# /etc/init.d/httpd start [root@server ~]# /etc/init.d/mysqld start [root@server ~]# /etc/init.d/snmpd start[root@server ~]# chkconfig httpd on [root@server ~]# chkconfig mysqld on [root@server ~]# chkconfig snmpd oncd /var/www/html wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz tar -xzvf cacti-0.8.8b.tar.gzln -s cacti-0.8.8b cacti
adduser cacti
echo "*/5 * * * * cacti php /var/www/html/cacti/poller.php &>/dev/null" >> /etc/cron.d/cacti
cd /var/www/html/cacti chown -R cacti.apache rra logchmod 775 rra log
Permission Output : [root@test cacti]# ls -lrt total 1088 -rw-r--r-- 1 cacti apache 353 Apr 4 2012 script_server.pl drwxr-xr-x 5 cacti apache 4096 Apr 4 2012 resource -rw-r--r-- 1 cacti apache 48 Apr 4 2012 README drwxrwxr-x 2 cacti apache 4096 Apr 4 2012 log -rw-r--r-- 1 cacti apache 15141 Apr 4 2012 LICENSEDatabase : [root@server ~]# mysql -u root -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.1.69 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database cacti; Query OK, 1 row affected (0.01 sec) mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'centos'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> exit Byecd /var/www/html/cacti/include/ vi config.php$database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "MyV3ryStr0ngPassword"; $database_port = "3306"; $database_ssl = false;==================================$url_path = "/cacti/";Troublesoot on RHEL/CentOS 7.x==================================source : http://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/1) Validation error when adding cacti host to the graphs tree
- Open host.php in line 179
vi /usr/share/cacti/host.php +179
- Replace the line 179:
input_validate_input_number(get_request_var_post('drp_action'));
withinput_validate_input_regex(get_request_var_post('drp_action'), "^([a-zA-Z0-9_]+)$");
- Restart Apache service:
service httpd restart
- Open your Cacti, re-add your host to the desired graphs tree and voila! It should work now:)
2) graphs not showing up in cacti :- wrong permissions The permissions for the rra and log folder is set to 755, cactiuser is owner. - crontab entry missing or wrong */5 * * * * cactiuser php /usr/share/cacti/poller.php > /dev/null 2>&1 - lack of disk storage No.
No comments:
Post a Comment