How to Install Cacti ver 0.8.8a on ClearOS 6.3

Reference :  www.amplysoft.com and Cacti Official forums and Support

Step:3. PHP and PHP-SNMP Install
# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql php-snmp
# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli

[root@pds3 ~]# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql php-snmp
Loaded plugins: clearcenter-marketplace, fastestmirror
Setting up Install Process
ClearCenter Marketplace: fetching repositories...

Loading mirror speeds from cached hostfile
 * clearos: mirror1-amsterdam.clearos.com
 * clearos-addons: mirror1-amsterdam.clearos.com
 * clearos-centos: download3.clearsdn.com
 * clearos-centos-updates: download3.clearsdn.com
 * clearos-extras: mirror1-amsterdam.clearos.com
 * clearos-fast-updates: download3.clearsdn.com
 * clearos-updates: mirror1-amsterdam.clearos.com
 * contribs: download3.clearsdn.com
 * private-clearcenter-backuppc: download3.clearsdn.com:80
 * private-clearcenter-dyndns: download3.clearsdn.com:80
 * private-clearcenter-plex: download3.clearsdn.com:80
 * private-clearcenter-serviio: download3.clearsdn.com:80
clearos | 3.8 kB 00:00
clearos-addons | 2.9 kB 00:00
clearos-centos | 3.7 kB 00:00
clearos-centos-updates | 2.9 kB 00:00
clearos-extras | 2.9 kB 00:00
clearos-fast-updates | 2.9 kB 00:00
clearos-updates | 2.9 kB 00:00
Package php-mysql-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package 1:php-pear-1.9.4-4.el6.noarch already installed and latest version
Package php-common-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-gd-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-devel-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-mbstring-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-cli-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-mysql-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Package php-snmp-5.3.3-46.el6_7.1.x86_64 already installed and latest version
Nothing to do

Dependencies Resolved
==============================================================================================
 Package Arch Version Repository Size
==============================================================================================
Installing:
 php-devel x86_64 5.4.16-42.el7 clearos-centos-verified 601 k
 php-snmp x86_64 5.4.16-42.el7 clearos-centos-verified 52 k
Installing for dependencies:
 autoconf noarch 2.69-11.el7 clearos-centos-verified 701 k
 automake noarch 1.13.4-3.el7 clearos-centos-verified 679 k
 m4 x86_64 1.4.16-10.el7 clearos-centos-verified 256 k
 net-snmp x86_64 1:5.7.2-24.el7_2.1 clearos-centos-verified 321 k
 net-snmp-agent-libs x86_64 1:5.7.2-24.el7_2.1 clearos-centos-verified 702 k
 pcre-devel x86_64 8.32-15.el7_2.1 clearos-centos-verified 479 k
 perl-Thread-Queue noarch 3.02-2.el7 clearos-centos-verified 17 k

Transaction Summary
==============================================================================================
Install 2 Packages (+7 Dependent packages)

Total download size: 3.7 M
Installed size: 13 M
Is this ok [y/d/N]:
[root@pds3 ~]#

Step: 4. NET-SNMP Install
# yum install net-snmp-utils p net-snmp-libs php-pear-Net-SMTP
[root@pds3 ~]# yum install net-snmp-utils p net-snmp-libs php-pear-Net-SMTP
Loaded plugins: clearcenter-marketplace, fastestmirror
Setting up Install Process
ClearCenter Marketplace: fetching repositories...
Loading mirror speeds from cached hostfile
 * clearos: mirror1-amsterdam.clearos.com
 * clearos-addons: mirror1-amsterdam.clearos.com
 * clearos-centos: download1.clearsdn.com
 * clearos-centos-updates: download1.clearsdn.com
 * clearos-extras: mirror1-amsterdam.clearos.com
 * clearos-fast-updates: download1.clearsdn.com
 * clearos-updates: mirror1-amsterdam.clearos.com
 * contribs: download1.clearsdn.com
 * private-clearcenter-backuppc: download1.clearsdn.com:80
 * private-clearcenter-dyndns: download3.clearsdn.com:80
 * private-clearcenter-plex: download3.clearsdn.com:80
 * private-clearcenter-serviio: download1.clearsdn.com:80
