Install and configure Cacti on Centos 6.3 Redhat RHEL Fedora 17

Install and configure Cacti on Centos 6.3 Redhat RHEL Fedora 17

1. Install epel repository on your Centos Server

x64: http://ithelpblog.com/os/linux/redhat/centos-redhat/install-epel-repository-on-centos-6-3-x86_64-or-redhat-6-3/

i386: http://ithelpblog.com/os/linux/redhat/centos-redhat/install-epel-repository-on-centos-6-3-or-redhat-6-3-rhel/

2.  Install packages which we need for Cacti Server

[root@localhost ~]# yum install httpd httpd-devel mysql mysql-server php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql php-snmp net-snmp-utils net-snmp-libs php-pear-Net-SMTP rrdtooln php-gd php-devel php php-mbstring php-cli php-mysql php-snmp
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.uhost.hk
* epel: ftp.cuhk.edu.hk
* extras: centos.uhost.hk
* rpmforge: mirror-fpt-telecom.fpt.net
* updates: centos.uhost.hk
Setting up Install Process
Package httpd-2.2.15-15.el6.centos.1.x86_64 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package httpd-devel.x86_64 0:2.2.15-15.el6.centos.1 will be installed
–> Processing Dependency: apr-util-devel for package: httpd-devel-2.2.15-15.el6.centos.1.x86_64
–> Processing Dependency: apr-devel for package: httpd-devel-2.2.15-15.el6.centos.1.x86_64
—> Package mysql.x86_64 0:5.1.66-2.el6_3 will be installed
–> Processing Dependency: mysql-libs = 5.1.66-2.el6_3 for package: mysql-5.1.66-2.el6_3.x86_64
—> Package mysql-server.x86_64 0:5.1.66-2.el6_3 will be installed
–> Processing Dependency: perl-DBI for package: mysql-server-5.1.66-2.el6_3.x86_64
–> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.66-2.el6_3.x86_64
–> Processing Dependency: perl(DBI) for package: mysql-server-5.1.66-2.el6_3.x86_64
—> Package net-snmp-libs.x86_64 1:5.5-41.el6 will be updated
–> Processing Dependency: net-snmp-libs = 1:5.5-41.el6 for package: 1:net-snmp-5.5-41.el6.x86_64
—> Package net-snmp-libs.x86_64 1:5.5-41.el6_3.1 will be an update
—> Package net-snmp-utils.x86_64 1:5.5-41.el6_3.1 will be installed
—> Package php.x86_64 0:5.3.3-14.el6_3 will be installed
—> Package php-cli.x86_64 0:5.3.3-14.el6_3 will be installed
—> Package php-common.x86_64 0:5.3.3-14.el6_3 will be installed
—> Package php-devel.x86_64 0:5.3.3-14.el6_3 will be installed
–> Processing Dependency: automake for package: php-devel-5.3.3-14.el6_3.x86_64
–> Processing Dependency: autoconf for package: php-devel-5.3.3-14.el6_3.x86_64
—> Package php-gd.x86_64 0:5.3.3-14.el6_3 will be installed
–> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.3.3-14.el6_3.x86_64
—> Package php-mbstring.x86_64 0:5.3.3-14.el6_3 will be installed
—> Package php-mysql.x86_64 0:5.3.3-14.el6_3 will be installed
–> Processing Dependency: php-pdo for package: php-mysql-5.3.3-14.el6_3.x86_64
—> Package php-pear.noarch 1:1.9.4-4.el6 will be installed
—> Package php-pear-Net-SMTP.noarch 0:1.6.1-1.el6 will be installed
–> Processing Dependency: php-pear(Net_Socket) >= 1.0.7 for package: php-pear-Net-SMTP-1.6.1-1.el6.noarch
–> Processing Dependency: php-pear(Auth_SASL) for package: php-pear-Net-SMTP-1.6.1-1.el6.noarch
—> Package php-snmp.x86_64 0:5.3.3-14.el6_3 will be installed
—> Package rrdtool.x86_64 0:1.3.8-6.el6 will be installed
–> Processing Dependency: dejavu-lgc-sans-mono-fonts for package: rrdtool-1.3.8-6.el6.x86_64
–> Running transaction check
—> Package apr-devel.x86_64 0:1.3.9-5.el6_2 will be installed
–> Processing Dependency: apr = 1.3.9-5.el6_2 for package: apr-devel-1.3.9-5.el6_2.x86_64
—> Package apr-util-devel.x86_64 0:1.3.9-3.el6_0.1 will be installed
–> Processing Dependency: openldap-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
–> Processing Dependency: expat-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
–> Processing Dependency: db4-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
—> Package autoconf.noarch 0:2.63-5.1.el6 will be installed
—> Package automake.noarch 0:1.11.1-1.2.el6 will be installed
—> Package dejavu-lgc-sans-mono-fonts.noarch 0:2.30-2.el6 will be installed
—> Package libXpm.x86_64 0:3.5.8-2.el6 will be installed
—> Package mysql-libs.x86_64 0:5.1.61-4.el6 will be updated
—> Package mysql-libs.x86_64 0:5.1.66-2.el6_3 will be an update
—> Package net-snmp.x86_64 1:5.5-41.el6 will be updated
—> Package net-snmp.x86_64 1:5.5-41.el6_3.1 will be an update
—> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
—> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
—> Package php-pdo.x86_64 0:5.3.3-14.el6_3 will be installed
—> Package php-pear-Auth-SASL.noarch 0:1.0.4-1.el6 will be installed
—> Package php-pear-Net-Socket.noarch 0:1.0.10-1.el6 will be installed
–> Running transaction check
—> Package apr.x86_64 0:1.3.9-3.el6_1.2 will be updated
—> Package apr.x86_64 0:1.3.9-5.el6_2 will be an update
—> Package db4-devel.x86_64 0:4.7.25-17.el6 will be installed
–> Processing Dependency: db4-cxx = 4.7.25-17.el6 for package: db4-devel-4.7.25-17.el6.x86_64
–> Processing Dependency: libdb_cxx-4.7.so()(64bit) for package: db4-devel-4.7.25-17.el6.x86_64
—> Package expat-devel.x86_64 0:2.0.1-11.el6_2 will be installed
—> Package openldap-devel.x86_64 0:2.4.23-26.el6_3.2 will be installed
–> Processing Dependency: openldap = 2.4.23-26.el6_3.2 for package: openldap-devel-2.4.23-26.el6_3.2.x86_64
–> Processing Dependency: cyrus-sasl-devel >= 2.1 for package: openldap-devel-2.4.23-26.el6_3.2.x86_64
–> Running transaction check
—> Package cyrus-sasl-devel.x86_64 0:2.1.23-13.el6_3.1 will be installed
–> Processing Dependency: cyrus-sasl-lib = 2.1.23-13.el6_3.1 for package: cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64
–> Processing Dependency: cyrus-sasl = 2.1.23-13.el6_3.1 for package: cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64
—> Package db4-cxx.x86_64 0:4.7.25-17.el6 will be installed
—> Package openldap.x86_64 0:2.4.23-26.el6 will be updated
—> Package openldap.x86_64 0:2.4.23-26.el6_3.2 will be an update
–> Running transaction check
—> Package cyrus-sasl.x86_64 0:2.1.23-13.el6 will be updated
—> Package cyrus-sasl.x86_64 0:2.1.23-13.el6_3.1 will be an update
—> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.el6 will be updated
–> Processing Dependency: cyrus-sasl-lib = 2.1.23-13.el6 for package: cyrus-sasl-plain-2.1.23-13.el6.x86_64
—> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.el6_3.1 will be an update
–> Running transaction check
—> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.el6 will be updated
—> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.el6_3.1 will be an update
–> Finished Dependency ResolutionDependencies Resolved=====================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================
Installing:
httpd-devel x86_64 2.2.15-15.el6.centos.1 base 147 k
mysql x86_64 5.1.66-2.el6_3 updates 885 k
mysql-server x86_64 5.1.66-2.el6_3 updates 8.6 M
net-snmp-utils x86_64 1:5.5-41.el6_3.1 updates 170 k
php x86_64 5.3.3-14.el6_3 updates 1.1 M
php-cli x86_64 5.3.3-14.el6_3 updates 2.2 M
php-common x86_64 5.3.3-14.el6_3 updates 523 k
php-devel x86_64 5.3.3-14.el6_3 updates 506 k
php-gd x86_64 5.3.3-14.el6_3 updates 104 k
php-mbstring x86_64 5.3.3-14.el6_3 updates 453 k
php-mysql x86_64 5.3.3-14.el6_3 updates 79 k
php-pear noarch 1:1.9.4-4.el6 base 393 k
php-pear-Net-SMTP noarch 1.6.1-1.el6 epel 22 k
php-snmp x86_64 5.3.3-14.el6_3 updates 29 k
rrdtool x86_64 1.3.8-6.el6 base 293 k
Updating:
net-snmp-libs x86_64 1:5.5-41.el6_3.1 updates 1.5 M
Installing for dependencies:
apr-devel x86_64 1.3.9-5.el6_2 updates 176 k
apr-util-devel x86_64 1.3.9-3.el6_0.1 base 69 k
autoconf noarch 2.63-5.1.el6 base 781 k
automake noarch 1.11.1-1.2.el6 base 550 k
cyrus-sasl-devel x86_64 2.1.23-13.el6_3.1 updates 302 k
db4-cxx x86_64 4.7.25-17.el6 base 588 k
db4-devel x86_64 4.7.25-17.el6 base 6.6 M
dejavu-lgc-sans-mono-fonts noarch 2.30-2.el6 base 393 k
expat-devel x86_64 2.0.1-11.el6_2 base 120 k
libXpm x86_64 3.5.8-2.el6 base 59 k
openldap-devel x86_64 2.4.23-26.el6_3.2 updates 1.1 M
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
perl-DBI x86_64 1.609-4.el6 base 705 k
php-pdo x86_64 5.3.3-14.el6_3 updates 73 k
php-pear-Auth-SASL noarch 1.0.4-1.el6 epel 12 k
php-pear-Net-Socket noarch 1.0.10-1.el6 epel 12 k
Updating for dependencies:
apr x86_64 1.3.9-5.el6_2 updates 123 k
cyrus-sasl x86_64 2.1.23-13.el6_3.1 updates 78 k
cyrus-sasl-lib x86_64 2.1.23-13.el6_3.1 updates 136 k
cyrus-sasl-plain x86_64 2.1.23-13.el6_3.1 updates 31 k
mysql-libs x86_64 5.1.66-2.el6_3 updates 1.2 M
net-snmp x86_64 1:5.5-41.el6_3.1 updates 302 k
openldap x86_64 2.4.23-26.el6_3.2 updates 262 kTransaction Summary
=====================================================================================================================================================================================================
Install 31 Package(s)
Upgrade 8 Package(s)Total download size: 31 M
Is this ok [y/N]:yDownloading Packages:
(1/39): apr-1.3.9-5.el6_2.x86_64.rpm | 123 kB 00:01
(2/39): apr-devel-1.3.9-5.el6_2.x86_64.rpm | 176 kB 00:01
(3/39): apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm | 69 kB 00:00
(4/39): autoconf-2.63-5.1.el6.noarch.rpm | 781 kB 00:04
(5/39): automake-1.11.1-1.2.el6.noarch.rpm | 550 kB 00:02
(6/39): cyrus-sasl-2.1.23-13.el6_3.1.x86_64.rpm | 78 kB 00:00
(7/39): cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64.rpm | 302 kB 00:01
(8/39): cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64.rpm | 136 kB 00:00
(9/39): cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64.rpm | 31 kB 00:00
(10/39): db4-cxx-4.7.25-17.el6.x86_64.rpm | 588 kB 00:02
(11/39): db4-devel-4.7.25-17.el6.x86_64.rpm | 6.6 MB 00:28
(12/39): dejavu-lgc-sans-mono-fonts-2.30-2.el6.noarch.rpm | 393 kB 00:01
(13/39): expat-devel-2.0.1-11.el6_2.x86_64.rpm | 120 kB 00:00
(14/39): httpd-devel-2.2.15-15.el6.centos.1.x86_64.rpm | 147 kB 00:00
(15/39): libXpm-3.5.8-2.el6.x86_64.rpm | 59 kB 00:00
(16/39): mysql-5.1.66-2.el6_3.x86_64.rpm | 885 kB 00:06
(17/39): mysql-libs-5.1.66-2.el6_3.x86_64.rpm | 1.2 MB 00:05
(18/39): mysql-server-5.1.66-2.el6_3.x86_64.rpm | 8.6 MB 00:50
(19/39): net-snmp-5.5-41.el6_3.1.x86_64.rpm | 302 kB 00:02
(20/39): net-snmp-libs-5.5-41.el6_3.1.x86_64.rpm | 1.5 MB 00:10
(21/39): net-snmp-utils-5.5-41.el6_3.1.x86_64.rpm | 170 kB 00:01
(22/39): openldap-2.4.23-26.el6_3.2.x86_64.rpm | 262 kB 00:01
(23/39): openldap-devel-2.4.23-26.el6_3.2.x86_64.rpm | 1.1 MB 00:05
(24/39): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:01
(25/39): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:03
(26/39): php-5.3.3-14.el6_3.x86_64.rpm | 1.1 MB 00:04
(27/39): php-cli-5.3.3-14.el6_3.x86_64.rpm | 2.2 MB 00:09
(28/39): php-common-5.3.3-14.el6_3.x86_64.rpm | 523 kB 00:02
(29/39): php-devel-5.3.3-14.el6_3.x86_64.rpm | 506 kB 00:02
(30/39): php-gd-5.3.3-14.el6_3.x86_64.rpm | 104 kB 00:00
(31/39): php-mbstring-5.3.3-14.el6_3.x86_64.rpm | 453 kB 00:02
(32/39): php-mysql-5.3.3-14.el6_3.x86_64.rpm | 79 kB 00:00
(33/39): php-pdo-5.3.3-14.el6_3.x86_64.rpm | 73 kB 00:00
(34/39): php-pear-1.9.4-4.el6.noarch.rpm | 393 kB 00:01
(35/39): php-pear-Auth-SASL-1.0.4-1.el6.noarch.rpm | 12 kB 00:00
(36/39): php-pear-Net-SMTP-1.6.1-1.el6.noarch.rpm | 22 kB 00:00
(37/39): php-pear-Net-Socket-1.0.10-1.el6.noarch.rpm | 12 kB 00:00
(38/39): php-snmp-5.3.3-14.el6_3.x86_64.rpm | 29 kB 00:00
(39/39): rrdtool-1.3.8-6.el6.x86_64.rpm | 293 kB 00:01
—————————————————————————————————————————————————————————————————–
Total 171 kB/s | 31 MB 03:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.3-14.el6_3.x86_64 1/47
Updating : mysql-libs-5.1.66-2.el6_3.x86_64 2/47
Updating : cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64 3/47
Updating : 1:net-snmp-libs-5.5-41.el6_3.1.x86_64 4/47
Updating : openldap-2.4.23-26.el6_3.2.x86_64 5/47
Installing : php-cli-5.3.3-14.el6_3.x86_64 6/47
Installing : 1:php-pear-1.9.4-4.el6.noarch 7/47
Installing : autoconf-2.63-5.1.el6.noarch 8/47
Installing : perl-DBI-1.609-4.el6.x86_64 9/47
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 10/47
Installing : automake-1.11.1-1.2.el6.noarch 11/47
Installing : php-pear-Net-Socket-1.0.10-1.el6.noarch 12/47
Installing : php-pear-Auth-SASL-1.0.4-1.el6.noarch 13/47
Installing : php-5.3.3-14.el6_3.x86_64 14/47
Updating : cyrus-sasl-2.1.23-13.el6_3.1.x86_64 15/47
Installing : cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64 16/47
Installing : openldap-devel-2.4.23-26.el6_3.2.x86_64 17/47
Updating : 1:net-snmp-5.5-41.el6_3.1.x86_64 18/47
Installing : mysql-5.1.66-2.el6_3.x86_64 19/47
Installing : php-pdo-5.3.3-14.el6_3.x86_64 20/47
Updating : apr-1.3.9-5.el6_2.x86_64 21/47
Installing : apr-devel-1.3.9-5.el6_2.x86_64 22/47
Installing : dejavu-lgc-sans-mono-fonts-2.30-2.el6.noarch 23/47
Installing : expat-devel-2.0.1-11.el6_2.x86_64 24/47
Installing : libXpm-3.5.8-2.el6.x86_64 25/47
Installing : db4-cxx-4.7.25-17.el6.x86_64 26/47
Installing : db4-devel-4.7.25-17.el6.x86_64 27/47
Installing : apr-util-devel-1.3.9-3.el6_0.1.x86_64 28/47
Installing : httpd-devel-2.2.15-15.el6.centos.1.x86_64 29/47
Installing : php-gd-5.3.3-14.el6_3.x86_64 30/47
Installing : rrdtool-1.3.8-6.el6.x86_64 31/47
Installing : php-mysql-5.3.3-14.el6_3.x86_64 32/47
Installing : mysql-server-5.1.66-2.el6_3.x86_64 33/47
Installing : php-snmp-5.3.3-14.el6_3.x86_64 34/47
Installing : php-devel-5.3.3-14.el6_3.x86_64 35/47
Installing : php-pear-Net-SMTP-1.6.1-1.el6.noarch 36/47
No log handling enabled – turning on stderr logging
Created directory: /var/lib/net-snmp/mib_indexes
Installing : 1:net-snmp-utils-5.5-41.el6_3.1.x86_64 37/47
Updating : cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64 38/47
Installing : php-mbstring-5.3.3-14.el6_3.x86_64 39/47
Cleanup : cyrus-sasl-2.1.23-13.el6.x86_64 40/47
Cleanup : openldap-2.4.23-26.el6.x86_64 41/47
Cleanup : cyrus-sasl-plain-2.1.23-13.el6.x86_64 42/47
Cleanup : 1:net-snmp-5.5-41.el6.x86_64 43/47
Cleanup : 1:net-snmp-libs-5.5-41.el6.x86_64 44/47
Cleanup : cyrus-sasl-lib-2.1.23-13.el6.x86_64 45/47
Cleanup : mysql-libs-5.1.61-4.el6.x86_64 46/47
Cleanup : apr-1.3.9-3.el6_1.2.x86_64 47/47
Verifying : php-common-5.3.3-14.el6_3.x86_64 1/47
Verifying : cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64 2/47
Verifying : php-pear-Net-Socket-1.0.10-1.el6.noarch 3/47
Verifying : openldap-2.4.23-26.el6_3.2.x86_64 4/47
Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 5/47
Verifying : mysql-5.1.66-2.el6_3.x86_64 6/47
Verifying : perl-DBI-1.609-4.el6.x86_64 7/47
Verifying : db4-cxx-4.7.25-17.el6.x86_64 8/47
Verifying : php-pear-Auth-SASL-1.0.4-1.el6.noarch 9/47
Verifying : cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64 10/47
Verifying : php-gd-5.3.3-14.el6_3.x86_64 11/47
Verifying : php-snmp-5.3.3-14.el6_3.x86_64 12/47
Verifying : php-cli-5.3.3-14.el6_3.x86_64 13/47
Verifying : libXpm-3.5.8-2.el6.x86_64 14/47
Verifying : 1:php-pear-1.9.4-4.el6.noarch 15/47
Verifying : mysql-server-5.1.66-2.el6_3.x86_64 16/47
Verifying : autoconf-2.63-5.1.el6.noarch 17/47
Verifying : php-5.3.3-14.el6_3.x86_64 18/47
Verifying : expat-devel-2.0.1-11.el6_2.x86_64 19/47
Verifying : 1:net-snmp-5.5-41.el6_3.1.x86_64 20/47
Verifying : php-mbstring-5.3.3-14.el6_3.x86_64 21/47
Verifying : apr-devel-1.3.9-5.el6_2.x86_64 22/47
Verifying : cyrus-sasl-2.1.23-13.el6_3.1.x86_64 23/47
Verifying : php-pear-Net-SMTP-1.6.1-1.el6.noarch 24/47
Verifying : dejavu-lgc-sans-mono-fonts-2.30-2.el6.noarch 25/47
Verifying : cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64 26/47
Verifying : apr-1.3.9-5.el6_2.x86_64 27/47
Verifying : 1:net-snmp-libs-5.5-41.el6_3.1.x86_64 28/47
Verifying : apr-util-devel-1.3.9-3.el6_0.1.x86_64 29/47
Verifying : php-devel-5.3.3-14.el6_3.x86_64 30/47
Verifying : mysql-libs-5.1.66-2.el6_3.x86_64 31/47
Verifying : automake-1.11.1-1.2.el6.noarch 32/47
Verifying : php-mysql-5.3.3-14.el6_3.x86_64 33/47
Verifying : rrdtool-1.3.8-6.el6.x86_64 34/47
Verifying : openldap-devel-2.4.23-26.el6_3.2.x86_64 35/47
Verifying : httpd-devel-2.2.15-15.el6.centos.1.x86_64 36/47
Verifying : php-pdo-5.3.3-14.el6_3.x86_64 37/47
Verifying : 1:net-snmp-utils-5.5-41.el6_3.1.x86_64 38/47
Verifying : db4-devel-4.7.25-17.el6.x86_64 39/47
Verifying : cyrus-sasl-plain-2.1.23-13.el6.x86_64 40/47
Verifying : 1:net-snmp-libs-5.5-41.el6.x86_64 41/47
Verifying : mysql-libs-5.1.61-4.el6.x86_64 42/47
Verifying : cyrus-sasl-2.1.23-13.el6.x86_64 43/47
Verifying : cyrus-sasl-lib-2.1.23-13.el6.x86_64 44/47
Verifying : openldap-2.4.23-26.el6.x86_64 45/47
Verifying : 1:net-snmp-5.5-41.el6.x86_64 46/47
Verifying : apr-1.3.9-3.el6_1.2.x86_64 47/47Installed:
httpd-devel.x86_64 0:2.2.15-15.el6.centos.1 mysql.x86_64 0:5.1.66-2.el6_3 mysql-server.x86_64 0:5.1.66-2.el6_3 net-snmp-utils.x86_64 1:5.5-41.el6_3.1 php.x86_64 0:5.3.3-14.el6_3
php-cli.x86_64 0:5.3.3-14.el6_3 php-common.x86_64 0:5.3.3-14.el6_3 php-devel.x86_64 0:5.3.3-14.el6_3 php-gd.x86_64 0:5.3.3-14.el6_3 php-mbstring.x86_64 0:5.3.3-14.el6_3
php-mysql.x86_64 0:5.3.3-14.el6_3 php-pear.noarch 1:1.9.4-4.el6 php-pear-Net-SMTP.noarch 0:1.6.1-1.el6 php-snmp.x86_64 0:5.3.3-14.el6_3 rrdtool.x86_64 0:1.3.8-6.el6Dependency Installed:
apr-devel.x86_64 0:1.3.9-5.el6_2 apr-util-devel.x86_64 0:1.3.9-3.el6_0.1 autoconf.noarch 0:2.63-5.1.el6 automake.noarch 0:1.11.1-1.2.el6
cyrus-sasl-devel.x86_64 0:2.1.23-13.el6_3.1 db4-cxx.x86_64 0:4.7.25-17.el6 db4-devel.x86_64 0:4.7.25-17.el6 dejavu-lgc-sans-mono-fonts.noarch 0:2.30-2.el6
expat-devel.x86_64 0:2.0.1-11.el6_2 libXpm.x86_64 0:3.5.8-2.el6 openldap-devel.x86_64 0:2.4.23-26.el6_3.2 perl-DBD-MySQL.x86_64 0:4.013-3.el6
perl-DBI.x86_64 0:1.609-4.el6 php-pdo.x86_64 0:5.3.3-14.el6_3 php-pear-Auth-SASL.noarch 0:1.0.4-1.el6 php-pear-Net-Socket.noarch 0:1.0.10-1.el6Updated:
net-snmp-libs.x86_64 1:5.5-41.el6_3.1Dependency Updated:
apr.x86_64 0:1.3.9-5.el6_2 cyrus-sasl.x86_64 0:2.1.23-13.el6_3.1 cyrus-sasl-lib.x86_64 0:2.1.23-13.el6_3.1 cyrus-sasl-plain.x86_64 0:2.1.23-13.el6_3.1 mysql-libs.x86_64 0:5.1.66-2.el6_3
net-snmp.x86_64 1:5.5-41.el6_3.1 openldap.x86_64 0:2.4.23-26.el6_3.2Complete!
You have new mail in /var/spool/mail/root
[root@localhost ~]#

