In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to install and configure Cacti. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Introduction to Cacti
Cacti is a software implemented in PHP language. It uses snmp services to obtain data, uses rrdtool to store and update data, and uses rrdtool to generate charts and present them to users when they need to view the data. Therefore, snmp and rrdtool are the key to cacti. Snmp is related to data collection, and rrdtool is related to data storage and chart generation.
Mysql cooperates with PHP program to store some variable data and call it, such as hostname, host ip, snmp community name, port number, template information and other variables.
The data captured by snmp is not stored in mysql, but in the rrd file generated by rrdtool (in the rra folder of the cacti root directory). The update and storage of data by rrdtool is the processing of rrd files.
Main functions of Cacti
Graphical Analysis tool for Network Traffic Monitoring
How to use Cacti
Install rrdtool
CentOS-5:
Rpm-ivh http://apt.sw. Be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
Yum install rrdtool-y
CentOS-6:
Rpm-ivh http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Yum install rrdtool-y
Install and configure net-snmp
1. Install net-snmp
Yum install net-snmp net-snmp-libs net-snmp-utils
2. Configure net-snmp
Modify:
View systemview included .1.3.6.1.2.1.1
Are:
View systemview included .1.3.6.1.2.1
3. Test net-snmp
# service snmpd start
# snmpwalk-v 1-c public localhost .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux cronos 2.4.28 # 2 SMP ven jan 14 14:12:01 CET 2005 i686
Install LAMP
Yum install httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server
Service httpd start
Service mysqld start
Mysqladmin-uroot password yourpassword
Mysqladmin-user=root-password reload
Install cacti
1. Download cacti
Cd / tmp
Wget http://www.cacti. Net/downloads/cacti-0.8.8a.tar.gz
Tar xzf cacti-0.8.8a.tar.gz
Mv cacti-0.8.8a / var/www/html/cacti
Cd / var/www/html/cacti
2. Create a database
Mysqladmin-- user=root-p create cacti
3. Import the database
Mysql-uroot-p cacti
< cacti.sql 4、创建数据库用户 shell>Mysql-uroot-p mysql
Mysql > GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipassword'
Mysql > flush privileges
5. Configure include/config.php
$database_type = "mysql"
$database_default = "cacti"
$database_hostname = "localhost"
$database_username = "cactiuser"
$database_password = "cactipassword"
/ * load up old style plugins here * /
$plugins = array ()
/ / $plugins [] = 'thold'
/ *
Edit this to point to the default URL of your Cacti install
Ex: if your cacti install as at http://serverip/cacti/ this
Would be set to / cacti/
, /
$url_path = "/ cacti/"
/ * Default session name-Session name must contain alpha characters * /
# $cacti_session_name = "Cacti"
6. Set directory permissions
Chown-R cactiuser rra/ log/
Cactiuser is the user that exists in the system, in order to collect data.
7. Configure scheduled tasks
Echo "* / 5 * cactiuser php / var/www/html/cacti/poller.php > / dev/null 2 > & 1" > / etc/crontab
Service crond restart
8. Complete the installation of cacti
1) enter: http://www.yourdomain. in the browser Com/cacti/
Default user name: admin password: admin
2) change the password
3) set the command path used by cacti
At this point, the installation is complete.
This is the end of the article on "how to install and configure Cacti". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.