Sabtu, 15 Februari 2014

Konfigurasi Debian 6

Mengkonfigurasi Network

root@debian:~# nano /etc/network/interfaces
# The local network interface
auto eth0
iface eth0 inet static
            address 192.100.23.17
            netmask 255.255.255.248
            network 192.100.23.16
            gateway 192.100.23.22
            broadcast 192.100.23.23
            dns-nameserver 192.100.23.17
auto eth0:0
iface eth0:0 inet static
            address 192.100.23.18
            netmask 255.255.255.248
auto eth0:1
iface eth0:1 inet static
            address 192.100.23.19
            netmask 255.255.255.248
Konfigurai di atas saya menggunakan IP /29,tekan Ctrl +  O, enter (untuk menyimpan) dan 
tekan Ctrl + X (untuk keluar).
Setelah itu restart network dengan perintah service networking restart jika konfigurasi benar 
maka ketika di restart muncul tulisan done.

root@debian:~# nano /etc/resolv.conf
search rizal.sch.id
nameserver 192.100.23.17
Untuk domain saya gunakan rizal.sch.id dan  nameserver masukan address pertama kita.


DNS SERVER

Install Bind9
root@debian:~# apt-get install bind9

Setting file bind9

root@debian:~# nano /etc/bind/named.conf


zone “rizal.sch.id”{

            type master;

            file “db.rizal”;

};

zone “192.in-addr.arpa”{

            type master;

            file “db.192”;

};


Kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar)

Setting file forward dari DNS

root@debian:~# cd /etc/bind

roloot@debian:~# cp db.local /var/cache/bind/db.rizal

root@debian:~# nano /var/cache/bind/db.rizal


$TTL    604800

@         IN         A          rizal.sch.id.         root.rizal.sch.id. (

                                                2                      ; Serial

                                      604800                      ; Refresh

                                        86400                      ; Retry

                                    2419200                      ; Expire

                                      604800                      ; Negative Cache TTL

;

@         IN         NS        rizal.sch.id.

@         IN         A          192.100.23.17

www      IN         A          192.100.23.18

mail     IN         A          192.100.23.19


kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar)

root@debian:~# cp db.127 /var/cache/bind/db.192

root@debian:~# nano /var/cache/bind/db.192


$TTL    604800

@         IN         A          rizal.sch.id.         root.rizal.sch.id. (

                                                1                      ; Serial

                                      604800                      ; Refresh

                                        86400                      ; Retry

                                    2419200                      ; Expire

                                      604800                      ; Negative Cache TTL

;

@                        IN          NS       rizal.sch.id.

17.23.168          IN         PTR      rizal.sch.id.

18.23.168          IN         PTR      www.rizal.sch.id.

19.23.168          IN         PTR      mail.rizal.sch.id.

           

kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar) lalu restart bind9


root@debian:~# /etc/init.d/bind9 restart

root@debian:~# nslookup rizal.sch.id

root@debian:~# nslookup 192.168.23.17

root@debian:~# nslookup www.rizal.sch.id

root@debian:~# nslookup 192.168.23.18

root@debian:~# nslookup mail.rizal.sch.id

root@debian:~# nslookup 192.168.23.19

WEB SERVER

Buat Web
root@debian:~#nano /var/www/index.html
Kemudian isi web dan save Ctrl + O lalu exit Ctrl + X
Install Paket Web Server
root@debian:~# apt-get install apache2 links
Setting Virtual Host

root@debian:~# cd /etc/apache2/sites-enabled

root@debian:~# cp 000-default www

root@debian:~# nano www

           
 <VirtualHost  192.100.23.18:80>                                 

ServerAdmin webmaster@localhost

ServerName www.rizal.sch.id                                                   


kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar)

WEBMAIL SERVER

Install Paket Webmail Server

debian-server:~# apt-get install squirrelmail (masukan dvd 1 - 3)

Konfigurasi Apache2

debian-server:~# nano /etc/apache2/apache2.conf


Include “/etc/squirrelmail/apache.conf”      


debian-server:~# nano /etc/squirrelmail/apache.conf


# users will prefer a simple URL like http://webmail.example.com

<VirtualHost  192.100.23.19:80>                                 

DocumentRoot /usr/share/squirrelmail                    

ServerName mail.rizal.sch.id                                       

</VirtualHost>

#. . .

MAIL SERVER

Install Paket Mail Server

root@debian:~# apt-get install  postfix  courier-imap  courier-pop

Membuat directory mail server

debian-server:~# maildirmake /etc/skel/Maildir


Menambahkan user (buat 2 user)

debian-server:~# adduser user1


Adding user `user1' ...

Adding new group `manshurin' (1007) ...

Adding new user `manshurin' (1007) with group `manshurin' ...

Creating home directory `/home/manshurin' ...

Copying files from `/etc/skel' ...

Enter new UNIX password: ****

Changing the user information for manshurin

Enter the new value, or press ENTER for the default

Full Name []:

Room Number []:

Work Phone []:

Home Phone []:

Other []:

Is the information correct? [Y/n] y

·      
Konfigurasi Postfix

debian-server:~# nano  /etc/postfix/main.cf


myhostname = rizal.sch.id                                            
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = rizal.sch.id, mail.rizal.sch.id, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 192.168.23.19/29
#mailbox_command = procmail -a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

home_mailbox = Maildir/                              #Tambahkan pada baris paling bawah

Selanjutnya, tinggal tambahkan sedikit konfigurasi pada postfix melalui dpkg. Ikuti langkahnya seperti dibawah ini.


debian-server:~# dpkg-reconfigure postfix


General Type of Mail Configuration   : Internet Site

System Mail Name                               : rizal.sch.id

Root and postmaster mail recipient   : (biarkan kosong)

Other destination to accept...               : (pilih ok)

Force synchronous updates...             : No

Local Networks                                       : (pilih ok)

Use Procmail for local delivery           : No

Mailbox size limit (bytes)                      : 0

Local address extension character     : +

Internet protocols to use                        : ipv4


debian-server:~# /etc/init.d/postfix restart

debian-server:~# /etc/init.d/courier-imap restart

debian-server:~# /etc/init.d/courier-pop restart

debian-server:~# /etc/init.d/apache2 restart


Selanjutnya, tinggal mengecek apakah konfigurasi kita berhasil

Cek Web Server


debian-server:~# links www.rizal.sch.id

debian-server:~# links 192.100.23.18


·     Cek Mail Server


debian-server:~# links mail.rizal.sch.id
debian-server:~# links 192.168.23.19
lalu akan muncul tampilan seperti ini ..
lalu silahkan masuk dengan adduser anda tadi 


0 komentar:

Posting Komentar