No package p available.
Package 1:net-snmp-libs-5.5-54.el6_7.1.x86_64 already installed and latest version
Package php-pear-Net-SMTP-1.6.1-1.el6.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package net-snmp-utils.x86_64 1:5.5-54.el6_7.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package Arch Version Repository Size
=========================================================================================================
Installing:
 net-snmp-utils x86_64 1:5.5-54.el6_7.1 clearos-centos-updates 176 k

Transaction Summary
=========================================================================================================
Install 1 Package(s)

Total download size: 176 k
Installed size: 362 k
Is this ok [y/N]: y
Downloading Packages:
net-snmp-utils-5.5-54.el6_7.1.x86_64.rpm | 176 kB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : 1:net-snmp-utils-5.5-54.el6_7.1.x86_64 1/1
 Verifying : 1:net-snmp-utils-5.5-54.el6_7.1.x86_64 1/1

Installed:
 net-snmp-utils.x86_64 1:5.5-54.el6_7.1

Complete!

Step:5. RDDTool Install
# yum install rrdtool
[root@pds3 ~]# yum install rrdtool
Loaded plugins: clearcenter-marketplace, fastestmirror
Setting up Install Process
ClearCenter Marketplace: fetching repositories...
Loading mirror speeds from cached hostfile
 * clearos: mirror1-amsterdam.clearos.com
 * clearos-addons: mirror1-amsterdam.clearos.com
 * clearos-centos: download3.clearsdn.com
 * clearos-centos-updates: download3.clearsdn.com
 * clearos-extras: mirror1-amsterdam.clearos.com
 * clearos-fast-updates: download3.clearsdn.com
 * clearos-updates: mirror1-amsterdam.clearos.com
 * contribs: download3.clearsdn.com
 * private-clearcenter-backuppc: download3.clearsdn.com:80
 * private-clearcenter-dyndns: download1.clearsdn.com:80
 * private-clearcenter-plex: download3.clearsdn.com:80
 * private-clearcenter-serviio: download1.clearsdn.com:80
Resolving Dependencies
--> Running transaction check
---> Package rrdtool.x86_64 0:1.3.8-7.el6 will be installed
--> Processing Dependency: dejavu-sans-mono-fonts for package: rrdtool-1.3.8-7.el6.x86_64
--> Processing Dependency: dejavu-lgc-sans-mono-fonts for package: rrdtool-1.3.8-7.el6.x86_64
--> Running transaction check
---> Package dejavu-lgc-sans-mono-fonts.noarch 0:2.33-1.el6 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-1.el6 for package: dejavu-lgc-sans-mono-fonts-2.33-1.el6.noarch
---> Package dejavu-sans-mono-fonts.noarch 0:2.33-1.el6 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package Arch Version Repository Size
=========================================================================================================
Installing:
 rrdtool x86_64 1.3.8-7.el6 clearos-centos 293 k
Installing for dependencies:
 dejavu-fonts-common noarch 2.33-1.el6 clearos-centos 63 k
 dejavu-lgc-sans-mono-fonts noarch 2.33-1.el6 clearos-centos 397 k
 dejavu-sans-mono-fonts noarch 2.33-1.el6 clearos-centos 474 k

Transaction Summary
=========================================================================================================
Install 4 Package(s)

