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 install -y cacti  net-snmp  net-snmp-utils  rrdtool
[[email protected] ~]# /etc/init.d/mysqld start
[[email protected] ~]# /etc/init.d/httpd  start
[[email protected] ~]# /etc/init.d/snmpd start
[[email protected] ~]# vim /etc/httpd/conf.d/cacti.conf
//修改
...
...
Deny from all    //change to --> Allow from all
[[email protected] ~]# /etc/init.d/httpd  restart
[[email protected] ~]# mysql -uroot
...
...
mysql> create database cacti;
mysql> grant all on cacti.* to ‘cacti‘@‘127.0.0.1‘ identified by ‘cacti‘;
mysql> quit
Bye
[[email protected] ~]# mysql -uroot cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
[[email protected] ~]# vim /usr/share/cacti/include/config.php
//according to the following to change
$database_type = "mysql";
$database_default = "cacti";
$database_name = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
$database_ssl = false;

web访问cacti并安装

//http://ip/cacti/  --> next --> next  --> Finish 

//回到Linux页面执行
[[email protected] ~]# /usr/bin/php /usr/share/cacti/poller.php
OK u:0.00 s:0.00 r:0.00
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.05
OK u:0.00 s:0.00 r:0.08
06/13/2015 09:59:49 PM - SYSTEM STATS: Time:0.1974 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
[[email protected] ~]# crontab -e
# 让命令每5分钟执行一次
*/5 * * * * /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
//点击 Graphs--> Default Tree --> Host Localhost

已经有图有数据了!!

// 在需要被监控的客户端执行
[[email protected] ~]# yum install -y net-snmp
[[email protected] ~]# vim /etc/snmp/snmpd.conf
//ADD
//syslocation --> 本机ip  syscontact --> 管理员邮箱
...
...
#syslocation Unknown (edit /etc/snmp/snmpd.conf)
syslocation 192.168.1.118
syscontact Root 1212@1212.com
...
[[email protected] ~]# service  snmpd  start

开始添加被监控主机的信息,填写完毕,点击Create

创建完毕,看是否通信正常,创建完主机,创建要监控的项目点击 Create Graphs for this Host

根据需要,去选择要监控的项目

如果没有出现可被监控的项目,可点击上面的run...再回到这个页面

监控项目添加完毕,将主机添加到监控主干线上,点击左侧Graph Trees

点击Add,添加被监控的主机

类型选择Host,再选择要添加的主机

添加完毕,点击Save

//到Linux界面再配置
[[email protected] ~]# /usr/bin/php /usr/share/cacti/poller.php --force
OK u:0.00 s:0.00 r:0.00
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.05
OK u:0.00 s:0.00 r:0.08
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.09
OK u:0.00 s:0.00 r:0.10

//再将页面刷新

时间: 2024-10-25 18:06:25

cacti (可以利用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

liunx利用yum安装php mysql gd(LAMP服务器)

说明:我在84vps中利用yum顺利安装mysql php 及gd库,因为vps本身自带了apahce2.2所以没有apache安装过程 工具/原料 Linux系统服务器,或VPS 系统:Centos6.0 32位.这里我也试过6.3 64位也是一样可以. 方法/步骤 一.安装mysql #yum -y install mysql mysql-server mysql-devel 配置mysql开机启动服务 #chkconfig --add mysqld    (在服务清单中添加mysql服务)

解决RedHat5.8无法利用yum安装软件问题

解决RedHat5.8无法利用yum安装软件问题 好久都没有用红帽系统了,今天在睿江云安装部署Sybase,在RedHat5.8的环境需要测试,用yum安装gcc结果如下: [[email protected] ~]# yum -y install gcc Loaded plugins: katello, product-id, security, subscription-manager Updating certificate-based repositories. Unable to re

利用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

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 [[emai

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

linux系统利用yum安装其他软件或服务

1.下载yum的配置源(最好用网易163的源,也可以使其他的源) wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo 下载到 /etc/yum.repos.d/ 目录下面或者wget http://mirrors.163.com/.help/CentOS6-Base-163.repo 下载到 /etc/yum.repos.d/ 目录下面 2.编辑CentOS6-Base-163.repo把文件里面的$releasever全部替换为6

LInux_CentosOS中yum安装jdk及配置环境变量

系统版本 [[email protected] ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) #安装之前先查看一下有无系统自带jdk rpm -qa |grep java rpm -qa |grep jdk rpm -qa |grep gcj #如果有就使用批量卸载命令 rpm -qa | grep java | xargs rpm -e --nodeps 直接yum安装1.8.0版本openjdk [[emai

centos yum 安装jdk后配置JAVA_HOME

centos6.4 yum 安装jdk和JAVA_HOME的设置 2014-06-17 16:13 1176人阅读 评论(0) 收藏 举报  分类: linux(3)  版权声明:本文为博主原创文章,未经博主允许不得转载. #yum search jdk 查找可用的安装的jdk包 查询结果有以下两项(较新的版本): Java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.7.0-openjdk-devel.x86_64 : O