当前位置:首页 > 电脑常识 > 正文

Linux 之cacti 监控介绍 8090安适门户

11-22 电脑常识

cacti (rrdtool是画图工具,)监控网设备占优势。
nagios 直不雅观一目了然,可以自已写脚本,但是不撑持历史数据的检察。
zabbix,成果丰富。
安置 cacti处事端  #楼主的系统是centenOS 6
首先此刻如下rpm包,然后安置对应的rpm包  epel源centos5 32位epel源下载地点: 位下载地点:  位epel yum源下载地点: 64位下载地点:
2. (lamp)然后分袂安置httpd、php、mysql  #搭建LAMP 的环境 (LAMP 环境搭建参见前面)yum install -y  httpd php php-mysql mysql mysql-server mysql-devel php-gd  libjpeg libjpeg-devel libpng libpng-devel
3. 安置cacti  net-snmp  rrdtool yum install -y cacti  net-snmp  net-snmp-utils  rrdtool
[root@OBird ~]# yum install -y cacti  net-snmp  net-snmp-utils  rrdtool
4. 启动处事:[root@OBird ~]/etc/init.d/mysqld start[root@OBird ~]/etc/init.d/httpd  start[root@OBird ~]/etc/init.d/snmpd start
说明:由于前面安置过LNMP,用yum安置LNMP后启动httpd出问题error1:Could not reliably determine the server's fully qualified domain name 原因:这是在/etc/httpd/conf/httpd.conf中确实对主机端口的指定解决步伐:vim /etc/httpd/conf/httpd.conf 增加一条 ServerName localhost:80error2:(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 原因:80端口被占用解决步伐:netstat -lnp |grep 80 ;发明nginx占用80端口,使用kill -9 PID 功效nginx重启了,使用killall nginx杀死告成。/etc/init.d/httpd start   ok

--------------------------------------------------------------------
[root@OBird ~]# vim /etc/httpd/conf.d/cacti.conf #编纂配置文件。使apache能访谒cacti web页面
把"Deny from all" 改为  "Allow from all"。如果不改会访谒403
[root@OBird ~]# /etc/init.d/httpd restart  #重启apache 处事
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 10.72.4.39 for ServerName
[  OK  ]
[root@OBird ~]# mysql -uroot  -pzaq12wsx       #进入数据库,LAMP
mysql> create database cacti;  #创建数据库 cacti ;
mysql> show databases;
mysql> grant all on cacti.* to 'cacti'@'localhost' identified by 'cacti';
#设置数据库权限,用户名&暗码 .cacti.* 暗示所有的示,用户名和暗码一样
出产环境中不建议这样设置暗码。

导入sql文件  (注意文件路径不要错了)
[root@OBird ~]# mysql -uroot -pzaq12wsx cacti /usr/share/doc/cacti-0.8.8h/cacti.sql
[root@OBird ~]# vim /usr/share/cacti/include/config.php #编纂cacti的配置文伯
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "127.0.0.1"; #localhost变动为 127.0.0.1
$database_username = "cacti";     #变动为cacti,前面设置的
$database_password = "cacti";     #变动为cacti
$database_port = "3306";
$database_ssl = false;

温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/pc/13235.html

博客主人杰米WWW
杰米博客,为大家提供seo以及it方面技巧喜欢的朋友收藏哦!
  • 11365文章总数
  • 1378074访问次数
  • 建站天数
  •