SettingServerDebianLennyVersiCDTk Prov
SettingServerDebianLennyVersiCDTk Prov
I. INSTALL
1. Untuk instalasi hanya gunakan CD 1
2. Network configuration method : do not configure the Networks at this time
3. Hostname : server10.lks10.sch.id
4. Partition : Guded – use entire disk
5. Partition scheme : all files in one partition
6. User : root, password : lks2009
7. Tidak perlu scan CD lain, nanti saja setelah selesi install bisa memalui console
8. Choose software to install :
[*] Web Server
[*] Standart System
total hanya 102 paket
9. GRUB on MBR
1|P a g e
links : browser basis teks
dnsmasq : DNS server dan DHCP server
squid : proxy server
squirrelmail : aplikasi Web Mail
courier : IMAP dan POP daemon
mysql : database MySQL
phpmyadmin : Tool Konfigurasi PHP dan MySQL
proftpd : FTP server
postfix : Mail Server
samba ; File dan sprint sharring
3. Configuring phpMyAdmin, isi password untuk root, misal : 123, lakukan 2 kali untuk verifikasi
4. Web Server to reconfigure pilih
[*] apache2
5. Postfix Configuration
General type of mail configuration : pilih internet with smarthost
System mail name : server10.lks10.sch.id
SMTP Relay Host : smtp.lks10.sch.id
6. Samba Server
Workgroup/Domain Name : WORKGROUP
Modify smb.conf to use WINS setting from DHCP ? pilih No
7. Run proftpd : pilih standalone
8. Configuring Courier base : create directories for Web-based administration? Pilih No
IV. SET IP
1. Setting IP sementara :
Berguna untuk mengetahui Networks address, netmask, dan broadcast tanpa menghitung
manual
#ifconfig eth0 192.168.10.1/29
Lakukan perintah ifconfig untuk membaca konfigurasi IP eth0, lalu ingat / catat !!!
#ifconfig eth0
2. Setting IP Permanen :
#mcedit /etc/networks/interfaces
Baris yang sudah ada / lo (loopback 0) :
auto l0
iface lo0 inet loopback
Tambahkan baris berikut :
auto eth0
iface eth0 inet static
address 192.168.10.1
netmask 255.255.255.248
broadcast 192.168.10.7
gateway 192.168.10.1
3. Restart service networking :
#/etc/init.d/networking restart
V. DNS Server
dnsmasq
1. Install paket jika belum :
#apt-get install dnsmasq
2. Edit /etc/hosts :
#mcedit /etc/hosts
Tambahkan / masukkan ip dan hostname sesuai keinginan :
127.0.0.1 localhost
192.168.10.1 server10 server10.lks10.sch.id lks10.sch.id
www.server10.lks10.sch.id www.lks10.sch.id
Tambahkan juga ip dan hostname untuk simulasi ACL dan Proxy squid :
100.100.100.1 www.yahoo.com
100.100.100.2 www.detik.com
2|P a g e
100.100.100.3 www.kompas.com
200.200.200.1 www.debian.org
200.200.200.2 www.redhat.org
200.200.200.3 www.google.com
200.200.200.4 www.susefaq.sourceforge.net
200.200.200.5 www.linux.or.id
3. Buat sekaligus edit /etc/resolv.conf :
#mcedit /etc/resolv.conf
Isikan untuk DNS Resolve (Hirarki DNS di atas / parent dari Server, ditambahkan di sini) :
search localdomain optional, boleh tidak disertakan
search lks10.sch.id optional, boleh tidak disertakan
nameserver 127.0.0.1
nameserver 192.168.10.1
3|P a g e
acl lokal src 192.168.10.0/29
http_access allow lokal
di mcedit tekan F7 untuk search. Cari “http_port 3128”
http_port 3128
ditambah/diganti dengan :
http_port 3128 transparent
3. Restart service squid
#/etc/init.d/squid restart
4. Redirect paksa semua request Web (port 80) agar selalu melalui port squid (port 3128)
#iptables -A PREROUTING -p tcp - -dport 80 -j REDIRECT - -to-port
3128 -t nat
Tapi settingan iptables tersebut hanya sementara,saat reboot akan hilang
Cara agar Permanen :
a. Redirect port 80 ke 3128
#iptables -A PREROUTING -p tcp - -dport 80 -j REDIRECT - -to-
port 3128 -t nat
b. Simpan ke file mana saja, misal : /etc/iptables.rules
#iptables-save > /etc/iptables.rules
c. Edit / Tambahkan di baris paling bawah /etc/network/interfaces :
pre-up iptables-restore < /etc/iptables.rules
post-down iptables-save > /etc/iptables.rules
5. Restart service squid
#/etc/init.d/squid restart
4|P a g e
.. dst ... yang lain copy dari bagian atasnya
5. Restart service apache2
#/etc/init.d/apache2 restart
6. Membuat folder Maildir otomatis ketika create user
# cd /etc/skel
# maildirmake Maildir
7. Membuat folder Maildir pada user yang sudah ada
# cd /home/account1
# maildirmake Maildir
# chown account1. account1 Maildir/ -Rf
8. Buat user baru
# adduser account2 --home /home/account2
# adduser account2 --home /home/account3
9. Sampai di sini seharusnya user-user yang ada sudah bisa login ke
http://www.lks10.sch.id/mail/, tetapi INBOX masih kosong.
Test konfigurasi dengan http://www.lks10.sch.id/mail/src/configtest.php
10. Konfigurasi exim4 agar menggunakan Maildir bukan mbox
# dpkg-reconfigure exim4-config
General type of mail configuration : pilih mail sent by smarthost : received
via SMTP or fetchmail
Machine to relay mail for : kosong
Delivery method for local mail : pilih maildir format in home directory
11. Okehh selesai. Tinggal akses http://www.lks10.sch.id/mail/. Ditarik dari Outlook
Express juga bisa. Untuk POP3 pake server server10.lks.sch.id. Untuk SMTP nya
nanti di langkah selanjutnya.
5|P a g e
chown mengubah kepemilikan
chgrp mengubah group kepemilikan
XIII. ProFTPD
1. Install proftpd jika belum :
#apt-get install proftpd
Saat ditanya apakah servis akan ikut inetd atau stand alone pilih stand alone.
Secara otomatis proftpd akan membuat user ftp dengan home directory /home/ftp yang
digunakan untuk keperluan login anonymous
2. Edit file konfigurasi:
#mcedit /etc/proftpd/proftpd.conf
Unquote semua baris di bawah ini :
DefaultRoot ~ penjara / jail untuk user
UseIPv6 off
PassivePorts 30000 30200
<Anonymous ~ ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
6|P a g e
MaxClients 50
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit WRITE>
DenyAll ganti dengan “AllowAll“ agar anonymous bisa upload / write
</Limit>
</Directory>
</Anonymous>
3. Restart ProFTP;
#/etc/init.d/proftpd restart
4. Buka ftp dengan ftp://server10.lks10.sch.id, maka akan masuk ke folder milik
anonymous yaitu : /home/ftp. Jika ingin menggunakan username account1 dan masuk ke
home folder account1 (/home/account1) buka ftp dengan
ftp://account1@server10.lks10.sch.id
7|P a g e