1. Setting IP address
pada file /etc/network/interfaces kemudian isikan :
#nano /etc/network/interfaces
# This file
describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# and how to activate them. For more information, see interfaces(5).
# The
loopback network interface
auto lo
iface lo inet loopback
auto lo
iface lo inet loopback
# The
primary network interface
auto eth0
iface eth0 inet static
address 192.168.3.108
netmask 255.255.255.0
gateway 192.168.3.1
auto eth0
iface eth0 inet static
address 192.168.3.108
netmask 255.255.255.0
gateway 192.168.3.1
auto eth1
iface eth1 inet static
address 192.168.50.1
netmask 255.255.255.0
gateway 192.168.50.1
iface eth1 inet static
address 192.168.50.1
netmask 255.255.255.0
gateway 192.168.50.1
Restart Networking untuk menerapkan konfigurasi yang baru
#/etc/init.d/networking restart
#/etc/init.d/networking restart
Periksa kembali dengan ifconfig
apakah sudah sesuai atau tidak.
Konfigurasi DNS Server dengan bind9
Konfigurasi DNS Server (bind9) pada ubuntu,
Lakukan perubahan pada file
named.conf.local #nano /etc/bind/named.conf.local
zone “smk3.sch.id”
{
type master;
file “/etc/bind/db.smk3.sch.id”;
};
type master;
file “/etc/bind/db.smk3.sch.id”;
};
zone “50.168.192.in-addr.arpa”
{
type master;
notify no;
file “/etc/bind/db.192″;
};
type master;
notify no;
file “/etc/bind/db.192″;
};
Berikutnya adalah buat file /etc/bind/db.smk3.sch.id,
/etc/bind/db.profilku.com, /etc/bind/db.192 dengan perubahan seperti berikut
ini :
file
db.sekolah.sch.id
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.smk3.sch.id. root.smk3.sch.id. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.smk3.sch.id.
@ IN A 127.0.0.1
ns IN A 192.168.50.1
www IN CNAME ns.
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.smk3.sch.id. root.smk3.sch.id. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.smk3.sch.id.
@ IN A 127.0.0.1
ns IN A 192.168.50.1
www IN CNAME ns.
File db.profilku.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.profilku.com. root.profilku.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.profilku.com.
@ IN A 127.0.0.1
@ IN AAAA ::1
ns IN A 10.0.0.2
www IN CNAME ns.
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.profilku.com. root.profilku.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.profilku.com.
@ IN A 127.0.0.1
@ IN AAAA ::1
ns IN A 10.0.0.2
www IN CNAME ns.
File db.192
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.smk3.sch.id. root.smk3.sch.id. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
1 IN PTR ns.sekolah.sch.id.
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.smk3.sch.id. root.smk3.sch.id. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
1 IN PTR ns.sekolah.sch.id.
2 IN PTR ns.profilku.com
Jika sudah
selesai restart kembali DNS servernya :
#/etc/init.d/bind9 restart
arahkan agar komputer me-resolve
name server ke DNS server yang telah dibuat dengan cara mengisikan baris
berikut pada /etc/resolv.conf
nameserver 192.168.50.1
Konfigurasi Web server menggunakan
apache
Konfigurasi Web Server menggunakan
apache
Membuat file /etc/apache2/sites-available/www.smk3.sch.id,
/etc/apache2/sites-available/www.profilku.com
Berikut ini adalah isi dari
konfigurasi yang saya buat dari masing2 file tersebut
file /etc/apache2/sites-available/www.smk3.sch.id
<VirtualHost
*:80>
ServerAdmin webmaster@smk3.sch.id
ServerName http://www.smk3.sch.id
DocumentRoot /home/smk3
ServerAdmin webmaster@smk3.sch.id
ServerName http://www.smk3.sch.id
DocumentRoot /home/smk3
<Directory
/home/smk3>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog
/var/log/apache2/www.smk3.sch.id-error.log
LogLevel
warn
CustomLog
/var/log/apache2/www.smk3.sch.id-access.log combined
</VirtualHost>
File
/etc/apache2/sites-available/www.profilku.com
<VirtualHost
*:80>
ServerAdmin webmaster@smk3.sch.id
ServerName http://www.smk3.sch.id
DocumentRoot /home/smk3
ServerAdmin webmaster@smk3.sch.id
ServerName http://www.smk3.sch.id
DocumentRoot /home/smk3
<Directory
/home/smk3>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog
/var/log/apache2/www.smk3.sch.id-error.log
LogLevel
warn
CustomLog
/var/log/apache2/www.smk3.sch.id-access.log combined
</VirtualHost>
Untuk pengetesan agar tidak ribet
copykan saja file index.html yang ada di /var/www ke lokasi document root
(modifikasi sedikit agar terlihat bedanya).
Langkah berikutnya adalah
menerapkan/enable konfigurasi site yang dibuat sebelumnya dengan menggunakan
perintah a2ensite
setelah itu lakukan reload apache :
root@tekaje27#service apache2 reload
virtual direktori (User Directory) :
Jika kita ingin dapat melihat
direktori user seperti http://www.smk3.sch.id/~datasekolah maka perlu mengaktifkan modul apache yang bernama userdir cara mengaktifkannya dapat
menggunakan perintah a2enmod
root@tekaje27#a2enmod userdir
Enabling module userdir.
Run '/etc/init.d/apache2 restart' to activate new configuration!
Run '/etc/init.d/apache2 restart' to activate new configuration!
root@tekaje27#service apache2
restart
buat user datasekolah dengan perintah adduser
root@tekaje27#adduser datasekolah
Lakukan pengisian sesuai permintaan pada console.
Agar ~datasekolah dapat diakses maka buatkan direktori publik_html di
/home/datasekolah/
root@tekaje27#mkdir /home/datasekolah/public_html/
Konfigurasi vsftpd
Untuk konfigurasi vsftpd agar user dapat menulis file ubah baris berikut
pada /etc/vsftpd.conf
write_enable=No
menjadi
write_enable=YES
Pengujian
pada client
Lakukan setting IP pada client sesuai dengan permintaan soal. Client
yang saya gunakan menggunakan sistem operasi linux meskipunn yang saya gunakan
adalah ubuntu desktop tapi saya yakin hal ini tidak mengurangi hasil pengujian.
Pengujian web server
untuk pengujian user direktori
sebelumnya buat saja file teks misalkan test.txt (isinya apa saja) pada
direktori /home/datasekolah/public_html/
Jika sudah sesuai maka untuk web
server sesuai soal sudah selesai… bagaimana dengan profilku.com? silahkan lakukan pengetesan juga
Pengujian vsftpd
untuk menguji ftp server kita jalan
atau tidak dapat dilakukan pengetesan dari client software untuk ftp yang
berbasis gui
Tidak ada komentar:
Posting Komentar