hellow 运维
分类: 系统运维
2015-05-29 15:37:40
1
|
yum -y install rrdtool
|
1
|
yum -y install net-snmp net-snmp-libs net-snmp-utils
|
1
|
vim /etc/snmp/snmpd.conf
|
1
2
|
service snmpd start
snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.1.1.0
|
1
2
3
4
5
|
yum -y install httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server
service httpd start
service mysqld start
mysqladmin -uroot password 123
mysqladmin --user=root --password reload
|
1
2
3
4
|
wget
tar zxfv cacti-0.8.8b.tar.gz
mv cacti-0.8.8b /var/www/html/cacti
cd /var/www/html/cacti/
|
1
|
mysqladmin --user=root -p create cacti
|
1
|
mysql -uroot -p cacti < cacti.sql
|
1
2
3
|
mysql -u root -p mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY '123';
mysql> flush privileges;
|
1
|
vim include/config.php
|
1
2
|
useradd cactiuser
chown -R cactiuser rra/ log/
|
1
2
|
echo "*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1">>/etc/crontab
service crond restart
|
1
2
3
4
|
chkconfig --level 35 snmpd on
chkconfig --level 35 httpd on
chkconfig --level 35 mysqld on
chkconfig --level 35 crond on
|
1
2
|
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
restorecon -Rv ../cacti/
|