yum安装cacti及集成个插件

[[email protected] ~]# yum-y install httpd php php-mysql php-ldap php-xml net-snmp-utils mysqlmysql-server net-snmp crond rrdtool lm_sensors

gcc gcc-c++  zlib-devel  libpng-deve

[[email protected]]# yum -y install libart_lgpl libart_lgpl-devel

[[email protected]]# yum -y install freetype freetype-devel

[[email protected] ~]#mkdir /cacti

[[email protected] ~]# mv/root/Desktop/rrdtool-1.2.27.tar.gz /cacti/

[[email protected] ~]# cd/cacti/

[[email protected] cacti]#tar -zxf rrdtool-1.2.27.tar.gz -C /usr/src

[[email protected] cacti]#cd /usr/src

[[email protected] src]#cd rrdtool-1.2.27/

[[email protected]]# ./configure --prefix=/usr/local

[[email protected]]# make && make install

rrd  ------tab键可以补全  rrdtool安装成功

[[email protected]]# cd /root/Desktop/

[[email protected]]# tar -zxf cacti-0.8.7g.tar.gz -C /usr/src/

[[email protected]]# cd /usr/src/

[[email protected] src]#cp -r cacti-0.8.7g/ /var/www/html/

[[email protected]]# useradd cactiuser

[[email protected] cacti]# cd /usr/src/ cacti-0.8.7g/

[[email protected]]# chown -R cactiuser:cactiuser rra/ log/

[[email protected]]# service mysqld start

[[email protected]]# mysql

mysql> createdatabase cactidb default character set utf8;

mysql> grantall on cactidb.* to ‘cactiuser‘@‘localhost‘ identified by ‘123456‘;

mysql> \q

将cacti.sql数据库导入到cactidb中

[[email protected]]# mysql -ucactiuser -p123456 cactidb < cacti.sql

-u用户名  -p密码

数据库名是上面在msyql数据库中创建的

用户名密码是数据库中授权的

[[email protected]]# service httpd restart;chkconfig httpd on

[[email protected] html]#cd /var/www/html/cacti/include

[[email protected] html]#vimconfig.php

更改为在数据库中授权的用户名密码  库名

[[email protected] scripts]# vim/etc/snmp/snmpd.conf

62 access  notConfigGroup ""      any      noauth    exact all none none    //systemview改为all

85 view all    included .1           80  //取消注释

chkconfig snmpd on

112 com2secnotConfigUser   192.168.10.10        public    //监控服务器的ip地址

[[email protected]]# service snmpd start;chkconfig snmpd on

监控本机的配置192.168.10.10

另一客户端的配置192.168.10.20

[[email protected] media]#yum -y install net-snmp net-snmp-utils

[[email protected] media]#vim /etc/snmp/snmpd.conf

配置与上面一样

[[email protected] media]#service snmpd restart;chkconfig snmpd on

服务器端的配置操作 device--点击右上角的add

完成以上点击右下角的 create

Associated DataQueries添加以下的数据

SNMP - Get MountedPartitions

SNMP - GetProcessor Information

SNMP - InterfaceStatistics

添加完毕 save保存

保存完成后,点击create graphs for this host

创建图形

点击右下角的创建  ,  开始创建图形

安装cacti-plugin-0.8.7g-PA-v2.9.tar.gz是插件

[[email protected]]# tar -xzf cacti-plugin-0.8.7g-PA-v2.9.tar.gz –C /var/www/html/cacti

[[email protected] cacti]#cd /var/www/html/cacti

[[email protected] cacti]#patch–p1 –N cacti-plugin-0.8.7b-PA-v2.1.diff

[[email protected] cacti]#mysql –u root –p cactidb<pa.sql

[[email protected] cacti]# vim include/global.php

[[email protected] cacti]#vim include/config.php

之前修改的配置不需要再进行修改

注意:一定要在cacti后加入 / 否则web页面无法读取正确内容

web页面的配置

[[email protected]]# tar -zxf monitor-v1.3-1.tgz

[[email protected]]# tar -zxf settings-v0.71-1.tgz

[[email protected]]# tar -zxf thold-v0.4.9-3.tgz

[[email protected]]#unzip php-weathermap-0.97a.zip

[[email protected]]#mv clog monitor settings weathermap /var/www/html/cacti/plugins/

[[email protected]]#cd /var/www/html/cacti/plugins/

[[email protected] monitor]#mysql–uroot –p cactidb<monitor.sql

安装好weathermap后,看到点Console在左边的列表里会看到weathermap的菜单,我们点击,会看到设置,因为我们还没有定义一个weathermap配置文件,所以我们点右上角的Add按钮,添加一个weathermap配置文件,如果提示gd之类的错误,需要安装gd、gd-php

点击Add之后,我们看到有二个文件,其实这个时候调用的就是weathermap的configs目录下的文件,simple.conf就是自带的一个配置文件,我们可以点击它前面的Add按钮,把他添加到默认配置文件里

