MEMBANGUN DNS SERVER DAN DHCP SERVER
1. DNS SERVER
instal paket program
#apt-get install bind9
KONFIGURASI DNS
edit file named.conf dg printah mcedit /etc/bind/named.conf
zone “tkj.com” { =====è nama dns yang kita inginkan
type master;
file “/var/cache/bind/db.tkj”; =====è letak konfigurasi zone file
};
zone “192.in-addr.arpa” {
type master;
file “/var/cache/bind/db.192″;
};
KONFIGURASI ZONE FILE
Buat file dengan perintah touch db.tkj (sesuaikan dg file d named.conf) tw km kopikan dari db.localhost dg pncet tombol F5 tp ganti nmanya menjadi db.tkj n letakkan di /var/cache/bind/
Dan edit sprti d bwah ini
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA tkj.com. root.tkj.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS tkj.com. ==èd ganti dg nama domain yang anda gunakan
www IN A 192.168.1.1 =èganti ip yang anda gunakan
satunya lg nmax db.192 (sesuaikan dg file d named.conf)
isinya sama dg db.tkj tp ganti yang
@ IN A 192.168.1.1 menjadi
1.1.168 IN PTR tkj.com
Restart dg perintah # /etc/init.d/bind9 restart klo tidak muncul tanda eror insyalloh DNS server anda berhasil
DHCP SERVER
Install dg printah
#apt-get install dhcp3-server
KONFIGURASI
Edit file dg perintah mcedit /etc/dhcp3/dhcp.conf
# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 { ==è subnet n netmask ip anda
range 192.168.1.2 192.168.1.10;==è rentangan ip yang akan bsa d pakai
option domain-name-servers tkj.com; ==è nama DNS anda
# option domain-name “internal.example.org”;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
Ket: Lainnya ksih tanda comment aj (#)
Setelah itu restart dhcp serverx dg printah
#/etc/init.d/dhcp3-server restart
klo tidak muncul tanda eror insyalloh dhcp server anda berhasil
FTP SERVER
Install dg printah
#Apt-get install vsftpd
Trus konfigurasi dengan perintah mcedit /etc/vsftpd.conf
Edit seperti di bawah ini/yang bergaris bawah
(hanya menghilangkan tanda comment/# aj)
# Allow anonymous FTP? (Beware – allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages – messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using “root” for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
Ket : yang di perlu d edit hanya yang bergaris bawah J aj lainnya biarin aj
Setelah itu restart dengan perintah /etc/init.d/vsftpd restart
SAMBA
MEMBUAT FILE SHARING DI WINDOWS
Samba Client Howto
Peralatan :
Komputer Client : 192.168.56.178[Linux Debian]
Komputer Server : 192.168.56.44[Windows XP]
Konfigurasi Komputer Server
1. Buat folder c:/temp di windows XP
2. Share folder c:/temp
Konfigurasi Komputer Client
1. Install package smbclient dan samba-common
# apt-get install smbclient
# apt-get install samba-common
2. Install package smbfs untuk mount windows share directly
# apt-get install smbfs
3. Testing smbclient untuk browse share directory
smbclient -L [KomputerServer]
# smbclient -L 192.168.56.44
# masukkan password : [password]
Contoh hasil ;
Sharename Type Comment
——— —- ——-
IPC$ IPC Distant IPC
D$ Disk default Share
ShareDocs Disk
islam Disk
temp Disk
ADMIN$ Disk Remote Admin
wwwroot$ Disk Used for file share access to
web projects
C$ Disk default Share
hpdeskje Printer hp deskjet 845c
Server Comment
——— ——-
Workgroup Master
——— ——-
4. Testing me-mount share directory
# cd /mnt
# mkdir tempclient
# mount -t smb //192.168.56.44/temp /mnt/tempclient
5. Cek Hasilnya
# cd /mnt
# ls -l
jika berhasil akan muncul file share directory
//192.168.56.44/temp
MEMBUAT FILE SHARING DI LINUX
komputer server : 192.168.56.178[Linux Debian]
komputer client : 192.168.56.44[windows XP]
Komfigurasi Komputer Server
1. Install Package samba
# apt-get install samba
2. Konfigurasi samba
# vim /etc/samba/smb.conf
3. Menjalankan service samba
# /etc/init.d/samba [start|restar|stop]
4. Membuat file sharing di linux
a. Buka file smb.conf
# vim /etc/samba/smb.conf
b. Edit bagian [global]
Bagian [global]
Workgroup = asseifff
Netbios name = DEBIAN
Server string = Sharing file in asseifff
Security = share
Domain logons = no
c. Membuat direktori yang akan dishare
contoh : /home/temp
[temp]
comment = temp asseifff
path = /home/temp
browseable = yes
writeable = yes
public = yes
5. Testing samba
Buka dari komputer client [windows] dan lakukan
map network drive ke direktori
komputer server yang telah dishare.
6. testparm /etc/samba/smb.conf
NB: untuk mengelola samba di LINUX dengan tampilan GUI
dapat menggunakan aplikasi SWAT.
Install saja :
# apt-get install swat
Test swat dg browser :
http://localhost:901/globals
MEMBUAT SAMBA PASSWORD
1. # cat /etc/passwd > /etc/smbpasswd
2. pastikan root yg punya akses ke samba password
# chmod 600 /etc/smbpasswd
3. Set Samba password tiap user
# smbpasswd username
4. Edit smb.conf –> tambahkan
encrypt password = yes
smb passwd file = /etc/smbpasswd
5. Restart service
# /etc/init.d/samba restart
CONNECTING to A SAMBA MACHINE IN LINUX
1. install smbclient di computer client
# apt-get install smbclient
2. Tes Service samba
# smbclient \\SERVERSAMBA\sharename
or
# smbclient \\SERVERSAMBA\username
- masukkan nama
- masukkan samba password
# help –> coba semua perintah tsb
MENGAKSES SAMBA Dari Windows dg Prompt
net use d: \\SERVERSAMBA\[sharename|username]
SERVER MAIL POSTFIX SQUIRREL MAIL DEBIAN 4
Persyaratan : DNS, apache2, php4, mysql-server
1. Install postfix
# apt-get install postfix
# /etc/init.d/postfix [start|stop|restart]
2. Install courier-imap
# apt-get install courier-imap
# /etc/init.d/courier-imap [start|stop|restart]
3. Install php4-imap (optional)
4. Install courier-pop
# apt-get install courier-pop
# /etc/init.d/courier-pop [start|stop|restart]
# /etc/init.d/courier-authdaemon [start|stop|restart]
5. konfigurasi file main.cf
# vim /etc/postfix/main.cf
contoh konfigurasi :
——————
myhostname = profff.asseifff.net
mydomain = asseifff.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $mydomain, localhost
home_mailbox = Maildir/
relayhost =
mynetworks = 127.0.0.0/8 192.168.56.0/24
#mailbox_command = procmail -a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
————
6. Install squirrelmail
# apt-get install squirrelmail
7. Konfigurasi /usr/sbin/squirrelmail-configure
# /usr/sbin/squirrelmail-configure
buat konfigurasinya…
server software : courier
8. Buat Virtualhost squirrelmail
# vim /etc/apache2/sites-available/default
Alias /mail “/usr/share/squirrelmail/”
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
deny from all
Allow from all
9. Membuat folder Maildir di user tertentu
# cd /home/asseifff
# maildirmake Maildir
# chown asseifff.asseifff Maildir/ -Rf
10. Membuat folder Maildir otomatis ketika create user
# cd /etc/skel
# maildirmake Maildir
11. Testing squirrelmail
Buka browser :
http://profff.asseifff.net/src/configtest.php
http://profff.asseifff.net/mail/src/configtest.php
http://mail.asseifff.net/mail
12. Testing mail server
a. Buat user_baru
b. masuk ke http://mail.asseifff.net/mail
dengan login asseifff
c. kirim email ke user_baru
d. apakah berhasil..????
e. cek error :
# tail -f /var/log/[mail.log | mail.info | mail.err]
:::Asseifff:::
Tutorial : – http://www.postfix.or.id/docs.html
perhatian bila anda tidak bisa harap hub: polisi terdekat apabila tidak ada polisi panggil tetangga anda apabila tetangga anda tidak ada juga teriaklah sekeras-kerasnya.. selamat mencoba