Install Nagios

HOW TO INSTALL NAGIOS 2.9

ON LINUX CENTOS 5

  1. Server yang akan di Install nagios harus sudah terinstall C/C++ compiler dan apache

  1. Sudah memiliki aplikasi nagios-2.9.tar.gz dan nagios-plugins-1.4.2 yang di simpan dalam sebuah direktori. Misalkan di /home/thariq

  1. Buat sebuah user dan group dengan nama nagios

# useradd nagios

# groupadd nagios

  1. Didalam direktori /home/thariq tersebut, lakukan ekstrak file nagios

# tar xzvf nagios-2.9.tar.gz

  1. Lalu ketikkan perintah untuk konfigurasi file

# cd /home/user/nagios-2.9

# ./configure

  1. Install file-file nagios tersebut

# make all

# make install

# make install-init

# make install-commandmode

# make install-config

  1. Ubah nama file-file yang berada di direktori /usr/local/nagios/etc

file name

file name after rename

cgi.cfg-sample

command.cfg-sample

localhost.cfg-sample

nagios.cfg-sample

cgi.cfg

command.cfg

localhost.cfg

nagios.cfg

  1. Ubah access permission direktori /usr/local/nagios/sbin

# chcon -R system_u:object_r:httpd_sys_script_exec_t /usr/local/nagios/sbin

  1. Jalankan apache

# service httpd restart

  1. Jalankan nagios

# service nagios restart

  1. Dalam direktori /home/thariq, lakukan ekstrak file nagios plugin

# tar xzvf nagios-plugins-1.4.2.tar.gz

  1. Lalu ketikkan perintah untuk konfigurasi file

# cd /home/user/nagios-plugins-1.4.2

# ./configure

  1. Install file-file nagios plugins tersebut

# make all

# make install

  1. Copy file-file yang berada pada /usr/local/nagios/libexec kedalam /usr/local/nagios/sbin

  1. Buka file cgi.cfg yang berada pada /usr/local/nagios/etc. Ubah user autentikasi nya menjadi :

Use_authentication = 0

  1. Tambahkan perintah berikut ini di dalam file httpd.conf (biasanya di /etc/httpd/conf)

ScriptAlias /nagios/cgi-bin/ "/usr/local/nagios/sbin/"

Options ExecCGI

AllowOverride None

Order allow,deny

Allow from all

Alias /nagios "/usr/local/nagios/share"

Options None

order allow,deny

allow from all

Alias /images/ "/usr/local/nagios/share/images/"

Options Indexes MultiViews

AllowOverride None

Order allow,deny

Allow from all

  1. Jalankan apache

# service apache restart

  1. Jalankan nagios

# service nagios restart

  1. Apabila tidak ada kesalahan, nagios dan nagios plugins sudah terinstall di komputer server. Buka internet eksplorer (ie / thunderbird /opera) dengan address : ipkomputernagios/nagios


Install Cacti

INSTALL CACTI


Cacti requires that the following software is installed on your system.
• RRDTool 1.0.49 or 1.2.x or greater
• MySQL 3.23 or greater, 4.0.20d or greater highly recommended for advanced features
• PHP 4.1 or greater, 4.3.6 or greater highly recommended for advanced features
Packages for RPM-based Operating Systems
• httpd
• php
• php-mysql
• php-snmp
• mysql
• mysql-server
• net-snmp


Install RRDTool (supaya bisa menampilkan grafik) :
10. Download file rrdtool.tar.gz
shell> wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
10. Extract the distribution tarball
shell> tar –xvzf rrdtool.tar.gz
10. Install RRDTool
shell> cd rrdtool-1.2.23/
shell> ./configure --disable-tcl
shell> make
shell> make install
10. Create a symlink for RRDTool
shell> ln –s /usr/local/rrdtool-1.2.23/bin/rrdtool /usr/local/bin/rrdtool


Install Cacti :
1. Download file cacti-0.8.6j.tar.gz di http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
2. Extract the distribution tarball.
shell> tar xzvf cacti-version.tar.gz
3. Create the MySQL database:
shell> mysqladmin --user=root create cacti
4. Import the default cacti database:
shell> mysql cacti <> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
6. Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
7. Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
8. Add a line to your /etc/crontab file similar to:
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
Replace cactiuser with the valid user specified in the previous step.
Replace /var/www/html/cacti/ with your full Cacti path.
9. Point your web browser to:
http://your-server/cacti/
Log in the with a username/password of admin. You will be required to change this password immediately. Make sure to fill in all of the path variables carefully and correctly


10. Install cacti-plugin-arch
- tar -zxvf cacti-plugin-arch.tar.gz
- cp cacti-plugin-arch/cacti-plugin-0.8.6j.diff /var/www/html/cacti/
- cd /var/www/html/cacti/
11. Now, let's test the patch to ensure that everything is set up properly by performing a dry run on the patching process. You do this, by issuing the command:
- patch -p1 -N --dry-run < cacti-plugin-0.8.6j.diff
12. If no errors are returned, let's go ahead and patch Cacti. Issue the following command to do so:
- patch -p1 -N < cacti-plugin-0.8.6j.diff
13. Edit config.php to set the proper URL path and user settings
- vi /var/www/html/cacti/include/config.php
- add line $config['url_path'] = '/cacti/'; in config.php file and save it
14. Adding cacti plugin
- Threshold
1. tar –zxvf thold-0-3-9.tar.gz
2. cp –Rf thold /var/www/html/cacti/plugins
3. vi /include/global.php
4. add line $plugins[] = 'thold'; in below this line $plugins = array(); and save it.
5. for another plugin, the steps is the same.

