What is Cacti? Cacti is a complete network, server and application graphing solution harnessing the power of RRDtool OpenSource industry standard, high performance data logging and graphing.
So before we start just some general house keeping. The base CentOS 5.5 server hostname and IP address that we’ll be using in this tutorial:
* centos01.how2centos.com (IP 10.0.0.3)
The Cacti server will eventually be available on http://cacti.how2centos.com
The assumption, for this Cacti and CentOS 5.5 tutorial, is that you are running as root and have a medium understanding of the software required or you’re Awesome.
# yum install yum-priorities
# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-8.ius.el5.noarch.rpm# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm
Install Cherokee web server
# yum install cherokee rrdtool
Install PHP 5.3
# yum install php53u-pear php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mcrypt php53u-mysql php53u-pdo php53u-soap php53u-xml php53u-xmlrpc php53u-bcmath php53u-pecl-apc php53u-pecl-memcache php53u-snmp
Install MySQL and MySQL Server
# yum install mysql mysql-server
Install SNMP
# yum install net-snmp net-snmp-utils
Install Cacti
# yum install cacti
Configure snmpd, move snmpd.conf and create a new one. The ‘snmpuser’ is what you’ll use later in the Cacti interface.
# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
# echo "rocommunity snmpuser" > /etc/snmp/snmpd.conf
Let make sure that everything is added to runlevels 2, 3, 4 and start them up.
# chkconfig mysqld on
# chkconfig snmpd on
# chkconfig cherokee on
# service mysqld start
# service snmpd start
# service cherokee start
Create ‘cacti’ MySQL database and grant privileges to ‘cactiuser’ with password ‘cactipassword’
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14323
Server version: 5.0.77 Source distributionType ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>create database cacti;
mysql>GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipassword';
mysql>quit
Import the Cacti database schema
# mysql -ucactiuser -pcactipassword cacti < /var/www/cacti/cacti.sql
Configure Cacti with the details above.
# vi /var/www/cacti/include/config.php
1 | /* make sure these values refect your actual database/host/user/password */ |
Once all that has been done time to get PHP 5.3 working with Cherokee and then adding the Cacti virtual server.
Firstly lets get PHP 5.3 working with Cherokee
# cherokee-admin -b
Finally add the Cacti virtual server and browser to the URL and follow the onscreen instuctions.
Refer to http://www.how2centos.com/
0 comments
Post a Comment