开发进行时...

crazy coder

Avatar

AS5安裝cacti

1、安裝PHP與mysql環境(不必多說)
2、安裝rrdtool
a)安裝依賴包

rpm -Uvh intltool-0.35.0-2.x86_64.rpm perl-XML-Parser-2.34-6.1.2.2.1.x86_64.rpm  pkgconfig-0.21-1.fc6.x86_64.rpm 
rpm -ivh pango-devel-1.14.9-3.el5.x86_64.rpm cairo-devel-1.2.4-2.el5.x86_64.rpm fontconfig-devel-2.4.1-6.el5.x86_64.rpm glib2-devel-2.12.3-2.fc6.x86_64.rpm libX11-devel-1.0.3-8.0.1.el5.x86_64.rpm libXext-devel-1.0.1-2.1.x86_64.rpm libXft-devel-2.1.10-1.1.x86_64.rpm libXrender-devel-0.9.1-3.1.x86_64.rpm libXau-devel-1.0.1-3.1.x86_64.rpm libXdmcp-devel-1.0.1-2.1.x86_64.rpm xorg-x11-proto-devel-7.1-9.fc6.x86_64.rpm mesa-libGL-devel-6.5.1-7.5.el5.x86_64.rpm


b)編譯安裝rrdtool

wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz
tar zxvf rrdtool-1.3.8.tar.gz
 cd rrdtool-1.3.8
./configure --prefix=/usr/local/rrdtool
make && make install
ln -s /usr/local/rrdtool/bin/rrdtool /usr/local/bin/rrdtool


3、配置mysql數據庫,創建數據庫(如cacti)與用戶(如cacti)
4、安裝cacti

wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
tar -zxvf cacti-0.8.7e.tar.gz -C apps_88/
cd apps_88/ && mv cacti-0.8.7e/ cacti && cd cacti


導入數據庫

mysql -ucacti -p cacti < cacti.sql


修改cacti數據庫配置文件

vi include/config.php


crontab增加

*/5 * * * * /usr/bin/php <path>/cacti/poller.php > /dev/null 2>&1

5、安裝向導
http://ip/cacti/install

6、第一次訪問
默認用戶名與密碼為admin/admin,登錄後要求修改密碼。


评论已关闭