歡迎您光臨本站 註冊首頁

伺服器監控--cacti中英文版安裝全解

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0
近段時間一直在整伺服器監控方面的東西,以下就是cacti中英文版安裝的全過程,各安裝包基本都是最新的,基於Centos 5.2平台下安裝的!!
#!/bin/bash
# BY kerryhu
# QQ:263205768
# MAIL:king_819@163.com
# BLOG:[url]http://kerry.blog.51cto.com[/url]
# Please manual operation yum of before Operation.....
#Centos 5.2
# yum install ntp vim-enhanced gcc gcc-c flex bison autoconf
# automake bzip2-devel ncurses-devel libjpeg-devel libpng-devel
# libtiff-devel freetype-devel pam-devel kernel netconfig
#########################################
ntpdate time.nist.gov
groupadd mysql
useradd mysql -d /dev/null -g mysql -s /sbin/nologin
cd /opt
#####################################
#2、安裝ncurses-5.6
tar -zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure --prefix=/usr --with-shared --without-debug
make
make install
make install clean
####################################
#3、安裝mysql-5.0.51a
cd /opt
tar -zxvf mysql-5.0.51a.tar.gz
cd mysql-5.0.51a
./configure --with-mysqld-user=mysql --prefix=/usr/local/mysql5 --with-charset=gbk --with-extra-charset=all --without-isam --exec-prefix=/usr/local/mysql5
make
make install
/usr/local/mysql5/bin/mysql_install_db
chown -R mysql.mysql /usr/local/mysql5/
cp /usr/local/mysql5/share/mysql/my-medium.cnf /etc/my.cnf
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 700 /etc/rc.d/init.d/mysqld
/usr/local/mysql5/bin/mysqld_safe --user=mysql &
/etc/rc.d/init.d/mysqld start
chkconfig --add mysqld
chkconfig --level 2345 mysqld on
ln -s /usr/local/mysql5/bin/mysql /sbin/mysql
ln -s /usr/local/mysql5/bin/mysqladmin /sbin/mysqladmin
#配置庫文件搜索路徑


echo "/usr/local/mysql5/lib/mysql" >> /etc/ld.so.conf
make;make install

echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.d/rc.local
/usr/local/apache/bin/apachectl start
make;make install
cp php.ini-dist /usr/local/php5/lib/php.ini
PATH=/usr/local/net-snmp/bin/:/usr/local/net-snmp/sbin/:$PATH
cd ../
passwd cactiuser (pwd:cactipw)
mkdir -p /var/www/
mv cacti-0.8.7b /var/www/cacti
#創建cactidb資料庫
/usr/local/mysql5/bin/mysqladmin -u root password nginx
/usr/local/mysql5/bin/mysql -u root -pnginx
create database cactidb;
grant all on cactidb.* to 'cactiuser'@'localhost' identified by 'cactipw';
exit;

[火星人 ] 伺服器監控--cacti中英文版安裝全解已經有473次圍觀

http://coctec.com/docs/linux/show-post-54730.html