- Setting
1. tar –zxvf settings-0.4.tar
2. cp –Rf settings /var/www/html/cacti/plugins
3. vi /include/global.php
4. add line $plugins[] = 'settings'; in below this line $plugins = array(); and save it.
5. for another plugin, the steps is the same.
15. Browse to http://servername/cacti, login with username admin and password admin.
16. Click User Management, then choose admin in right side. In the session Realm Permissions, check View Thresholds and click Save button.

INSTALL BIND DI CENTOS 5

INSTALL BIND DI CENTOS 5

  1. Check apakah program bind sudah terinstall di server.

# ps –ax |grep named

Jika sudah, akan terdapat tulisan seperti dibawah ini

3837 ? Ssl 0:00 /usr/sbin/named -u named -t /var/named/chroot

  1. Apabila belum, download aplikasi dibawah ini. Program tersebut tersedia dalam CD CentOS 5

bind-libs-9.3.3-7.el5

bind-chroot-9.3.3-7.el5

kdebindings-3.5.4-1.fc6

bind-utils-9.3.3-7.el5

ypbind-1.19-7.el5

bind-9.3.3-7.el5

system-config-bind-4.0.3-2.el5.centos

  1. Extract dan Install aplikasi tersebut

# rpm –ivh bind-libs-9.3.3-7.el5

# rpm –ivh bind-chroot-9.3.3-7.el5

# rpm –ivh kdebindings-3.5.4-1.fc6

# rpm –ivh bind-utils-9.3.3-7.el5

# rpm –ivh ypbind-1.19-7.el5

# rpm –ivh bind-9.3.3-7.el5

# rpm –ivh system-config-bind-4.0.3-2.el5.centos

  1. Copy file named.conf dari /usr/share/system-config-bind/profiles/default kedalam /var/named/chroot/etc

  1. Copy semua file yang ada dalam /usr/share/system-config-bind/profiles/default/named ke dalam /var/named/chroot/var/named

  1. jalankan program bind

# service named restart

CONFIGURATION

Create New Zone (misalkan zona syseng.com – 192.168.10.10/24)

Nama server dns misalkan svrdevelop

  1. Buka file named.conf dengan menggunakan teks editor
  2. Ketik perintah di bawah ini di dalam named.conf

zone “0.0.127.in-addr.arpa” IN {

type master;

file “named.local”;

allow-update { none; };

};

zone “syseng.com” {

type master;

file “syseng.com.zone”;

};

zone “10.168.192.in-addr.arpa” {

type master;

file “10.168.192.in-addr.arpa.zone”;

};

Include “/etc/rndc.key”;

  1. Buat sebuah file yang bernama syseng.com.zone di dalam folder /var/named , pada teks editor buatlah perintah sbb :

@ IN SOA svrdevelop root.localhost(

15; serial

28800; refresh

7200; retry

604800;expire

86400; ttl

)

@ IN NS 10.1.1.27

www IN A 192.168.10.10

  1. Create file : 10.168.192.in-addr.arpa.zone at /var/named , write this command in file

$TTL 86400

@ IN SOA @ root.localhost (

3; serial

28800; refresh

7200; retry

604800; expire

86400; ttk

)

@ IN NS 192.168.10.10

254 IN PTR www.syseng.com

  1. Lakukan restart bind

# service named restart

Create New host domain (misalkan support.syseng.com di 192.168.10.12/24)

Buka file syseng.com.zone lalu tambahkan hostname untuk support, kemudian ganti angka serialnya lebih besar dari yang awal

@ IN SOA svrdevelop root.localhost(

20; serial

28800; refresh

7200; retry

604800;expire

86400; ttl

)

@ IN NS 10.1.1.27

www IN A 192.168.10.10

support IN A 192.168.10.12

Restart BIND.

# service named restart

Start Chat daemon Server Cpanel

Step-Step:

  1. Login ke IP server cpanel dengan menggunakan putty or ssh client user root
  2. Masukkan password yang diketahui
  3. Perlu diketahui untuk chat server menggunakan Ultimate IRCD yang bisa di download pada http://www.shadow-realm.org/
  4. Lokasi instalasi ada pada /usr/local/Uircd, /usr/local/Uircd-bs, /usr/local/Uircd-sms, /usr/local/Uircd-swt, /usr/local/Uircd-hrd
  5. Lakukan command su – uircd
  6. Kemudian lanjutkan dengan /usr/local/Uircd/bin/ircd , /usr/local/Uircd-bs/bin/ircd, /usr/local/Uircd-sms/bin/ircd, /usr/local/Uircd-swt/bin/ircd, dan /usr/local/Uircd-hrd/bin/ircd
  7. Untuk pengetesan bisa dengan menggunakan telnet ke port 6667, 6668, 6669 , 6670 dan 6671
  8. Kemudian ketikan logout 2x untuk keluar system

Instalasi Intranet di Linux

  1. Ambil file AutoIndex-2.2.2.tar.gz dari Intranet ( Atau versi terbaru )
  2. Taruh file tersebut ke server linux yang akan diinstall aplikasi intranet & save ke direktori /var/www/html/
  3. extract file tesebut dengan mengetikkan perintah tar –zxvf AutoIndex-2.2.2.tar.gz
  4. Buat satu folder baru dengan nama Intranet di direktori /var/www/html/AutoIndex/ dengan mengetikkan perintah ‘ mkdir intranet ‘
  5. Buka browser & arahkan ke http://localhost/AutoIndex ; localhost disini dimaksudkan IP server yang disiapkan untuk aplikasi intranet.
  6. Pas di tampilan “ AutoIndex PHP Script Configuration” ganti kolom Base Directory dengan ./intranet
  7. Centangin Enable Login System & Users must login to view/download (ini adalah optional)
  8. Isi kolom Access Log File dengan ‘log’
  9. Setelah itu, klik tombol Configure di tampilan “ AutoIndex PHP Script Configuration”