Total download size: 1.2 M
Installed size: 2.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): dejavu-fonts-common-2.33-1.el6.noarch.rpm | 63 kB 00:01
(2/4): dejavu-lgc-sans-mono-fonts-2.33-1.el6.noarch.rpm | 397 kB 00:14
(3/4): dejavu-sans-mono-fonts-2.33-1.el6.noarch.rpm | 474 kB 00:10
(4/4): rrdtool-1.3.8-7.el6.x86_64.rpm | 293 kB 00:05
---------------------------------------------------------------------------------------------------------
Total 38 kB/s | 1.2 MB 00:32
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : dejavu-fonts-common-2.33-1.el6.noarch 1/4
 Installing : dejavu-sans-mono-fonts-2.33-1.el6.noarch 2/4
 Installing : dejavu-lgc-sans-mono-fonts-2.33-1.el6.noarch 3/4
 Installing : rrdtool-1.3.8-7.el6.x86_64 4/4
 Verifying : dejavu-sans-mono-fonts-2.33-1.el6.noarch 1/4
 Verifying : dejavu-lgc-sans-mono-fonts-2.33-1.el6.noarch 2/4
 Verifying : rrdtool-1.3.8-7.el6.x86_64 3/4
 Verifying : dejavu-fonts-common-2.33-1.el6.noarch 4/4

Installed:
 rrdtool.x86_64 0:1.3.8-7.el6

Dependency Installed:
 dejavu-fonts-common.noarch 0:2.33-1.el6 dejavu-lgc-sans-mono-fonts.noarch 0:2.33-1.el6
 dejavu-sans-mono-fonts.noarch 0:2.33-1.el6

Complete!

Step:6. Start Service Apache, MySQL and SNMP

[root@pds3 ~]# /etc/init.d/httpd start
Starting httpd:
[root@pds3 ~]# /etc/init.d/mysqld start
Starting mysqld: [ OK ]
[root@pds3 ~]# /etc/init.d/snmpd start
Starting snmpd: [ OK ]
[root@pds3 ~]#

Step:7 การตรวจสอบและติดตั้ง EPEL Repository เพื่อใช้สำหรับการติดตั้ง Cacti for ClearOS 64bit
# uname -a
Linux pds3.product-catner.lan 2.6.32-573.26.1.v6.x86_64 #1 SMP Mon May 9 21:44:49 MDT 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@pds2 ~]# uname -a
Linux pds2.product-catner.lan 2.6.32-573.1.1.v6.i686 #1 SMP Fri Aug 21 14:37:07 MDT 2015 i686 i686 i386 GNU/Linux
[root@pds2 etc]# cat redhat-release
ClearOS Community release 6.7.0 (Final)

ClearOS release 7.3.0 (Final)
--2016-09-12 12:02:16-- http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Resolving download.fedoraproject.org... 140.211.169.196, 209.132.181.16, 209.132.181.15, ...
Connecting to download.fedoraproject.org|140.211.169.196|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mirrors.bestthaihost.com/epel/6/x86_64/epel-release-6-8.noarch.rpm [following]
--2016-09-12 12:02:17-- http://mirrors.bestthaihost.com/epel/6/x86_64/epel-release-6-8.noarch.rpm
Resolving mirrors.bestthaihost.com... 103.233.192.20, 2401:1a80::219:b9ff:fefa:5d85
Connecting to mirrors.bestthaihost.com|103.233.192.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/x-redhat-package-manager]
Saving to: “epel-release-6-8.noarch.rpm”

100%[===============================================================>] 14,540 --.-K/s in 0.009s

2016-09-12 12:02:17 (1.62 MB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540]

[root@pds3 ~]# rpm -ivh epel-release-6-8.noarch.rpm
Preparing... ########################################### [100%]
 1:epel-release ########################################### [100%]

[root@pds2 etc]# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
--2016-09-12 13:58:18-- http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Resolving download.fedoraproject.org... 140.211.169.196, 174.141.234.172, 209.132.181.16, ...
Connecting to download.fedoraproject.org|140.211.169.196|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://mirrors.thzhost.com/epel/6/i386/epel-release-6-8.noarch.rpm [following]
--2016-09-12 13:58:20-- https://mirrors.thzhost.com/epel/6/i386/epel-release-6-8.noarch.rpm
Resolving mirrors.thzhost.com... 103.246.18.4, 2401:5700:100:503:dead::beef
Connecting to mirrors.thzhost.com|103.246.18.4|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/x-redhat-package-manager]
Saving to: “epel-release-6-8.noarch.rpm”

100%[===========================================================================================>] 14,540 --.-K/s in 0s

2016-09-12 13:58:20 (515 MB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540]

