cacti安装

Cacti安装比较麻烦,可以尝试cactiez,集成在一个系统镜像里,而且还有中文版的

操作系统centos5.5 64

1.下载安装包

2.安装依赖关系

yum install httpd php php-mysql php-snmp mysql mysql-servernet-snmp

3.修改php配置文件,增加mysqlsnmp

vim /etc/php.ini

extension_dir ="/usr/lib64/php/modules"

extension=mysql.so

extension=snmp.so

4./etc/init.d/mysqld start

5.mysqlroot用户设置密码

mysqladmin --user=root password 123456

mysqladmin --user=root --password reload

6.tar -zxf cacti-0.8.8a.tar.gz

7.cd cacti-0.8.8a

8.mysqladmin --user=root--password=123456 create cacti

9.mysql --user=root--password=123456 cacti < cacti.sql

10.mysql --user=root --password=123456mysql

mysql> grantall on cacti.* to cactiuser@localhost identified by '123456';

11.useradd cactiuser

12.vim /etc/crontab

*/5 * * * *cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

13.cd /var/www/html/

cp -a/root/cacti-0.8.8a /var/www/html/cacti

14./etc/init.d/httpd start

15./etc/init.d/iptables stop

16.setenforce 0

17.cd /var/www/html/cacti

chown -Rcactiuser rra/ log/

18.yum install net-snmp-perl

19.yum install net-snmp-utils

下面几步是安装rrdtool

20.yum install cairo-devellibxml2-devel pango-devel pango libpng-devel freetype freetype-devellibart_lgpl-devel

21.tar -zxf rrdtool-1.4.8.tar.gz

22.cd rrdtool-1.4.8

23.mkdir /usr/local/rrdtool

24../configure--prefix=/usr/local/rrdtool && make && make install

25.没有安装gcc,请安装,然后执行上一条命令

yum install gcc

26.查看rrdtool是否安装成功,出现版本信息即安装成功

/usr/local/rrdtool/bin/rrdtool-v

27.ln -s/usr/local/rrdtool/bin/rrdtool /usr/local/bin/rrdtool

28./etc/init.d/snmpd start

29.检查snmp是否可用

snmpwalk -v 2c-c public localhost

30.用浏览器打开http://192.168.1.3/cacti/ IPcacti安装机器IP

31.默认用户名/密码:admin/admin,第一次登陆后会要求更改密码

32.成功

你可能感兴趣的:(安装,监控,cacti)