How to install cacti on centos 6
Cacti – Network and performance monitoring tool
Cacti is one of best monitoring tool used to monitor network, CPU load, memory, Disk and other services.
Cacti uses PHP for front end, RRDTool for graphing and mysql for storage.
Cacti installation on centos requires LAMP setup and SNMP.
Install cacti on centos 6.
Before installing cacti, first we need to setup apache with php, mysql and SNMP services. you can also refer this post (Installing Apache2 , Mysql server and PHP on Centos 6 (LAMP)) for complete LAMP setup.
Install apache, php and mysql
注意 : 新版本Cacti要求版本在5.6以上
Install cacti on centos 6.
Step 1 » Issue the below command to install apache, php and mysql.#####[root@krizna ~]# yum install mysql-server mysql php php-mysql httpd
[root@krizna ~]# yum install httpd
下载安装最新的rpm文件
rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

- 6
安装MySQL,输入命令:
yum install mysql-community-server
Step 2 » Start mysql and apache service[root@krizna ~]# chkconfig --level 235 httpd on
[root@krizna ~]# service httpd start
[root@krizna ~]# chkconfig --level 235 mysqld on
[root@krizna ~]# service mysqld start
Setup mysql server
Step 3 » Issue the below command to create mysql root password.[root@krizna ~]# mysqladmin -u root password 'newpassword'
[and]
issue this command to secure your mysql database.[root@krizna ~]# /usr/bin/mysql_secure_installation
Step 4 » Create new database “cactidb” and username/password to access “cactidb” database .[root@krizna ~]# mysql -u root -pmysql> create database cactidb;
Query OK, 1 row affected (0.00 sec)mysql> GRANT ALL ON cactidb.* TO usercacti@localhost IDENTIFIED BY 'passwordcacti';
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Here “usercacti” is the username and “passwordcacti” is the password to access “cactidb” database.
Install SNMP
Step 5 » Now install SNMP by typing the below command.[root@krizna ~]# yum install net-snmp-utils php-snmp net-snmp-libs
Step 6 » Rename the original snmpd.conf file and create a new one .[root@krizna ~]# mv /etc/snmp/snmpd.conf snmpd.conf.org
[root@krizna ~]# touch /etc/snmp/snmpd.conf
Step 7 » Add the below lines to /etc/snmp/snmpd.conf ( New file ).
|
1
2
3
4
5
6
7
8
|
com2sec local localhost public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
view all included .1 80
access MyRWGroup "" any noauth exact all all none
syslocation srvroom , linux monitor
syscontact krizna (admin@krizna.com)
|
Step 8 » Now start the snmp service[root@krizna ~]# chkconfig --level 235 snmpd on
[root@krizna ~]# service snmpd start
Step 9 » Issue the below command to test your snmp config[root@krizna ~]# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.192.168.1.10 = INTEGER: 2
You should able to get your ip details .
Install Cacti
For installing cacti through yum , you must enable EPEL repository. you can find latest EPEL repository rpm here ( http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/repoview/epel-release.html )
Step 10 »Install the latest EPEL rpm .[root@krizna ~]# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
Step 11 » Install cacti through yum[root@krizna ~]# yum install cacti
Configure cacti
Step 12 » Now import cacti database tables from the file cacti.sql . Issue the below command to find the location of cacti.sql file.[root@krizna ~]# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8a/cacti.sql
Issue the below command to import tables to cactidb[root@krizna ~]# mysql -u root -p cactidb < /usr/share/doc/cacti-0.8.8a/cacti.sql
Step 13 » Now open /etc/cacti/db.php file and edit the below lines .
|
1
2
3
4
|
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "usercacti";
$database_password = "passwordcacti";
|
Step 14 » Open /etc/httpd/conf.d/cacti.conf file and comment all “Deny from all” lines.
Step 15 » open /etc/cron.d/cacti file and uncomment the line .*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Step 16» Now restart apache and cron services[root@krizna ~]# service httpd restart
[root@krizna ~]# service crond restart
Step 17» Now open http://serverip/cacti in your browser , you can see the cacti installation page.
if you are not getting installation page , Disable the firewall ( iptables ) and selinux service on your server .
Disable firewall ( Iptables ) »[root@krizna ~]# service iptables stop
[root@krizna ~]# chkconfig iptables off
Disable Selinux » open the file /etc/selinux/config and find the lineSELINUX=enforcing
and replace withSELINUX=disabled
now reboot the server and try again.
After getting installation page, proceed with the default values and make sure all the binary paths are found as per the below image.
upon completion, you can see the login prompt .
Step 18» The default username and password for cacti is admin/admin. you will be forced to change the password at first login.
Step 19» After login . Choose – > Devices – > Localhost and find “SNMP Options“. select SNMP Version -> “Version 2” and SNMP Community -> public and click the “save” button at the bottom.
Step 20» Now you can see the SNMP information at the TOP . Click “Create Graphs for this Host” and choose Graph Types:-> ALL and choose all the check boxes as below and press “create“. Now choose the colour option ( Leave as it is ) and press “create“.
After few minutes , you can see the initial stage of graphs for localhost in the Graphs section . after few hours you can see the graphs like below .
Adding linux machines
» Follow steps 5,6,7,8 and 9 ( In client ).
» Now in cacti , “Create devices” and Add description and hostname (or) IP .
» Choose “Host Template” as “Local linux machine”.
» Under SNMP Options select SNMP Version -> “Version 2” and SNMP Community -> public and click the “save” button at the bottom.
» Follow step 20
» Add the device to the Graph tree.
Adding Windows machines
» Enable SNMP service ( Refer this post)
» Make sure you added community name “public” and allowed your Cacti server IP.
» Now in cacti , “Create devices” and Add description and hostname (or) IP .
» Choose “Host Template” as “Windows 2000/XP host”.
» Under SNMP Options select SNMP Version -> “Version 2” and SNMP Community -> public and click the “save” button at the bottom.
» Follow step 20
» Add the device to the Graph tree.
Good luck
How to install cacti on centos 6的更多相关文章
- How To Install Java on CentOS and Fedora
PostedDecember 4, 2014 453.8kviews JAVA CENTOS FEDORA Introduction This tutorial will show you how ...
- Install Redis on CentOS 6.4--转
Install Redis on CentOS 6.4 source:http://thoughts.z-dev.org/2013/05/27/install-redis-on-centos-6-4/ ...
- Install ssdb-rocks on CentOS 6
Install ssdb-rocks on CentOS 6 C.C. 发表于 2014年08月10日 20:14 | Hits: 649 为了优化节操精选的弹幕系统,打算更换到Facebook的R ...
- How to install cacti With Nginx
转载于:https://github.com/blackyboy/Ubuntu-Linux-Stuffs/blob/master/How-to-install-Cacti-Monitoring-Ser ...
- Steps to Install Hadoop on CentOS/RHEL 6---reference
http://tecadmin.net/steps-to-install-hadoop-on-centosrhel-6/# The Apache Hadoop software library is ...
- How to install MP4box on CentOS 6
How to install MP4box on CentOS 6 MP4Box is a MP4 multiplexer. It can import MPEG-4 video, DivX, Xvi ...
- How to Install MySQL on CentOS 7
CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-communit ...
- How to install Jenkins on CentOS 7
How to install Jenkins on CentOS 7 on March 3, 2018 by AmirLeave a comment Introduction Jenkins is a ...
- How To Install Cacti On Ubuntu 14
How To Install Cacti On Ubuntu 14.04/14.10 by anismaj Cacti is an open source web based network moni ...
随机推荐
- 转mysql横向扩展和纵向扩展
Scale-up(纵向扩展)和Scale-out(横向扩展)的解释 谈到系统的可伸缩性,Scale-up(纵向扩展)和Scale-out(横向扩展)是两个常见的术语,对于初学者来说,很容易搞迷糊这两个 ...
- p-value值的认识
待续:https://www.zhihu.com/question/21429785/answer/147047565
- 十六 web爬虫讲解2—PhantomJS虚拟浏览器+selenium模块操作PhantomJS
PhantomJS虚拟浏览器 phantomjs 是一个基于js的webkit内核无头浏览器 也就是没有显示界面的浏览器,利用这个软件,可以获取到网址js加载的任何信息,也就是可以获取浏览器异步加载的 ...
- JQuery对象与javascript对象的转换
jQuery 对象是通过 jQuery 包装DOM 对象后产生的对象. jQuery 对象是 jQuery 独有的,其可以使用 jQuery 里的方法,但是不能使用 DOM 的方法:例如: $(&qu ...
- python----tkinterm模块
python tkinter学习——布局 目录 一.pack() 二.grid() 三.place() 四.Frame() 正文 布局 一.pack() pack()有以下几个常用属性: side ...
- Linux下安装Nginx教程
什么是Nginx? Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器,在高连接并发的情况下N ...
- 1: 介绍Prism5.0(纯汉语版)
Prism帮助更简单的设计丰富,灵活,易维护的WPF桌面程序.其中使用MVVM,组合式视图,事件聚合等设计模式.这很符合一些重要的架构设计及原则.帮助你创建一个模块化的应用程序——可以独立开发松耦 ...
- 制作smarty模版缓存文件
<?php$p = 1;if(!empty($_GET["page"])){ $p = $_GET["page"];} $filename = " ...
- Lua基础---迭代器
官方的文档说: 迭代器(iterator)是一种对象,它能够用来遍历标准模板库容器中的部分或全部元素,每个迭代器对象代表容器中的确定的地址 在Lua中迭代器是一种支持指针类型的结构,它可以遍历集合的每 ...
- iad 集成三两事
1. 好像是随着ios8的beta开始. iad 已经发生了一些变化. 比如找不到enable iad network 的按钮了. 貌似是不需要手动去 enable 了. 只需要嵌入 iad fra ...