Prerequisite: The lamp has been compiled and installed (mysql5.5)
First, configure the service side
1, note the central host, and enable the virtual host, add a virtual host
# cd/etc/httpd/
# Vim Httpd.conf
Commented out: DocumentRoot "/usr/local/apache/htdocs"
Enable: # Virtual hosts
Include/etc/httpd/extra/httpd-vhosts.conf
# vim/etc/httpd/extra/httpd-vhosts.conf
<virtualhost *:80>
DocumentRoot "/web/vhosts/cacti"
ServerName cacti.fsy.com
<directory "/web/vhosts/cacti" >
Options Indexes
allowoverride None
Require all granted
</Directory>
Errorlog "Logs/cati-error_log"
Customlog "Logs/cacti-access_log" common
</VirtualHost>
2, install RRDtool Collection tool
1) Install the RRDtool before installing the appropriate Lib library, the following installation:
# yum Install cairo-devel libxml2-devel Pango pango-devel–y
2)
# tar Xzf rrdtool-1.4.5.tar.gz
# CD rrdtool-1.4.5
#./configure--prefix=/usr/local/rrdtool/
# make && make install
#/usr/local/rrdtool/bin/rrdtool
You can now display the RRDtool version, indicating that the installation was successful!
3) Create a link
# ln-s/usr/local/rrdtool/bin/*/usr/local/bin/
3. Install SNMP Service
# yum Install Net-snmp net-snmp-utils–y
4, the initial installation of cacti
# mkdir-p/web/vhosts
# Tar XF cacti-0.8.8a.tar.gz-c/web/vhosts
# cd/web/vhosts/
# LN-SV cacti-0.8.8a Cacti
# Service httpd Restart
5. Initialize the database and create the user
# CD Cacti
# mysqladmin creat cactidb
# MySQL Cactidb < cacti.sql
# MYSQL-E "GRANT all on cactidb.* to [e-mail protected] identified by ' Cactiuser '"
# mysqladmin Flush-privileges
6, modify the cacti configuration file
# CD include/
# Vim config.php
Modify the following two items
$database _default = "CACTIDB";
$url _path = "/";
7. Create execution user Cactiuser, and modify directory owner and owner group
#/WEB/VHOSTS/CACTI
# Useradd Cactiuser
# chown-r Cactiuser:cactiuser Rra/log
8, installation cacti
Configure local domain name resolution to add the following
202.207.178.6 cacti.fsy.com
Then visit cacti.fsy.com to start the installation
Because lamp is compiled and installed, cacti will be/usr/local/php/bin/php when installing the
The default user name and password are admin
9. Define the task schedule for Cactiuser and test
If there is no crontab, need to install vixie-crons Crontabs
1) define the task schedule and execute once every five minutes poller.php
# echo ' */5 * * * * */usr/local/php/bin/php/web/vhosts/cacti/poller.php &>/dev/null ' >/var/spool/cron/ Cactiuser
2) Change the time zone for the task plan to execute smoothly
# Vim/etc/php.ini
Modify the following content:
Date.timezone = Asia/shanghai
3) Testing
# Su-cactiuser
$/usr/local/php/bin/php/web/vhosts/cacti/poller.php
Second, configure the monitored Linux Host
1. Modify the configuration file
# vim/etc/snmp/snmpd.conf
Change 62 lines to the following so that all can be accessed:
Access Notconfiggroup "" Any noauth exact none none
Change 41 lines to the following to allow the server to capture its data
Com2sec notconfiguser 202.207.178.6 Public
Enable 65 rows
View all included. 1 80
2. Start the service
# Servcie SNMPD Restart
On the server-side Operation Web page, configure
Welcome to criticize and correct!
This article is from the "10917734" blog, please be sure to keep this source http://10927734.blog.51cto.com/10917734/1884592
Installation configuration cacti