Redhat 5.8 Mounting Cacti 0.8.8c

Source: Internet
Author: User
Tags add time cairo rrdtool snmp

I. Introduction of CACTI

Cacti is a set of graphical analysis tools for network traffic monitoring based on PHP,MYSQL,SNMP and RRDtool development.

Simply put, cacti is a PHP program. It uses the SNMP protocol to obtain remote network devices and related information, (in fact, using the NET-SNMP software package snmpget and Snmpwalk command) and through the RRDtool tool drawing, through the PHP program to show. We use it to show the status or performance trend of a monitored object over time.


II. Preparation and configuration

1. Prepare the required packages, Apache, MySQL, PHP, SNMP through yum installation

RRDtool Official website: http://oss.oetiker.ch/rrdtool/

Cacti Official website: http://www.cacti.net/


[[Email protected] ~] #yum-y install httpd

[[Email protected] ~] #yum-y install MySQL mysql-server mysql-devel

[[Email protected] ~] #yum-y install php php-devel php-mysql php-pdo PHP-GD

[[Email protected] ~] #yum-y install net-snmp php-snmp net-snmp-utils net-snmp-devel Net-snmp-perl


[[Email protected] ~] #yum-y install gcc gcc-c++

[[Email protected] ~] #yum-y install Libxml2-devel


[[Email protected] ~] #yum-y install pango-devel Pango

Error: Because my yum can not install these two files, I installed a CD-ROM

Pango-devel-1.14.9-8.el5.centos.3.i386 from base have depsolving problems

--Missing Dependency:pango = 1.14.9-8.el5.centos.3 is needed by package pango-devel-1.14.9-8.el5.centos.3.i386 (BAS E

Error:missing Dependency:pango = 1.14.9-8.el5.centos.3 is needed by package pango-devel-1.14.9-8.el5.centos.3.i386 (BAS E

You could try using--skip-broken to work around the problem

You could try Running:package-cleanup--problems

Package-cleanup--dupes

Rpm-va--nofiles--nodigest


Mount the disc to/mnt

[[Email protected] ~] #mount/dev/cdrom/mnt/

[Email protected] ~]# find/mnt/-name "pango*rpm"

[Email protected] ~]#/mnt/centos/pango-1.14.9-6.el5.centos.i386.rpm

[Email protected] ~]#/mnt/centos/pango-devel-1.14.9-6.el5.centos.i386.rpm


[[Email protected] ~] #rpm-ivh/mnt/centos/pango-1.14.9-6.el5.centos.i386.rpm


[[Email protected] ~] #rpm-ivh/mnt/centos/pango-devel-1.14.9-6.el5.centos.i386.rpm

And it's because there's a dependency.

[Email protected] ~]# rpm-ivh/mnt/centos/pango-devel-1.14.9-6.el5.centos.i386.rpm

error:failed dependencies:

Cairo-devel >= 1.2.2 is needed by pango-devel-1.14.9-6.el5.centos.i386

Fontconfig-devel >= 2.0 is needed by pango-devel-1.14.9-6.el5.centos.i386

Freetype-devel >= 2.1.3-3 is needed by pango-devel-1.14.9-6.el5.centos.i386

Glib2-devel >= 2.12.0-1 is needed by pango-devel-1.14.9-6.el5.centos.i386

Libx11-devel is needed by pango-devel-1.14.9-6.el5.centos.i386

Libxext-devel is needed by pango-devel-1.14.9-6.el5.centos.i386

Libxft-devel is needed by pango-devel-1.14.9-6.el5.centos.i386

Libxrender-devel is needed by pango-devel-1.14.9-6.el5.centos.i386


[[Email protected] ~] #yum-y install cairo-devel fontconfig-devel freetype-devel glib2-devel libx11-devel libxext-devel L Ibxft-devel Libxrender-devel


Continue installation

[[Email protected] ~] #rpm-ivh/mnt/centos/pango-devel-1.14.9-6.el5.centos.i386.rpm


2. installing rrdtool

[[Email protected] ~] #tar zxvf rrdtool-1.4.5.tar.gz

[[Email protected] ~] #cd rrdtool-1.4.5

[Email protected] ~]#./configure--prefix=/usr/local/rrdtool

[[Email protected] ~] #make && make install

[[Email protected] ~] #ln-S/usr/local/rrdtool/bin/*/usr/local/bin/


3. Installing cacti

[[Email protected] ~] #tar zxvf cacti-0.8.8c.tar.gz

[[Email protected] ~] #useradd-D/var/www/html/cacti cacti-s/sbin/nologin

[[Email protected] ~] #mv cacti-0.8.8c/*/var/www/html/cacti

[[Email protected] ~] #chown-R cacti:cacti/var/www/html/cacti

[[Email protected] ~] #chmod 755-r/var/www/html/cacti


4. Install the poll: Cacti-spine

[[Email protected] ~] #tar zxvf cacti-spine-0.8.8c.tar.gz

[[Email protected] ~] #cd cacti-spine-0.8.8c

[Email protected] ~]#./configure--prefix=/usr/local/spine

[[Email protected] ~] #make && make install


Error:

[Email protected] cacti-spine-0.8.8c]#/configure--prefix=/usr/local/spine

Checking build system Type ... I686-pc-linux-gnu

Checking host system Type ... I686-pc-linux-gnu

Checking for a bsd-compatible install .../usr/bin/install-c

Checking whether build environment is sane ... configure:error:newly created file is older than distributed files!

Check Your system clock


Set time March 6, 2015 16:21

[[email protected] ~]# date-s "2015-03-06 16:21:40"

After modifying, enter: [[email protected] ~] #clock-W

Write system time to CMOS


