1 Cacti Operating Environment preparation
Cacti need php+apache+mysql+snmp+rrdtool, as well as cacti itself. Cacti ontology is a Web site developed with PHP that collects remote device information via SNMP. Apache+mysql+php has been done before, the link is as follows:
Http://www.cnblogs.com/cation/p/8882910.html
Only the remaining parts are installed here.
2 Installing SNMP
Yum Install-y net-snmp*
Vi/etc/snmp/snmpd.conf
COM2SEC notconfiguser Default public//change default to 127.0.0.1
Access Notconfiggroup "" Any noauth exact systemview none//change SystemView to all
#view all included. 1//Remove # Comments
Systemctl start SNMPD
Systemctl Enable SNMPD
3 Installing RRDtool
Yum Install LIBART_LGPL Libart_lgpl-devel
Yum Install rrdtool.x86_64 rrdtool-devel.x86_64
4 Installing the relevant Lib
Yum install gcc glibcglibc-common Cairo Pango zlib zlib-devel freetype freetype-devel gd gd-devel
5 MySQL Configuration
MYSQL-UROOT-P//Login MySQL
Create database cacti CHARSET
‘utf8‘
;
//library for creating cacti
GRANT ALL ON cacti.* TO [email protected]
‘127.0.0.1‘
IDENTIFIED BY
‘cactipass‘
; //创建cactiuser并赋权
6 Download and install cacti
Download cacti-0.8.8f.tar.gz on cacti website
Copy to Apache's WWW directory and unzip the package
cd/var/www/html/
Tar xvf cacti-0.8.8f.tar.gz
MV cacti-0.8.8f cacti//directory rename
Cd/var/www/html/cacti
MySQL cacti <cacti.sql//Initialize cacti database
Useradd cactiuser//create cacti User
Chown-r Cactiuser:cactiuser/var/www/html/log/var/www/html/rra//Modify access permissions for a directory
Vim/etc/php.ini
Date.timezone =asia/shanghai//Modify PHP time zone
Systemctl Restart httpd//restart Apache
7 in-browser input
Http://ip/cacti starting the Cacti installation configuration
Follow the prompts to configure or package the installation
Reference
Https://www.linuxidc.com/Linux/2017-10/147672.htm
Https://www.linuxidc.com/Linux/2013-11/92797.htm
4011888
76607762
Https://www.cnblogs.com/biboxie/p/4233256.html
Cacti installation under Linux (CENTOS7)