Linux Monitoring---installation cacti

Source: Internet
Author: User
Tags add time rrdtool snmp

1.CACTI Introduction

650) this.width=650; "style=" margin-bottom:-1.4em;vertical-align:middle; "src=" http://image3.135editor.com/cache/ remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpei9jwlyyafjwdufqawfpy211rwlidzvts1brsgxqvuzuvfy1mm41renrvtlnywlhazjcckg5a3hxevnhbxfdo Hjpqk9pyzzldu1nshbqelpuawnmee9pyxlqrwlirefnlza= "alt=" ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpei9j "/>

Cacti in English means the meaning of cactus, cacti is a set of PHP, MySQL, SNMP and rrdtool development of network traffic monitoring graphical analysis tools. The main function is to use the SNMP service to obtain the data, and then use RRDtool to store and update the data, when the user needs to view the data with the RRDtool to generate a chart presented to the user.

2.CACTI Pre-Installation Preparation

1 Installing SNMP

[Email protected]~]# yum install-y net-snmp* (Note: This is all of NET-SNMP's packages)

To see if there is a default configuration file:

[[Email protected]~]# ll/etc/snmp/snmpd.conf

To modify the configuration file for SNMP:

[Email protected] ~]# cd/etc/snmp/

[[email protected] snmp]# CP Snmpd.conf{,.bak}//Backup

[Email protected] snmp]# vim snmpd.conf

Modify the following:

1) com2sec notconfiguser default public

(change default to 127.0.0.1)

2) Access Notconfiggroup "" Any noauth exact systemview none None ( change SystemView to all)

3) #view all included. 1 ( Remove the previous #)

Save and start SNMP:

[Email protected] snmp]# Systemctl STARTSNMPD

Check ports and processes

650) this.width=650; "src=" Http://qdn.135editor.com/files/users/316/3160019/201710/5RRJjLLU_kXqu.png "alt=" 2.png " />

Testing the SNMP Service

[Email protected] snmp]# snmpget-v 1-c publiclocalhost system.sysuptime.0



2. Installing RRDtool

1 Installing LIBART_LGPL

[Email protected]~]# yum Install LIBART_LGPL libart_lgpl-devel

2 Installing RRDtool

[Email protected]~]# Yum install-yftp://rpmfind.net/linux/centos/7.3.1611/os/x86_64/packages/ rrdtool-1.4.8-9.el7.x86_64.rpmftp://rpmfind.net/linux/centos/7.3.1611/os/x86_64/packages/ rrdtool-devel-1.4.8-9.el7.x86_64.rpm


3.yum Installation Lamp Environment

1 Installing Apache

[email protected] ~]# Yum install-y httpdhttpd-devel

2 Installing the Database mariadb

[email protected] ~]# Yum install-y mariadbmariadb-server

3 Installing PHP

[email protected] ~]# Yum install phpphp-mysql Php-common php-gd php-xml–y

4 Installing the relevant Lib library

[email protected] ~]# yum install gcc glibcglibc-common Cairo Pango zlib zlib-devel FreeType freetype-devel gd-y

5 Installing Gd-devel

[email protected] ~]# Yum Install-ygd-devel

(No rhel6 required to download manual installation, not required in RHEL7)

6Apache operation

1) launch Apache and check

[Email protected] ~]# systemctl start httpd

[[email protected] ~]# lsof-i: 80

[Email protected] ~]# NETSTAT-LNTP | grep 80

2) test file

[Email protected]~]# echo-e "<?php \nphpinfo (); \n?> ">/var/www/html/index.php

(Access HTTP://IP in the browser, the PHP page appears to indicate that the installation is normal)

[Email protected]~]# rm-rf/var/www/html/index.php// Delete a test file

7. Database Operations

1) Start and test the database

[email protected] ~]# Systemctl startmariad [email protected] ~]# lsof-i: 3306

[Email protected] ~]# NETSTAT-LNTP | grep3306

2) Create the cacti database and view

3) Create Cactiuser user and authorize

[Email protected] ~]# mysql-e "Grantall on cacti.* to [e-mail protected] identified by ' Cactiuser ';"

[[email protected] ~]# mysqladminflush-privileges//Refresh Permissions table


4. Install and configure the cacti

1) Unzip

[Email protected] ~]# tar xfcacti-0.8.8f.tar.gz-c/var/www/html/

[Email protected] ~]# cd/var/www/html/

[[email protected] html]# LN-SV cacti-0.8.8f/cacti//Make a soft connection

2) Initialize the cacti database

[Email protected] html]# CD cacti

[email protected] cacti]# MySQL cacti <cacti.sql

3) Modify the cacti configuration file

There is no need to modify this because of the configuration that was previously set.

Path: Vim include/config.php

4) Create cacti user access to cacti's Rra and log permissions [email protected] cacti]# useradd cactiuser[[email protected] cacti]# chown-rcactiuser:cactiuser log/rra/

5) Modify/etc/php.ini, add time zone setting

[Email protected] cacti]# Vim/etc/php.ini

;d Ate.timezone = changed to Date.timezone =asia/shanghai

To restart Apache:

[Email protected] cacti]# Systemctl restarthttpd

6) Switch User actions [email protected] cacti]# Su–cactiuser

[[email protected] ~]$/usr/bin/php/var/www/html/cacti/poller.php//Capture results are saved under RRA, logs are recorded under log

5. Page configuration cacti

The browser input http://ip/cacti will appear

650) this.width=650; "src=" Http://qdn.135editor.com/files/users/316/3160019/201710/4d9GKahJ_PNRP.png "alt=" Go to. png "/>

Click Next, if configured correctly then all will turn blue, otherwise it will appear red

650) this.width=650; "src=" Http://qdn.135editor.com/files/users/316/3160019/201710/pyTdIP89_cbCJ.png "alt=" 4.png " />

Click on the bottom right corner of the Finsh, the login screen will appear, the system's default first login username and password are admin

650) this.width=650; "src=" Http://qdn.135editor.com/files/users/316/3160019/201710/xTZOHBkd_VL2J.png "alt=" 5.png " />

For security reasons, the system will force a password change on the first login

650) this.width=650; "src=" Http://qdn.135editor.com/files/users/316/3160019/201710/Ewb668XY_4Fcj.png "alt=" 6.png " />

Finally, the login is successful interface.

650) this.width=650; "src=" Http://qdn.135editor.com/files/users/316/3160019/201710/H4JeJZDY_qFsO.png "alt=" 7.png " />



This article is the operation under the CentOS7.3, Reprint please contact the author


This article from the "13382604" blog, reproduced please contact the author!

Linux Monitoring---installation cacti

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.