3. Start services for cacti

[root@localhost ~]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain for ServerName
[ OK ]
[root@localhost ~]# /etc/init.d/mysqld start
Initializing MySQL database: Installing MySQL system tables…
OK
Filling help tables…
OKTo start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h localhost.localdomain password ‘new-password’Alternatively you can run:
/usr/bin/mysql_secure_installationwhich will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.plPlease report any problems with the /usr/bin/mysqlbug script![ OK ]
Starting mysqld: [ OK ]
[root@localhost ~]# /etc/init.d/snmpd start
Starting snmpd: [ OK ]
[root@localhost ~]#

4. Add these services into boot list for restart

[root@localhost ~]# /sbin/chkconfig –levels 345 httpd on
[root@localhost ~]# /sbin/chkconfig –levels 345 snmpd on
[root@localhost ~]# /sbin/chkconfig –levels 345 mysqld on
[root@localhost ~]#

5.  Install cacti software

[root@localhost ~]# yum install cacti
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.uhost.hk
* epel: ftp.cuhk.edu.hk
* extras: centos.uhost.hk
* rpmforge: mirror-fpt-telecom.fpt.net
* updates: centos.uhost.hk
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package cacti.noarch 0:0.8.8a-2.el6 will be installed
–> Finished Dependency ResolutionDependencies Resolved=====================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================
Installing:
cacti noarch 0.8.8a-2.el6 epel 2.0 MTransaction Summary
=====================================================================================================================================================================================================
Install 1 Package(s)Total download size: 2.0 M
Installed size: 5.4 M
Is this ok [y/N]: y
Downloading Packages:
cacti-0.8.8a-2.el6.noarch.rpm | 2.0 MB 00:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : cacti-0.8.8a-2.el6.noarch 1/1
Verifying : cacti-0.8.8a-2.el6.noarch 1/1Installed:
cacti.noarch 0:0.8.8a-2.el6Complete!
[root@localhost ~]#

