Powered by Blogger.

Mengenai Saya

Langgan

Total Tayangan Laman

Blog Archive

Twitter Tweets

Like us on Facebook

Popular Posts

MEMBANGUN DNS, WEBSERVER DAN MAIL SERVER
CLIENT
DENGAN
OS WINDOWS 7

SERVER
DENGAN
OS DEBIAN 5

           Kali ini saya akan posting tentang cara 'MEMBANGUN DNS, WEBSERVER DAN MAIL SERVER'
            Sebelum masuk ke dalam konfigurasi IP address terlebih dahulu kita mengedit file”interfaces”berikut langkah-langkah pengeditannya:
1.masukkan perintah “Nano /etc/network/interfaces” lalu enter
Interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.10.1
netmask 255.255.255.0
gateway 192.168.10.1

auto eth0:1
iface eth0:1 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1

auto eth0:2
iface eth0:2 inet static
address 192.168.10.3
netmask 255.255.255.0
gateway 192.168.10.1


Lalu simpan file diatas dengan menekan tombol CTRL+X lalu tekan Y kemudian enter
1.    /etc/init.d/networking restart
2.    apt-cdrom add
3.    apt-get –y install bind9
4.    cd /etc/bind
5.    cp named.conf named.conf.local
6.    buka dan edit file named.conf.local menjadi seperti dibawah ini dengan memasukkan perintah “nano named.conf.local”lalu enter
Named.conf.local

zone “smk.com” {
type master;
file “/etc/bind/db.1”;
};
zone “10.168.192.in-addr.arpa” {
type master;
file “/etc/bind/db.2”;
};

Lalu simpan file diatas dengan menekan CTRL +X lalu tekan Y kemudian enter
7.    cp db.local db.1
8.    cp db.127 db.2
9.    buka dan edit file db.1 menjadi seperti dibawah ini dengan perintah ”nano db.1”lalu enter.
Db.1
;
; BIND data file for local loopback interface
$TTL 604800
@ IN SOA smk.com. root.smk.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@        IN       NS      ns.smk.com.
ns       A        192.168.10.1
ns       IN       A         192.168.10.1
www  IN       A        192.168.10.2
mail    IN         A         192.168.10.3


Simpan file dengan menekan CTRL +X lalu tekan Y kemudian enter
10. buka dan edit file db.2 dengan perintah “nano db.2” lalu enter
Db.2
;
; BIND reverse data file for broadcast zone
;
$TTL 604800
@ IN SOA smk.com. root.smk.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@        IN        NS       ns.smk.com.
1          IN       PTR    ns.smk.com.


11. edit file options lalu ganti forwarders dengan menggunakan ip induk dengan perintah “nano named.conf.options”

Options
options {
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
192.168.10.1;
};
allow-query { any; };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

Lalu simpan dengan menekan CTRL +X lalu tekan Y kemudian enter
12. edit file resolv mnjadi seperti di bawah ini dengan perintah “nano /etc/resolv.conf”lalu enter
Resolv
search central.com
nameserver 192.168.10.1
nameserver 192.168.10.2
nameserver 192.168.10.3


13. lalu simpan file diatas kemudian restart dengan perintah “/etc/init.d/bind9 restart”lalu enter
14. setelah semuanya selesai tinggal lalkukan pengujian dengan perintah “nslookup ns.smk.com”lalu enter
Server: 192.168.10.1
Address: 192.168.10.1#53


Name: ns.smk.com
Address: 192.168.10.1


15. nslookup www.smk.com
Server: 192.168.10.1
Address: 192.168.10.1#53
Name: www.central.com
Address: 192.168.10.2


16. nslookup mail.smk.com
Server: 192.168.10.1
Address: 192.168.10.1#53
Name: mail.central.com
Address: 192.168.10.3


17. apt-get –y install apache2 php5 php5-cgi libapache2-mod-php5
18. cd /etc/apache2/sites-enabled
19. buat file ke dalam nano www menjadi seperti di bawah ini dengan perintah “nano www”lalu enter
Nano www
<VirtualHost *>
            DocumentRoot /var/www
            ServerName www.smk.com
            ErrorLog /var/log/apache2/error.log
