cacti的安装、维护、排错
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Redhat系统下Cacti安装流程
教程参考官方的教程进行修改,修正了官网教程的几处错误。
一、Redhat系统的安装
安装时采用自定义安装。
开发工具部分,KDE Software Development可以不选外,其它全选。
系统工具(System Tools)部分,选中ETHEREAL-GNOME、NMAP-FRONTEND、TSCLIENT这三个软件包。
其它按照自己的需要选择安装。
如果在LINUX AS 4上安装cacti的话,要先把mysql、net-snmp删除,然后再安装Rpm –e net-snmp --nodeps
二、软件的安装
1、mysql的安装
●cd /cacti-install
●tar -zxvf mysql* //用实际的文件名称替换mysql*,下面的情况同理。
●cd mysql*
●./configure --prefix=/usr/local/mysql
●make
●make install
●groupadd mysql
●useradd -g mysql mysql
●scripts/mysql_install_db
●chown -R root /usr/local/mysql
●chown -R mysql /usr/local/mysql/var
●chgrp -R mysql /usr/local/mysql
●rm -f /etc/f
●cp support-files/f /etc/f
●echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf
●echo /usr/local/lib >> /etc/ld.so.conf
●ldconfig -v
●cp support-files/mysql.server /etc/init.d/mysql
●/usr/local/mysql/bin/mysqld_safe --user=mysql &
●echo
●cd /etc/rc3.d/
●ln -s ../init.d/mysql S85mysql
●ln -s ../init.d/mysql K85mysql
●cd /etc/rc5.d/
●ln -s ../init.d/mysql S85mysql
●ln -s ../init.d/mysql K85mysql
●cd /etc/init.d/
●chmod 755 mysql
2、apache的安装
●cd /cacti-install
●tar -zxvf httpd*
●cd httpd*
●./configure --prefix=/www --enable-so
●make
●make install
●cd /www/bin
●cp apachectl /etc/init.d/httpd
●y
●cd /etc/rc3.d/
●ln -s ../init.d/mysql S85httpd
●ln -s ../init.d/mysql K85httpd
●cd /etc/rc5.d/
●ln -s ../init.d/mysql S85httpd
●ln -s ../init.d/mysql K85httpd
●/www/bin/apachectl start
3、php的安装
●cd /cacti-install
●tar -zxvf php*
●cd php*
●./configure --prefix=/www/php --with-apxs2=/www/bin/apxs
--with-config-file-path=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd
●make
●make install
●cp php.ini-dist /www/php/php.ini
●cp /www/conf/httpd.conf /www/conf/httpd.conf.backup
●echo ####################### >> /www/conf/httpd.conf
●echo # Added via Lee Carter's Script >> /www/conf/httpd.conf
●echo ####################### >> /www/conf/httpd.conf
●echo AddType application/x-tar .tgz >> /www/conf/httpd.conf
●echo AddType application/x-httpd-php .php >> /www/conf/httpd.conf
●echo AddType image/x-icon .ico >> /www/conf/httpd.conf
●echo DirectoryIndex index.php index.html index.html.var >> /www/conf/httpd.conf ●service httpd stop
●service httpd start
4、mysql的设置
●cd /cacti-install
●groupadd cacti
●useradd -g cacti cactiuser
●/usr/local/mysql/bin/mysql
●mysql> set password for root@localhost=password('rootpw');
●mysql> create database cactidb;
●mysql> grant all on cactidb.* to root;
●mysql> grant all on cactidb.* to root@localhost;
●mysql> grant all on cactidb.* to cactiuser;
●mysql> grant all on cactidb.* to cactiuser@localhost;
●mysql> set password for cactiuser@localhost=password('cactipw');
●mysql> exit
5、rrdtool的安装
●cd /cacti-install
●tar -zxvf rrdtool*
●cd rrdtool*
●./configure --prefix=/usr/local/rrdtool
●make
●make install
6、net-snmp的安装
●cd /cacti-install
●tar -zxvf net-snmp*
●cd net-snmp*
●./configure