至此我们添加了一个weathermap的配置文件,下面就是对weathermap进行配置了,点击weathermap,然后点击Editor对默认图形配置文件进行配置。

点击editor后我们会看到如下提示

The editor has not been enabled yet. You need to set ENABLED=true at thetop of editor.php

Before you do that, you should consider using FilesMatch (in Apache) orsimilar to limit who can access the editor. There is more information in theinstall guide section of the manual.

我们按照他提示的编辑editor.php


1


vi /var/www/html/plugins/weathermap/editor.php


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22


<php

require_once ‘editor.inc.php‘;

require_once ‘Weathermap.class.php‘;

// so that you can‘t have the editor  active, and not know about it.

$ENABLED=true;

if(! $ENABLED)

{

print "

The editor has not been enabled yet. You  need to set ENABLED=true at the top of editor.php

";

print "

Before you do that, you should consider  using FilesMatch (in Apache) or similar to limit who can access the editor.  There is more information in the install guide section of the manual.

";

exit();

}

修改完成后点开editor弹出

把上面的$ENABLED=false;改为$ENABLED=true;然后保存。之后我们刷新页面就可以看到如下页面

继续修改配置文件

[[email protected] weathermap]# vim  editor.php

时间: 2024-10-24 16:05:45

yum安装cacti及集成个插件的相关文章

cacti (不可以利用yum安装cacti的配置)

我们如果用yum不可以安装cacti,我们则可以利用tar包来安装!!! //cacti的配置准备 [[email protected] ~]# yum install -y epel-release [[email protected] ~]# yum install -y httpd php php-mysql mysql mysql-server mysql-devel php-gd libjpeg libjpeg-devel libpng libpng-devel a [[email p

centos6中yum安装cacti

yum install net-snmp net-snmp-libs net-snmp-utils rrdtool /etc/init.d/snmpd start chkconfig snmpd on /etc/init.d/rrdcached start chkconfig rrdcached on vi /etc/snmp/snmpd.conf view    systemview    included   .1.3.6.1.2.1 测试snmpwalk -v 1 -c public lo

cacti (可以利用yum安装cacti的配置)

[[email protected] ~]# yum install -y epel-release[[email protected] ~]# [[email protected] ~]# yum install -y httpd php php-mysql mysql mysql-server mysql-devel php-gd libjpeg libjpeg-devel libpng libpng-devel //安装lamp [[email protected] ~]# yum ins

Centos6.8安装cacti

cacti环境基于LAMP,本实验LAMP环境已编译安装成功.若直接yum安装cacti环境会把httpd,mysql,php也yum安装,与我们编译安装的LAMP环境造成冲突,所以本次实验只安装cacti,rrdtool,net-snmp. 安装rrdtool yum -y install rrdtool 安装net-snmp yum -y install net-snmp 编辑net-snmp配置文件 vim /etc/snmp/snmpd.conf +55 #修改: view system

超级web服务器yum 安装apache+源码编译tomcat+awstat+phpmadin+mysql+php+AB压力测试

实验环境: 两台机器:Centos6.4 机器一: 192.168.56.10  安装httpd  php   等整合 机器二: 192.168.56.11 安装 mysql ======================================================================================== (iptables -t nat -I PREROUTING -d 外IP -p tcp -m tcp --dport 端口 -j DNAT --

利用yum 安装 lamp环境搭载 cacti监控和memcached数据库

今天测试了一下yum安装lamp和cacti监/控已经memcached数据库 首先介绍下我的系统环境 centos6.7 x86-64 1安装cacti yum install cacti 安装cacti 会自动安装lamp环境, 2接下来是memcached的安装步骤 yum install -y epel-release  --安装epel扩展源 里面有提供memcached libmemcached包 yum install -y libevent  memcached libmemca

CentOs安装cacti

虚拟机地址 192.168.24.69, 附件中的三个文件可以用SSH FILE工具上传到root文件夹下,方便后续操作 一.安装所需要的软件(1)在主监控机上安装apache+php+gd的web环境,推荐编译安装,在此直接用yum安装. #yum install -y php php-mysql php-snmp mysql mysql-server net-snmp net-snmp-libs net-snmp-utils php-pdo perl-DBD-MySQL(2)在主监控机上安装

YUM安装调试以及命令详解

背景,需要安装cacti,google了很多安装资料,需要先yum安装一些准备lib包,比如snmp以及openssl等等. [[email protected] ~]# yum install net-snmp-devel Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Setting up Install Process No p

Centos6 yum安装openldap+phpldapadmin+TLS+双主配置

原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%85%8D%E7%BD%AE.html 钿畑的文章索引 1.概念介绍 2. 环境介绍 2. 准备工作 3. yum部署ldap 4. phpldapadmin安装 5.ldap客户端配置 6.用户目录自动挂载 6.1 服务器端配置 6.2 客户端配置 7.配置TLS传输加密 8.配置openldap双