Computer Technology: cacti Installation and Configuration

  
        

First, the installation package software

Here are some necessary, I will attach the download package below, apache, mysql, php can be installed through yum.

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

Net-snmp http://www.net-snmp.org/

Cacti http://www.cacti.net/

Second, installation configuration

1, install LAMP

[root@localhost]# yum -y install httpd mysql-server php php- Mysql mysql-devel [root@localhost]# chkconfig httpd on [root@localhost]# chkconfig mysqld on [root@localhost]# /etc/init.d/mysqld start Installed here via IP, test phpinfo to see if it is normal, By the way, look at the expansion of sockets, there is no open, then open cacti will report an error.

2, install rrdtool

Rrdtool installation requires cairo, libxml2, pango library support, can be installed via yum [root@localhost]# yum -y install cairo-devel libxml2-devel pango-devel [root@localhost]# tar zxvf rrdtool-1.4.7.tar.tar [root@localhost]# cd rrdtool-1.4.7 [root@localhost]# ./configure --prefix=/usr/local/rrdtool Next, you may get an error, you need to install the gcc kit, you can install gcc directly yum. [root@localhost rrdtool-1.4.7]# make && make install [root@localhost rrdtool-1.4.7]# ln -s /usr/local/rrdtool/bin/* /usr/local/bin/< Br>

3, install snmp

[root@localhost ~]# tar zxvf net-snmp-5.6.1.1.tar.gz [root@localhost ~]# cd net-snmp-5.6.1.1 [root@localhost net-snmp-5.6.1.1]# ./configure --prefix=/usr/local/net-snmp [root@localhost net-snmp-5.6.1.1]# make && make install [root @localhost net-snmp-5.6.1.1]# cp EXAMPLE.conf /etc/snmpd.conf [root@localhost ~]# ln -s /usr/local/net-snmp/bin/* /usr/local/bin/[root@localhost ~]# vim /etc/snmpd.conf Locate this line: #rocommunity public localhost Remove the comment [root@localhost ~]# /usr/local/net-snmp/sbin/snmpd -c /etc/snmpd. Conf join boot [root@localhost ~]# echo "/usr/local/net-snmp/sbin/snmpd -c /etc/snmpd.conf " >>/etc/rc.local


4. Install cacti

[root@localhost ~]# tar zxvf cacti-0.8.7i-PIA-3.1.tar.gz [root@localhost ~]# mv cacti- 0.8.7i-PIA-3.1/* /var/www/html/Cacti's website directory moved to the web directory [root@localhost ~]# chown -R apache:apache /var/www/html/#connect to mysql create database mysql> create database cacti; #create cacti database mysql> insert into mysql. User(host,user,password) values ​​('localhost','cacti',password('123456')); #Create user cacti, password 123456 mysql> flush privileges; overload mysql authorization table mysql> grant all on cacti. * to cacti@'localhost' identified by '123456'; Authorize cacti for user cacti [root@localhost ~]# cd /var/www/html/[root@localhost html]# mysql -ucacti -p123456 cacti<cacti .sql #import cacti database Modify the website configuration file, use the correct connection database parameters [root@localhost html]# vim include/config.php $database_type = "mysql"; $database_default = "cacti"; $database_hostname = " ;http://192.168.0.33/install /The installed interface appears.


After doing a traffic monitoring, it will be perfect again!
Original address: http://www.splaybow.com/post/linux-cacti.html

Copyright © Windows knowledge All Rights Reserved