- Back to Home »
- Cara Membangun DNS dan Web Mail Server
Posted by : Unknown
Thursday, February 5, 2015
Saya akan menjelaskan sedikit bagaimana cara installasi membagun DNS dan Web Mail server
saya disini menggunakan distro Linux Debian untuk medianya.
untuk lebih lengkapnya dengan gambar bisa download di sini
Cara konfigurasinya
Konfigurasi
DNS Server
- install OS linux
- setting interfaces
# pico
/etc/network/interfaces
Tambahkan interface
auto eth0
iface eth0
inet static
address 202.100.4.65
netmask
255.255.255.224
auto
eth0:0 --------------->>
ini sub interface ( tagging )
iface
eth0:0 inet static
address
202.100.4.66
netmask
255.255.255.224
auto
eth0:1
iface
eth0:1 inet static
address
202.100.4.67
netmask
255.255.255.224
- install paket bind9 ( Domain
Name System )
# apt-get
install bind9
- konfigurasi bind9
- pindah directory ke bind
#
cd /etc/bind
- edit file named.conf
#pico
name.conf
Tambahkan zone
zone
“sekolah.sch.id” {
type master;
file “/etc/bind/forward”;
};
zone
“4.100.202.in-addr.arpa” {
type master;
file “/etc/bind/reverse”;
};
- kopi file db.local untuk
forward dan db.127 untuk reverse
#
cp db.local forward
#
cp db.127 reverse
- edit file forward dan reverse
untuk
forward
#pico
forward
Edit file tersebut
;
; BIND data file for
local lookback interface
;
$TTL 604800
@ IN SOA sekolah.sch.id. root. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ;
Negative Cache TTL
;
@ IN NS sekolah.sch.id.
@ IN A 202.100.4.65
ns IN A 202.100.4.65
www IN A 202.100.4.66
mail IN A 202.100.4.67
Untuk
reverse
# pico reverse
Edit file tersebut
;
; BIND reverse data
file for local lookback interface
;
$TTL 604800
@ IN SOA sekolah.sch.id. root. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ;
Negative Cache TTL
;
@ IN NS sekolah.sch.id.
65 IN A ns.sekolah.sch.id.
66 IN A www.sekolah.sch.id.
67 IN A mail.sekolah.sch.id.
- buat file resolv.conf
#
pico /etc/resolv.conf
Tambahkan
domain
sekolah.sch.id
nameserver
127.0.0.1
nameserver
202.100.4.65
- restart
#
/etc/init.d/networking restart
#
/etc/init.d/bind9 restart
Konfigurasi
Web dan Mail Server + WebMail ( squirrelmail )
- Install apache2, php5, mysql-server,
mysql-client, mysql ( untuk web ) postfix, dovecot-imapd, dovecot-pop3d,
squirrelmail ( untuk mail )
#apt-get
install apache2 php5 mysql-server mysql-client
Configurasi
mysql-server
New
password for the MySQL "root" user:
root
Repeat password
for the MySQL "root" user:
Root
#apt-get
install postfix dovecot-imapd dovecot-pop3d squirrelmail
Configurasi
postfix
Postfix
configuration
<ok>
General
type of mail configuration:
No
configuration
- Ulang konfigurasi postfix
# dpkg-reconfigure postfix
Akan muncul tampilan configure
postfix
Postfix configuration
<ok>
General
type of mail configuration:
Internet
site
System
mail name:
Sekolah.sch.id
Root and
portmaster mail recipient:
(kosong)
Other
destinations to accept mail for (blank for none):
sekolah.sch.id,
debian, localhost.localdomain, localhost
-->> harus ada
Force
synchronous updates on mail queue?
<no>
Local
network
127.0.0.0/8
[::ffff:127.0.0.0]/104 [::1]/128, 202.100.4.67/27 -->> ip untuk mail
Use
procmail for local delivery?
<yes>
Mailbox
size limit (bytes):
0
Local
address extension character:
+
Internet
protocols to use:
all
- Konfigurasi tampilan web
- Pindah directory ke
sites-availables
#
cd /etc/apache2/sites-available
- Kopi file default menjadi web
dan mail
#cp
default web
#cp
default mail
- Edit file web dan mail
Untuk
web
#pico
web
Edit file tersebut
<VirtualHost
202.100.4.66:80>
ServerAdmin webmaster@sekolah.sch.id
ServerName
www.sekolah.sch.id
DocumentRoot /var/www/web
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/web>
Options Indexes FollowSymLinks
MultiViews
AllowOverride None
……
Untuk
mail
#pico
mail
Edit file tersebut
<VirtualHost
202.100.4.67:80>
ServerAdmin webmaster@sekolah.sch.id
ServerName
mail.sekolah.sch.id
DocumentRoot /usr/share/squirrelmail
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /usr/share/squirrelmail>
Options Indexes FollowSymLinks
MultiViews
AllowOverride None
……
- Mengaktifkan site web dan mail
#a2ensite
web
#a2ensite
mail
- Menonaktifkan site default
#a2dissite
default
- Pindah directory ke www
#
cd /var/www
- Buat directory web pada www (
mail tidak usah, sudah pakai squirrelmail)
#
mkdir web
- Kopi file index.html
#cp
index.html web/index.html
- Pindah directory ke web
#cd
web
- lalu Edit file index.html
#pico
index.html
Rubah jika perlu
<html>
<body>
<h1>Selamat
Datang di Website </h1>
</body>
</html>
- Konfigurasi apache untuk mail
- Edit file apache2.conf
#
pico /etc/apache2/apache2.conf
Edit file tersebut
#
Include the virtual host configurations:
Include
/etc/apache2/sites-enabled/
include
/etc/squirrelmail/apache.conf
- Edit file dovecot.conf
# pico /etc/dovecot/dovecot.conf
Edit file tersebut
……
protocols = imap imaps pop3 pop3s
……
#disable_plaintext_auth = yes ---> hilangkan tanda pagar dan yes diganti
no
- Tambahkan user untuk mail
debian:~#
adduser client
Adding
user `client' ...
Adding new
group `client' (1003) ...
Adding new
user `client' (1003) with group `client' ...
Creating
home directory `/home/client' ...
Copying
files from `/etc/skel' ...
Enter new
UNIX password:
Retype new
UNIX password:
passwd:
password updated successfully
Changing
the user information for client
Enter the
new value, or press ENTER for the default
Full Name []: engineer
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the
information correct? [Y/n] y
- Restart
#
/etc/init.d/postfix restart
#
/etc/init.d/apache2 restart
#
/etc/init.d/dovecot restart
Konfigurasi pada PC client
- Install os windows
- Setting interface
3. Lakukan testing ( ping
interfaces, domain, test domain pada browser
dan akan terlihat tampilan yang sudah dibuat di " SELAMAT DATANG DI WEBSITE"
4. Browse link mail.sekolah.sch.id dengan menggunakan browser
Terima kasih