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:
  1. Install Ubuntu 12.04 Server
  2. Configure static IP (sudo nano /etc/network/interfaces)
  3. sudo nano /etc/apt/sources.list (uncomment deb and deb-src for extras and partners repositories)
  4. sudo apt-get update
  5. sudo apt-get upgrade
  6. sudo apt-get dist-upgrade
  7. sudo apt-get install pkg-config build-essential autoconf uuid uuid-dev libgtk2.0-dev libperl-dev mongodb mongodb-server php-pear apache2 php5
  8. sudo /etc/init.d/apache2 restart

Instalasi:
  1. 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
  2. wget libestr.adiscon.com/files/download/libestr-0.1.4.tar.gz
  3. tar xzvf libestr-0.1.4.tar.gz -C /tmp/
  4. cd /tmp/libestr-0.1.4
  5. ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
  6. make
  7. sudo make install
  8. cd ~
  9. clear
  10. wget http://www.libee.org/download/files/download/libee-0.4.1.tar.gz
  11. tar xzvf libee-0.4.1.tar.gz -C /tmp/
  12. cd /tmp/libee-0.4.1
  13. ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
  14. make
  15. make install
  16. cd ~
  17. clear
  18. wget http://www.liblognorm.com/files/download/liblognorm-0.3.5.tar.gz
  19. tar xzvf liblognorm-0.3.5.tar.gz -C /tmp/
  20. cd /tmp/liblognorm-0.3.5
  21. ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
  22. make
  23. sudo make install
  24. cd ~
  25. clear
  26. wget https://github.com/downloads/json-c/json-c/json-c-0.10.tar.gz
  27. tar xzvf json-c-0.10.tar.gz -C /tmp/
  28. cd /tmp/json-c-0.10
  29. ./autogen.sh
  30. ./configure --libdir=/usr/lib --includedir=/usr/include --sbindir=/usr/sbin --prefix=/usr
  31. make
  32. sudo make install
  33. cp -vvv /tmp/json-c-0.10/json_object_iterator.h /usr/include/json
  34. cd ~
  35. clear
  36. wget http://archive.ubuntu.com/ubuntu/pool/universe/libm/libmongo-client/libmongo-client_0.1.5.orig.tar.gz
  37. tar xzvf libmongo-client_0.1.5.orig.tar.gz-C /tmp/
  38. cd /tmp/libmongo-client-0.1.5
  39. ./autogen.sh
  40. ./configure --libdir=/usr/lib --includedir=/usr/include --prefix=/usr
  41. make
  42. sudo make install
  43. cd ~
  44. clear
  45. wget http://www.rsyslog.com/files/download/rsyslog/rsyslog-7.2.6.tar.gz
  46. tar xzvf rsyslog-7.2.6.tar.gz -C /tmp/
  47. cd /tmp/rsyslog-7.2.6
  48. ./configure  --prefix=/usr --enable-imtcp --enable-mmjsonparse --enable-ommongodb
  49. make
  50. sudo make install
  51. cd ~
  52. clear
  53. wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.3.tar.gz
  54. tar xzvf loganalyzer-3.6.3.tar.gz -C /tmp/
  55. cd /tmp/loganalyzer-3.6.3
  56. sudo mkdir -p /var/www/html/loganalyzer
  57. sudo cp -R src/* /var/www/html/loganalyzer
  58. sudo cp -R contrib/* /var/www/html/loganalyzer
  59. cd /var/www/html/loganalyzer
  60. sudo chmod +x configure.sh secure.sh
  61. sudo ./configure.sh
  62. cd ~
  63. clear
Menambah group:
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
Next Post Previous Post
No Comment
Add Comment
comment url