Membuat log analyzer di ubuntu 12.04
Siapa tahu ada yang butuh. Tool ini digunakan untuk memudahkan system
administrator membaca dan menganalisa system log di ubuntu (server)
berbasis Web:
Prerequisities:
Instalasi:
Prosedur ini digunakan supaya www-data dapat membaca file syslog
# sudo groupadd logadmin
# usermod -a -G logadmin www-data
# vim /etc/logrotate.conf
modify this line:
create 0664 root utmp logadmin
and
create 0660 root utmp logadmin
Final Configuration and Testing
Open web browser and go to http://localhost/html/loganalyzer to complete the setup
Tested on Ubuntu 12.04
Prerequisities:
- Install Ubuntu 12.04 Server
- Configure static IP (sudo nano /etc/network/interfaces)
- sudo nano /etc/apt/sources.list (uncomment deb and deb-src for extras and partners repositories)
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get dist-upgrade
- sudo apt-get install pkg-config build-essential autoconf uuid uuid-dev libgtk2.0-dev libperl-dev mongodb mongodb-server php-pear apache2 php5
- sudo /etc/init.d/apache2 restart
Instalasi:
- Edit php.ini. Biasanya terletak di /etc/php5/cli/php.ini dan /etc/php5/apache2/php.ini. Di bawah Dynamic Extensions: tambahkan: extension=mongo.so
- wget libestr.adiscon.com/files/download/libestr-0.1.4.tar.gz
- tar xzvf libestr-0.1.4.tar.gz -C /tmp/
- cd /tmp/libestr-0.1.4
- ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
- make
- sudo make install
- cd ~
- clear
- wget http://www.libee.org/download/files/download/libee-0.4.1.tar.gz
- tar xzvf libee-0.4.1.tar.gz -C /tmp/
- cd /tmp/libee-0.4.1
- ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
- make
- make install
- cd ~
- clear
- wget http://www.liblognorm.com/files/download/liblognorm-0.3.5.tar.gz
- tar xzvf liblognorm-0.3.5.tar.gz -C /tmp/
- cd /tmp/liblognorm-0.3.5
- ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
- make
- sudo make install
- cd ~
- clear
- wget https://github.com/downloads/json-c/json-c/json-c-0.10.tar.gz
- tar xzvf json-c-0.10.tar.gz -C /tmp/
- cd /tmp/json-c-0.10
- ./autogen.sh
- ./configure --libdir=/usr/lib --includedir=/usr/include --sbindir=/usr/sbin --prefix=/usr
- make
- sudo make install
- cp -vvv /tmp/json-c-0.10/json_object_iterator.h /usr/include/json
- cd ~
- clear
- wget http://archive.ubuntu.com/ubuntu/pool/universe/libm/libmongo-client/libmongo-client_0.1.5.orig.tar.gz
- tar xzvf libmongo-client_0.1.5.orig.tar.gz-C /tmp/
- cd /tmp/libmongo-client-0.1.5
- ./autogen.sh
- ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
- make
- sudo make install
- cd ~
- clear
- wget http://www.rsyslog.com/files/download/rsyslog/rsyslog-7.2.6.tar.gz
- tar xzvf rsyslog-7.2.6.tar.gz -C /tmp/
- cd /tmp/rsyslog-7.2.6
- ./configure --prefix=/usr --enable-imtcp --enable-mmjsonparse --enable-ommongodb
- make
- sudo make install
- cd ~
- clear
- wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.3.tar.gz
- tar xzvf loganalyzer-3.6.3.tar.gz -C /tmp/
- cd /tmp/loganalyzer-3.6.3
- sudo mkdir -p /var/www/html/loganalyzer
- sudo cp -R src/* /var/www/html/loganalyzer
- sudo cp -R contrib/* /var/www/html/loganalyzer
- cd /var/www/html/loganalyzer
- sudo chmod +x configure.sh secure.sh
- sudo ./configure.sh
- cd ~
- clear
Prosedur ini digunakan supaya www-data dapat membaca file syslog
# sudo groupadd logadmin
# usermod -a -G logadmin www-data
# vim /etc/logrotate.conf
modify this line:
create 0664 root utmp logadmin
and
create 0660 root utmp logadmin
Final Configuration and Testing
Open web browser and go to http://localhost/html/loganalyzer to complete the setup
Tested on Ubuntu 12.04