分类: LINUX
2009-03-24 14:08:34
#!/bin/bash
# 这是一个基于redhat rrdtool,snmp,cacti监控平台的初始化脚本
#this is a redhat as5 cacti server build script
#
#
tar xvf cactipack.tar.gz
yum -y install net-snmp net-snmp-utils php php-mysql php-snmp mysql-server cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel
/etc/init.d/httpd restart
/etc/init.d/mysqld start
mysql -u root -p < cactipack/cacti/cacti.sql
mysqladmin -u root -p password 123456
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
mv cactipack/cacti /var/www/html/
chmod 755 -R /var/www/html/cacti/
chown apache:apache -R /var/www/html/cacti/
cd cactipack/rrdtool-1.2.30/
./configure
make
make install
ln -s /usr/local/rrdtool-1.2.30/ /usr/local/rrdtool
cp /usr/local/rrdtool/bin/* /usr/bin/
echo "*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1" > /var/spool/cron/apache
#now you can logon username:admin password:admin
echo "now you can logon username:admin password:admin"
echo "job finish!"
压缩包内含有
cactipack.tar.gz\cactipack - TAR 压缩文件, 解包大小为 17,773,110 字节
cacti
rrdtool-1.2.30
tips:
配合我们的redhat as yum 服务器实现了自动解决软件依赖性问题