Posted by : Warta Nusantara Jumat, 14 Juni 2013

INSTALASI CACTI


Beberapa paket pendukung yang dibutuhkan sebelum melakukan instalasi cacti


  1. httpd
  2. rrdtool
  3. net-snmp & net-snmp-utils
  4. php & php-snmp
  5. mysql, mysql-server & php-mysql

========================================================================
Install Paket Pendukung
========================================================================

[root@cacti]# yum install httpd php mysql php-mysql mysql-server
[root@cacti]# yum install php-snmp net-snmp net-snmp-utils rrdtool

========================================================================
Install Cacti
========================================================================


  1. Buat user cacti untuk menjalankan database yang nanti akan dibuat untuk keperluan menyimpan database cacti


[root@cacti]# groupadd cacti
[root@cacti]# useradd –g cacti cactiuser
[root@cacti]# passwd cactiuser
Changing password for user cactiuser.
New UNIX password: “cactipassword”
Retype new UNIX password: “cactipassword”
passwd: all authentication tokens updated successfully.


  1. Install cacti ke DirectoryRoot webserver


[root@cacti]# cd /var/www/html/
[root@cacti]# tar –xzvf cacti-0.8.7g
[root@cacti]# mv cacti-0.8.7g cacti


  1. Membuat Database untuk cacti


[root@cacti]# mysqladmin –u root –p create cacti


Masuk ke directory cacti yang baru diinstall tadi


[root@cacti]# cd /var/www/html/cacti


Import database cacti yang sudah ada di directory tersebut ke database cacti yang baru saja dibuat


[root@cacti]# mysql –u root –p cacti < cacti.sql


bila terjadi error pada saat import database, jalankan perintah berikut


[root@cacti]# sed –I –e ‘s/TYPE=/ENGINE=/g’ /var/www/html/cacti/cacti.sql


  1. Buat user cacti di mysql untuk memanage database cacti


[root@cacti]# mysql –u root –p


mysql> GRANT ALLL ON cacti.* TO cactiuser@localhost IDENTIFIED BY “passwordnyacacti”;
mysql> flush privileges;
mysql> quit;


  1. Edit file configuration cacti yang berada di /var/www/html/cacti/include/config.php


[root@cacti]# vi /var/www/html/cacti/include/config.php


Pastikan konfigurasinya sama seperti konfigurasi yang dibuat diatas
----------------------------------------------------------------------------------------------------------------------------------
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “passwordnyacacti”;
$database_port = “3306”;


/* load up old style plugins here */
$plugins = array ();
//$plugins[] = ‘thold’;
$plugins[] = ‘aggregate’;


/*
Edit this to point to the default URL of your Cacti install
ex: if your cacti install as at http://ipserver/cacti/ this would be set to /cacti/
----------------------------------------------------------------------------------------------------------------------------------


  1. Ganti kepemilikan folder rra/ dan log/ menjadi cactiuser (user cacti yang dibuat di atas)


[root@cacti]# cd /var/www/html/cacti
[root@cacti]# chown –R cactiuser rra/ log/


  1. Buat file crontab agar cacti melakukan update setiap 5 menit


[root@cacti]# crontab –e


Isi file dengan:
----------------------------------------------------------------------------------------------------------------------------------
*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php
----------------------------------------------------------------------------------------------------------------------------------


Restart httpd


[root@cacti]# /etc/init.d/httpd restart


  1. Saatnya mencoba cacti dari client


Buka browser, masukan alamat http://ipserver/cacti


Click Next > New Install > Next





Pastikan semua sudah ready



Click Finish, masukkan user dan password cacti default [admin:admin]. Kemudian ganti password cacti default.

{ 2 komentar... read them below or Comment }

Popular Post

Followers

- Copyright © 2013 Willy's Blog -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -