监控-cacti

参考官网(www.cacti.net)进行安装
[root@server5 ~]# yum install -y rrdtool mysql-server php php-mysql httpd php-xml net-snmp net-snmp-utils php-gd
[root@server5 ~]# rpm -ivh php-snmp-5.3.3-26.el6.x86_64.rpm
[root@server5 ~]# vim /etc/php.ini

date.timezone = Asia/Shanghai

[root@server5 ~]# tar zxf cacti-0.8.8h.tar.gz -C /var/www/html
[root@server5 ~]# cd /var/www/html
[root@server5 html]# ln -s cacti-0.8.8h/ cacti
[root@server5 cacti]# /etc/init.d/mysqld start
[root@server5 cacti]# mysql_secure_installation
[root@server5 cacti]# mysqladmin -pwestos create cacti
[root@server5 cacti]# mysql -pwestos cacti < cacti.sql
[root@server5 cacti]# mysql -p
Enter password:

mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED by 'westos';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

[root@server5 cacti]# cd include/
[root@server5 include]# vim config.php

$database_username = "cacti";
$database_password = "westos";
$url_path = "/cacti/";
$cacti_session_name = "Cacti";

[root@server5 include]# useradd -u 1000 -s /sbin/nologin -M -d /var/www/html/cacti cacti

[root@server5 include]# vim /etc/crontab
*/5 * * * * cacti php /var/www/html/cacti/poller.php > /dev/null 2>&1
[root@server5 include]# /etc/init.d/httpd start
访问172.25.70.5/cacti,默认next进入登录页面
监控-cacti_第1张图片
监控-cacti_第2张图片
监控-cacti_第3张图片
监控-cacti_第4张图片
监控-cacti_第5张图片监控-cacti_第6张图片
在真机上
[root@foundation70 Desktop]# yum install net-snmp -y
[root@foundation70 Desktop]# vim /etc/snmp/snmpd.conf

rocommunity public 127.0.0.1
rocommunity  westos 172.25.70.5
syslocation RHEL7.2
syscontact yakexi005@westos.org
disk /
includeAllDisks

[root@server5 ~]# yum install net-snmp-devel mysql-devel openssl-devel
[root@server5 ~]# yum install autoconf automake binutils libtool gcc cpp -y
[root@server5 ~]# tar zxf cacti-spine-0.8.8h.tar.gz
[root@server5 ~]# tar zxf monitor-v1.3-1.tgz -C /var/www/html/cacti/plugins #给cacti添加监控
[root@server5 cacti-spine-0.8.8h]# ./configure && make && make install
[root@server5 cacti-spine-0.8.8h]# cd /usr/local/spine/etc/
[root@server5 etc]# cp spine.conf.dist /etc/spine.conf
[root@server5 etc]# vim /etc/spine.conf

DB_User         cacti
DB_Pass         westos

在网页setting修改路径
监控-cacti_第7张图片

你可能感兴趣的:(企业部分)