[root@pds2 etc]# rpm -ivh epel-release-6-8.noarch.rpm
Preparing... ########################################### [100%]
 1:epel-release ########################################### [100%]

Step:8) Cacti Install
[root@pds3 ~]# yum install cacti
Loaded plugins: clearcenter-marketplace, fastestmirror
Setting up Install Process
ClearCenter Marketplace: fetching repositories...
Loading mirror speeds from cached hostfile
epel/metalink | 5.3 kB 00:00
 * clearos: mirror1-amsterdam.clearos.com
 * clearos-addons: mirror1-amsterdam.clearos.com
 * clearos-centos: download3.clearsdn.com
 * clearos-centos-updates: download3.clearsdn.com
 * clearos-extras: mirror1-amsterdam.clearos.com
 * clearos-fast-updates: download3.clearsdn.com
 * clearos-updates: mirror1-amsterdam.clearos.com
 * contribs: download3.clearsdn.com
 * epel: mirrors.bestthaihost.com
 * private-clearcenter-backuppc: download1.clearsdn.com:80
 * private-clearcenter-dyndns: download3.clearsdn.com:80
 * private-clearcenter-plex: download3.clearsdn.com:80
 * private-clearcenter-serviio: download3.clearsdn.com:80
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:27
Resolving Dependencies
--> Running transaction check
---> Package cacti.noarch 0:0.8.8h-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package Arch Version Repository Size
=========================================================================================================
Installing:
 cacti noarch 0.8.8h-1.el6 epel 2.5 M

Transaction Summary
=========================================================================================================
Install 1 Package(s)

Total download size: 2.5 M
Installed size: 7.2 M
Is this ok [y/N]: y
Downloading Packages:
cacti-0.8.8h-1.el6.noarch.rpm | 2.5 MB 00:11
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
 Installing : cacti-0.8.8h-1.el6.noarch 1/1
 Verifying : cacti-0.8.8h-1.el6.noarch 1/1

Installed:
 cacti.noarch 0:0.8.8h-1.el6

Complete!

Step:9) Cacti Database Create
# mysql -u root -p
mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipwd';
mysql> FLUSH privileges;
mysql> quit;

Step:10) ตรวจสอบ Path: Cacti Database Tables แล้วทำการ Import Database
# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8h/cacti.sql
# mysql -u cactiuser -p cactipwd < /usr/share/doc/cacti-0.8.8h/cacti.sql
แนะนำให้ใช้ GUI phpmyAdmin
https://10.19.51.61:81/mysql/import.php

Step:10) Cacti Database Connected
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 = "cactiuser";
$database_password = "cactipwd";
$database_port = "3306";
$database_ssl = false;

Step:11) Web Access Allowed
vi /etc/httpd/conf.d/cacti.conf

Alias /cacti /usr/share/cacti
 

 order allow,deny
 allow from all


Step:11) Web Access Allowed มีความสำคัญในการติดตั้งผ่าน Web

vi /etc/httpd/conf.d/cacti.conf

Alias /cacti /usr/share/cacti
 

     Order allow,deny
     Allow from all


Step:11) Restart Service Apache Web Server

/etc/init.d/httpd restart
 
Step:12) Edit Cron for Cacti

vi /etc/cron.d/cacti
 
Remove # Comment
#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Step:13) Web GUI Install
http://10.19.51.61/cacti/install/
01Cacti-0.8.8h_Install Guide.PNG
รูปที่ 1 Cacti Installation Guide
02Cacti-0.8.8h_Install Database.PNG
รูปที่ 2 Cacti Database Connected
03Cacti-0.8.8h_Install Folder.PNG
รูปที่ 3 Cacti Path Installation
04Cacti-0.8.8h_Install admin.PNGรูปที่ 4 Cacti Login Default User : admin - Password : admin
05Cacti-0.8.8h_Install ChangePwd.PNG
รูปที่ 5 Forced Password Change for Frist Login
06Cacti-0.8.8h_Install started.PNG
รูปที่ 6 แสดงสถานะ Cacti Console
Advertisements