cacti脚本安装
环境centos6.3X86_84最小化安装。lokkit --disabled --selinux=disabled
yum update -y
yum install wget crontabs vim patch unzip -y
yum install gcc gcc-c++ make automake autoconf -y
yum install libpcap libpcap-devel -y
yum install libpcap libpcap-devel libpng gdbm gdbm-devel glib libxml2-devel pango pango-devel gd -y
yum install mysql mysql-server mysql-devel php php-pdo php-snmp php-mysql php-devel net-snmp net-snmp-libs net-snmp-utils perl-DBD-MySQL -y
cd /usr/local/src/
wget http://www.cacti.net/downloads/cacti-0.8.7h.tar.gz
wget http://packages.express.org/rrdtool/rrdtool-1.4.4-1.el5.wrl.x86_64.rpm
wget http://packages.express.org/rrdtool/rrdtool-devel-1.4.4-1.el5.wrl.x86_64.rpm
wget http://packages.express.org/rrdtool/rrdtool-perl-1.4.4-1.el5.wrl.x86_64.rpm
wget http://flexbox.sourceforge.net/centos/5/x86_64/rrdtool-php-1.4.4-1.el5.x86_64.rpm
yum localinstall -y --nogpgcheck rrdtool-*
tar xf cacti-0.8.7h.tar.gz -C /var/www/html/
mv /var/www/html/cacti-0.8.7h/ /var/www/html/cacti
service mysqld start
mysql <<EOF
create database cacti;
grant all on cacti.* to 'cacti'@'localhost' identified by 'cacti';
flush privileges;
quit
EOF
cd /var/www/html/cacti
mysql -ucacti -pcacti cacti < /var/www/html/cacti/cacti.sql
useradd -r -M cacti
chown -R cacti /var/www/html/cacti/rra/
chown -R cacti /var/www/html/cacti/log/
vim /var/www/html/cacti/include/config.php <<VIM
:%s#cactiuser#cacti#
:wq
VIM
vim /var/www/html/cacti/include/global.php <<VIM
:%s#cactiuser#cacti#
:wq
VIM
crontab -e <<EOF
:1,1s#^#*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1#
:wq
EOF
service crond start
vim /etc/snmp/snmpd.conf <<VIM
:/^com2sec/s&default&127.0.0.1&g
:/^access notConfigGroup/s&systemview&all&g
:/^#view all/s&#&&g
:wq
VIM
service snmpd start
service httpd start
cd /usr/local/src/
wget http://www.cacti.net/downloads/pia/cacti-plugin-0.8.7h-PA-v3.0.tar.gz
tar xvf cacti-plugin-0.8.7h-PA-v3.0.tar.gz
\cp -R cacti-plugin-arch/* /var/www/html/cacti/
cd /var/www/html/cacti/
mysql -ucacti -pcacti cacti < pa.sql
patch -p1 -N < cacti-plugin-0.8.7h-PA-v3.0.diff
vim /var/www/html/cacti/include/config.php <<VIM
:33,33s#^#\r\$url_path = "/cacti/";#g
:wq
VIM
wget http://fendou.sinaapp.com/fendou_soft/2012-07-12.simsun.ttc.zip
wget http://fendou.sinaapp.com/fendou_soft/2012-07-12.simsun.ttf.zip
unzip 2012-07-12.simsun.ttc.zip -d /usr/share/fonts/
unzip 2012-07-12.simsun.ttf.zip -d /usr/share/fonts/
wget http://docs.cacti.net/_media/plugin:monitor-v1.3-1.tgz
mv plugin\:monitor-v1.3-1.tgz monitor-v1.3-1.tgz
tar xf monitor-v1.3-1.tgz -C /var/www/html/cacti/plugins/
wget http://docs.cacti.net/_media/plugin:ntop-v0.2-1.tgz
mv plugin\:ntop-v0.2-1.tgz ntop-v0.2-1.tgz
tar xf ntop-v0.2-1.tgz -C /var/www/html/cacti/plugins/
wget http://docs.cacti.net/_media/plugin:thold-v0.4.9-3.tgz
mv plugin\:thold-v0.4.9-3.tgz thold-v0.4.9-3.tgz
tar xf thold-v0.4.9-3.tgz -C /var/www/html/cacti/plugins/
wget http://docs.cacti.net/_media/plugin:settings-v0.71-1.tgz
mv plugin\:settings-v0.71-1.tgz settings-v0.71-1.tgz
tar xf settings-v0.71-1.tgz
mv settings /var/www/html/cacti/plugins/
wget http://docs.cacti.net/_media/plugin:timeshift-latest.zip
mv plugin\:timeshift-latest.zip timeshift-latest.zip
unzip timeshift-latest.zip -d /var/www/html/cacti/plugins/
wget http://docs.cacti.net/_media/plugin:realtime-v0.5-2.tgz
mv plugin\:realtime-v0.5-2.tgz realtime-v0.5-2.tgz
tar xf realtime-v0.5-2.tgz -C /var/www/html/cacti/plugins/
mkdir -p /var/www/html/cacti/cache
chown -R apache /var/www/html/cacti/cache
ps:The Image Cache Directory directory does not exist. Please first create it and set permissions and then attempt to open another realtime graph.
进入---,设置"Cache Diredtiory"为"/var/www/html/cacti/cache/"
wget http://wotsit.thingy.com/haj/cacti/quicktree-0.2.zip
unzip quicktree-0.2.zip -d /var/www/html/cacti/plugins/
wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip
unzip php-weathermap-0.97a.zip -d /var/www/html/cacti/plugins/
{:6_387:}{:6_387:} 不要在一棵树上吊死,在附近几棵树上多试试死几次~ 找不到恐龙,就用蜥蜴顶 我本非随便的人,但如果你想随便,那我就随你的便好啦! 有道理。。。 穿别人的鞋,走自己的路,让他们找去吧。
页:
[1]