5. Copy the configuration file

[[Email protected] ~] #cp/usr/local/spine/etc/spine.conf.dist/usr/local/spine/etc/spine.conf


6. Restart the service

[[Email protected] ~] #service httpd restart

[[Email protected] ~] #service snmpd Restart

[[Email protected] ~] #service mysqld Restart


7. Change the root password of MySQL

[[email protected] ~]#/etc/init.d/mysqld start

Modify the MySQL root password to 123456

[[Email protected] ~] #mysqladmin-u root password "123456"


Log in to MySQL test

[[Email protected] ~] #mysql-uroot-p123456



8. Configure and import the database

Mysql> CREATE DATABASE cacti default character set UTF8;

Mysql> GRANT All privileges the cacti.* to [e-mail protected] identified by ' 123456 ';

mysql> flush Privileges;

[Email protected] ~]# mysql-uroot-p cacti</var/www/html/cacti/cacti.sql


9. Modify the PHP configuration file

[[Email protected] ~] #vi/etc/php.ini

Add time zone: Date.timezone = Asia/shanghai

Scheduled Tasks (important here, error may cause your Web monitoring to not refresh)

*/1 * * * */usr/bin/php/var/www/html/cacti/poller.php >/var/log/cacti.log 2>&1


10. Modify the Cacti configuration file

[[Email protected] ~] #vi/var/www/html/cacti/include/config.php

$database _type = "MySQL";

$database _default = "cacti";

$database _hostname = "localhost";

$database _username = "cacti";

$database _password = "123456";

$database _port = "3306";

$database _ssl = false;


11. Modify the Rotation configuration file:

# vi/usr/local/spine/etc/spine.conf

Db_host localhost

Db_database cacti

Db_user cacti

Db_pass 123456

Db_port 3306

Db_preg 0


12. Set SELinux to Disabled

[Email protected] ~]# Cat/etc/selinux/config

[[Email protected] ~] #setenforce 0


13. Accessing the Web

http://192.168.88.150/cacti/

Installation complete, the default user name and password is admin, the first logon will require the password change


14. Plan to wait for a while

See if there are graphs, no curves, restart apache,/usr/bin/php/var/www/html/cacti/poller.php

Tail-f/var/log/messages


Third, configure the monitored Linux Host

1. On the monitored host

[[Email protected] ~] #egrep-V "^$|#"/etc/snmp/snmpd.conf

Com2sec notconfiguser default public

Group Notconfiggroup v1 notconfiguser

Group Notconfiggroup v2c notconfiguser

View SystemView included . 1.3.6.1.2.1.1

View SystemView included . 1.3.6.1.2.1.25.1.1

Access Notconfiggroup "" any noauth exact None None

View all included. 1 80

Syslocation Unknown (edit/etc/snmp/snmpd.conf)

Syscontact Root <[email protected]> (configure/etc/snmp/snmp.local.conf)

Dontlogtcpwrappersconnects Yes

2. Restart the SNMPD service

[[Email protected] ~] #service snmpd Restart


Four, the graphical interface configuration can refer to the following links

Http://www.linuxidc.com/Linux/2012-07/66918.htm

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/68/wKiom1T9BC6g-2TrAASLNyc3Vq4614.jpg "style=" float: none; "title=" cacti1.jpg "alt=" Wkiom1t9bc6g-2traaslnyc3vq4614.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/64/wKioL1T9BUnw3E5MAAK03NvkEg0561.jpg "style=" float: none; "title=" cacti2.jpg "alt=" Wkiol1t9bunw3e5maak03nvkeg0561.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/68/wKiom1T9BC-yiNWYAAWJT_Il0dM826.jpg "style=" float: none; "title=" cacti3.jpg "alt=" Wkiom1t9bc-yinwyaawjt_il0dm826.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/64/wKioL1T9BUvBLV9mAAJA3nwxc7Y752.jpg "style=" float: none; "title=" cacti5.jpg "alt=" Wkiol1t9buvblv9maaja3nwxc7y752.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/68/wKiom1T9BDDhdWWoAAPC9vC2P6o290.jpg "style=" float: none; "title=" cacti6.jpg "alt=" Wkiom1t9bddhdwwoaapc9vc2p6o290.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/64/wKioL1T9BUzhsb8gAAcP0yWH1_g518.jpg "style=" float: none; "title=" cacti7.jpg "alt=" Wkiol1t9buzhsb8gaacp0ywh1_g518.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/68/wKiom1T9BDLAbu1uAAZhCgXrHtk095.jpg "style=" float: none; "title=" cacti8.jpg "alt=" Wkiom1t9bdlabu1uaazhcgxrhtk095.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/64/wKioL1T9CEGB9jwJAAfXaLIOxFQ018.jpg "title=" Cacti13.jpg "alt=" Wkiol1t9cegb9jwjaafxalioxfq018.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/68/wKiom1T9BDShgdLYAAeL8epXY7c367.jpg "style=" float: none; "title=" cacti10.jpg "alt=" Wkiom1t9bdshgdlyaael8epxy7c367.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/64/wKioL1T9BVDjenwHAAUNp3yjNKQ974.jpg "style=" float: none; "title=" cacti11.jpg "alt=" Wkiol1t9bvdjenwhaaunp3yjnkq974.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/68/wKiom1T9BDWSaaecAAOgx2pck8I624.jpg "style=" float: none; "title=" cacti12.jpg "alt=" Wkiom1t9bdwsaaecaaogx2pck8i624.jpg "/>


This article is from "Kaka West" blog, please be sure to keep this source http://whnba.blog.51cto.com/1215711/1618485

Redhat 5.8 Mounting Cacti 0.8.8c

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.