Thursday, 6 November 2014

Procrastinating is scary....

Welp, I wonder how long since my last update is? Huh, procrastinating is quite scary...

Anyway, sorry that I haven't update this blog and yes, I realize that there's more of gibberish than tutorial, but I did warn you so hey! No harm's done :)

Firstly, I was trying Snort on windows with Barnyard, the Snort installation come quite nicely but can't say the same for Barnyard. So yes, the next tutorial is about Snort and Barnyard on windows! Why on windows? Well most people use windows, and you could find lots of tutorial about installing them in linux. 'Tis gonna be a bumpy ride but it will be worth it.

Secondly, I keep promising that I will update this blog frequently either it's about some gibberish or tutorial, and I do realize I didn't keep it (it's my fault yes), so allow me to rephrase it then, I'll update when I feel like something worth to post comes up, either it's some gibberish coated in gold or new tutorials, that'll depends. I can't say "I'm actually busy because I'm making my final project" as a reason because I got lots of free time back then, so I can only say that my bad, gonna change, wish me luck.

Lastly, as an apologize, I'll post a summed up Cacti+Weathermap installation, and it's in Indonesian! I mean the explanation, you just need the command line right? Well, good luck on whatever you're doing right now! Don't you give up now!

Instalasi Cacti :
-          Install Dependencies
apt-get install snmpd snmp mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli ph5-snmp
      apt-get install libpango1.0-dev libxml2-dev
      apt-get rrdtool

-          Download dan ekstrak cacti ke /var/www

-          Ubah kepemilikan folder rra dan log
chown –R www-data:www-data rra/ log/
-          Buat database untuk cacti dalam mysql    
create database cacti;

-          Masukkan cacti.sql ke dalam database cacti
mysql –u root –p cacti<cacti.sql

-          Buat user baru dalam mysql untuk cacti dan atur hak aksesnya terhadap database cacti
create user [username] identified by ‘[password]’;
grant all cacti.* to [username]@localhost identified by ‘[password]’;
flush privileges;

-          Edit config.php pada folder cacti, samakan user yang digunakan untuk database pada file tersebut dengan user  yang kalian daftarkan

-          Buat user cacti pada sistem local
useradd [userame] –d /var/www/[cacti path] –s /bin/false
-          Ubah perizinan untuk user tersenut
chown –R [username] /var/www/[cacti path]

-          Tambah cronjob untuk poller.php
Cronjob –e
*/5 * * * * php /var/www/[cacti path]/poller.php >/dev/nul 2>&1
            -     Buka browser, lalu ke localhost/[cacti path] lalu ikuti instruksi untuk menginstall cacti

Instalasi weathermap :
                

-          Unduh cacti Plugin Architecture

-          Ekstrak dimana saja

-          Kopi file patch  (cacti-plugin-arch.diff) ke folder cacti

-          Jalankan comman ini terlebih dahulu :

Patch –p1 –N - -dryrun < cacti-plugin-arch.diff
-          Jika tidak terdapat error, jalankan lagi perintah diatas tanpa - -dryrun. Jika terdapat error, kopi file-file yang terdapat dalam folder files ke folder cacti


-          Unduh plugin weathermap

-          Ekstrak dimana saja

-          Kopi folder weathermap ke folder plugin di dalam cacti

-          Edit config.php, tambahkan line berikut seteah konfigurasi database

$plugins[]=array();
//$plugins[]=’monitor’;
//$plugins[]=’weathermap’;\

-          Sekarang masuk ke web cacti, aktifkan plugin weathermap

-          Agar bias menggunakan web editor weathermap, cek terlebih dahulu modul yang dibutuhkan. Pada web browser sudah disediakan dan tinggal digunakan.

localhost/[cacti url]/plugins/weathermap/check.php
Jika terdapat modul yang hilang, jalankan lagi pada terminal. Masuk ke dalam folder cacti, lalu ke folder weathermap, jalankan command ini

php check.php

Jika hasilnya sama dengan di browser, install modul terlebih dahulu :
      Apt-get install php5 php5-cli php5-gd php-pearl apache2
Lalu jalankan lagi command line dalam terminal, semuanya harusnya sudah terinstall. Sekarang coba jalan check,php pada web browser lagi. Jika terdapat error, restart computer. Web editor weathermap telah dapat terpakai


P.S I just know that newer version of Cacti already have a plugin architecture, so I guess this step is not required, cheers.

No comments:

Post a Comment

I want to start flame war on the comment section pl0x