6. Create database and import tables for cacti

[root@localhost ~]#  mysqladmin -u root password IThelpblogsecret
[root@localhost ~]#mysql -p
mysql> create database cacti
-> ;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘IThelpblogsecret’;
Query OK, 0 rows affected (0.00 sec)mysql>mysql> quit;
Bye
[root@localhost ~]#

Import cacti tables into cacti database with cacti mysql user

[root@localhost ~]# cd /usr/share/doc/cacti-0.8.8a/
[root@localhost cacti-0.8.8a]# ls *.sql
cacti.sql
[root@localhost cacti-0.8.8a]# pwd
/usr/share/doc/cacti-0.8.8a
[root@localhost cacti-0.8.8a]#
[root@localhost ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8a/cacti.sql
Enter password:
[root@localhost ~]#

7. Apply database setting on db.php file for cacti

[root@localhost ~]# vi /etc/cacti/db.php
/* make sure these values refect your actual database/host/user/password */
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “IThelpblogsecret”;
$database_port = “3306”;
$database_ssl = false;

8. Configure httpd configuration and restart HTTPd

[root@localhost ~]# vi /etc/httpd/conf.d/cacti.conf
#
# Cacti: An rrd based graphing tool
## Change the following ACLs to open up Cacti to other network devices.
# For example:
# On httpd 2.4, change “Require host localhost” to “Require all granted”.
# On httpd 2.2, change “Allow from localhost” to “Allow from all”.Alias /cacti /usr/share/cacti<Directory /usr/share/cacti/>
<IfModule mod_authz_core.c>
# httpd 2.4
Require host localhost
</IfModule>
<IfModule !mod_authz_core.c>
# httpd 2.2
Order deny,allow
Deny from all
Allow from 192.168.
</IfModule>
</Directory><Directory /usr/share/cacti/install>
# mod_security overrides.
# Uncomment these if you use mod_security.
# allow POST of application/x-www-form-urlencoded during install
#SecRuleRemoveById 960010
# permit the specification of the rrdtool paths during install
#SecRuleRemoveById 900011
</Directory>
# These sections marked “Require all denied” (or “Deny from all”)
# should not be modified.
# These are in place in order to harden Cacti.
<Directory /usr/share/cacti/log>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Directory>
<Directory /usr/share/cacti/rra>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Directory>
[root@localhost ~]#
[root@localhost ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain for ServerName
[ OK ]
[root@localhost ~]#

9. Create cronjob for cacti

[root@localhost ~]# crontab -e
*/5 * * * * /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
[root@localhost ~]#

10. Access to Cacti web server to install cacti with wizzard

http://x.x.x.x/cacti

 

Cacti is installed successfully on your Server. Thanks for using IThelpblog.com.

 

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>