</VirtualHost>             


20. cd /var/www
21. edit file index.html dengan perintah “nano index.html”lalu enter
Index.html

<html><body><h1>
Selamat Datang di WebSite SMKN 1 Sumarorong
</h1> </body></html>

Setelah itu restart dengan menggunakan perintah “/etc/init.d/apache2 restart
22. apt-get –y install lynx
23. selanjutnya kita lakukan pengujian dengan perintah lynx www.smk.com lalu tekan enter
Selamat Datang di Website SMKN 1 Sumarorong









Command: Use arrow keys to move, '?' for help, 'q' to quit, '←' to go back.
Arrow keys: Up and Down to move. Right to follow a link; Left to go back.
H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list
           
Jika output dari perintah “lynx www.smk.comseperti
diatas, maka bisa dinyatakan bahwa konfigurasi Web Server telah berhasil,
dan selanjutkan konfigurasi Virtual Directory untuk Web Server dengan
langkah-langkah berikut:
24. masukkan perintah”apt-get –y install postfix”lalu tekan enter

25. apt-get –y install courier-imap courier-pop
26. maildirmake.courier /etc/skel/Maildir
27. selatjutnya masukkan nama dengan perintah “adduser hendra”lalu tekan enter
28. isih pasword “password :123456”lalu tekan enter
29. masukkan pasword yang sama “retype password:123456”lalu tekan enter
30. masukkan nama lain “adduser tes”lalu tekan enter
31. isi password “password :12345”lalu tekan enter
32. masukka ulang pasword “retype password:12345”tekan enter
33. echo “home_mailbox = Maildir/” >> /etc/postfix/main.cf
34. dpkg-reconfigrure postfix
35. /etc/init.d/postfix restart
36. /etc/init.d/courier-imap restart
37. /etc/init.d/courier-pop restart
38. apt-get –y install squirrelmail
39. cd /etc/apache2
40. lalu buka dan edit file apache2 menjadi seperti di bawah ini dengan perintah “nano apache2.conf"
Apache2.conf
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
# 8
ErrorLog ${APACHE_LOG_DIR}/error.log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf
Include /etc/squirrelmail/apache.conf
# Include all the user configurations:
Include httpd.conf


41. jika pengeditan file apache.conf selesai lalu masukkan perintah nano /etc/squirrelmail/apache.conf
# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
<VirtualHost 192.168.10.1:80>
DocumentRoot /usr/share/squirrelmail
ServerName mail.central.com
</VirtualHost>
# users will prefer a simple URL like http://webmail.example.com
#<VirtualHost 1.2.3.4>
# DocumentRoot /usr/share/squirrelmail
# ServerName webmail.example.com
#</VirtualHost>       
42. selanjutnya restart apache dengan menggunakan perintah “/etc/init.d/apache2 restart”lalu tekan enter
43. setelah itu kita jalankan perintah “Lynx mail.central.com”lalu akan tampil jendela “lynx”seperti berikut:














mail.smk.sch.id cookie: SQM=73nrb4liu6 Allow? (Y/N/Always/neV


     Kemudian jika muncul pesan seperti diatas, lalu tekan “Y”, lalu akanKtampil menu login webmail seperti berikut:


SquirrelMail – Login


SquirrelMail Logo
SquirrelMail version 1.4.21
By the SquirrelMail Project Team

              SquirrelMail Login
Name: ____________________
Password: ____________________
Login
(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off.
Enter text into the field by typing on the keyboard
Ctrl-U to delete all text in field, [Backspace] to delete a character



    Jika sudah tampil halaman login seperti diatas, artinya
konfigurasi Web mail pada Web Server telah berhasil., dan untuk keluar
dari jendela aplikasi “lynx”, tekan tombol kombinasi “CTRL + C

  Selamat mencoba semoga dapat bermanfaat bagi teman-teman.....
dan ingat semakin banyak kita berbagi ilmu maka semakin banyak juga ilmu yang akan kita dapatkan
       Salam berbagi ilmu....














Simplex Magazine2

Aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.