Cara Membuat domain name server(DNS) dan Mail server di linux Blankon
- Merupakan distribusi Linux yang aktif dikembangkan secara terbuka oleh komunitas dan merupakan salah satu yang terbesar di Indonesia.
- Menerapkan konsep Indonesia (Bahasa, Tema Seni dan Budaya, Aksara Nusantara dan Aplikasi Khas)
- BlankOn memiliki repositori dengan jumlah aplikasi yang besar.
- Memiliki fokus membuat segalanya siap pakai (wifi, dukungan multimedia).
- Panduan, bantuan dan dukungan penggunaan BlankOn mudah diperoleh.
PERINTAH DASAR LINUX
- rm = hapus
- cp = copy
- vi/vim/pico = mengubah
1. INSTALL BIND
- sudo su
- apt-get install bind9
- yum install bind9
2. SETTING IP
- pico /etc/network/interfaces
- rubah ip
- restart servicenya
- /etc/init.d/networking restart
- /etc/init.d/networking reload
- ifconfig
- ping 192.168.69.1
3.DNS SERVER
- pico /etc/resolv.conf
- cd /etc/bind
- pico named.conf.local
- cp db.127 db.69.168.192
- pico db.69.168.192
- touch db.dani.org
- touch db.69.168.192
- chown bind.bind db.dani.org
- chown bind.bind db.69.168.192
- chmod 644 db.dani.org
- chmod 644 db.69.168.192
- restart servicenya
- /etc/init.d/bind9 restart
- /etc/init.d/bind9 reload
- nslookup 192.168.69.1
- nslookup www.dani.org
- ping 192.168.69.1
- ping www.dani.org
Install dan Konfigurasi Mail
IP Server : 192.168.56.200
Domain : dani.com
Install DNS Server
sudo apt-get install bind9
Konfigurasi DNS Server
cd /etc/bind
sudo nano named.conf.local
Tambahkan pada baris paling bawah
zone “dani.com” {
type master;
file “/etc/bind/db.dani”;
};
zone “56.168.192.in-addr.arpa” {
type master;
notify no;
file “/etc/bind/db.56”;
};
Copy file contoh konfigurasi domain
sudo cp db.local db.dani
sudo cp db.127 db.56
Edit file db.dani
sudo nano db.dani
Hasilnya seperti ini :
;; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA dani.com. root.dani.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dani.com.
@ IN A 192.168.56.200
ns IN A 192.168.56.200
www IN A 192.168.56.200
mail IN A 192.168.56.200
sudo nano db.56
Hasilnya seperti ini;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA dani.com. root.dani.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dani.com.
200 IN PTR dani.com.
ns IN PTR 192.168.56.200
www IN PTR 192.168.56.200
mail IN PTR 192.168.56.200
Edit file /etc/resolv.confsudo nano /etc/resolv.conf
Tambahkan
nameserver 192.168.56.200
search dani.com
Restart service DNS
sudo /etc/init.d/bind9 restart
Pengujian domain
nslookup dani.com
Server: 192.168.56.200
Address: 192.168.56.200#53
Name: dani.com
Address: 192.168.56.200
dig dani.com; <<>> DiG 9.8.1-P1 <<>> dani.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64274
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;dani.com. IN A
;; ANSWER SECTION:
dani.com. 604800 IN A 192.168.56.200
;; AUTHORITY SECTION:
dani.com. 604800 IN NS dani.com.
;; Query time: 6 msec
;; SERVER: 192.168.56.200#53(192.168.56.200)
;; WHEN: Sun Mar 16 10:18:06 2014
;; MSG SIZE rcvd: 63
Install Web Server
sudo apt-get install apache2 php5 php5-cgi libapache2-mod-php5
Install Mail Server
sudo apt-get install postfix
Pilih Internet Site, OK
tekan OK
Set Maildir
sudo maildirmake.courier /etc/skel/Maildir
Tambah 2 user yang akan digunakan sebagai account email
Saya menambahkan user rms dan linus
sudo adduser rms
Adding user `rms’ …
Adding new group `rms’ (1001) …
Adding new user `rms’ (1001) with group `rms’ …
Creating home directory `/home/rms’ …
Copying files from `/etc/skel’ …
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for rms
Enter the new value, or press ENTER for the default
Full Name []: RMS
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
Konfigurasi ulang postfix
sudo dpkg-reconfigure postfix
kosong kan tekan OK
Tambahkan mail.dani.com
Limit mailbox, 0 = unlimit. OK
Isinya +, OK
Pilih IPv4, OK
Set alamat Mailbox
sudo nano /etc/postfix/main.cf
Tambahkan pada baris paling bawah
home_mailbox = Maildir/
Restart service mail server
sudo /etc/init.d/postfix restart
sudo /etc/init.d/courier-pop restart
sudo /etc/init.d/courier-imap restart
Install aplikasi web mail Squirrelmail
sudo apt-get install squirrelmail
Koneksikan Apache dan Squirrelmail
sudo nano /etc/apache2/apache2.conf
Cari baris kode di bawah ini
# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf
Tambahkan
Include /etc/squirrelmail/apache.conf
Edit apache.conf pada squirrelmail
sudo nano /etc/squirrelmail/apache.conf
Cari baris kode
</Directory>
Tambahkan di bawahnya
<VirtualHost 192.168.56.200:80>
DocumentRoot /usr/share/squirrelmail
ServerName mail.mawi-server.com
</VirtualHost>
Restart web server
sudo /etc/init.d/apache2 restart
Pengujian mail server, login ke squirrelmail dan lakukan pengiriman email
http://mail.dani.com
Login user [email protected]