Professional Documents
Culture Documents
256-240= 16 Blok kelipatan 0,16,32,64, Ip Pertama : 192.168.1.1 NAMA DOMAIN : smkbs.sch.id Ip Terakhir : 192.168.1.14 Broadcast : 192.168.1.15
1. 2. 3. 4. 5. 6.
A. Setting Network
Langkah setting network
1. pilih desktop, pilih administration, klik networking 2. pilh nic yang aktif, klik propertis
masukan : IP addres 192.168.1.1 subnetmask 255.255.255.240 Getway 192.168.1.1
isikan pada menu general hostname : smkbs domain name : smkbs.sch.id Isikan pada DNS server : 192.168.1.1 isikan pada search domain : smkbs.sch.id setelah selesai klik ok a
# pico /etc/network/interfaces
# The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.240 network 192.168.1.0 broadcast 192.168.1.15 gateway 192.168.1.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.1.1 dns-search smkbs.sch.id untuk keluar dan save tekan tombol ctrl+x >y (yes)
:
debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BF:5E:19:C9 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::250:bfff:fe5e:19c9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:902 errors:0 dropped:0 overruns:0 frame:0 TX packets:2081 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:116241 (113.5 KiB) TX bytes:141221 (137.9 KiB) Interrupt:5 Base address:0xa800
eth1 Link encap:Ethernet HWaddr 00:A0:00:02:FE:AA UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:11 Base address:0xac00
inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1105 errors:0 dropped:0 overruns:0 frame:0 TX packets:1105 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:97805 (95.5 KiB) TX bytes:97805 (95.5 KiB)
Konfigurasi hosts
# The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.209 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.163 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.168 ms
Jika berhasil maka akan muncul seperti diatas jika gagal cek pada hosts dan resolv.conf
B. DHCP
Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: dhcp3-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/292kB of archives. After unpacking 836kB of additional disk space will be used. Preconfiguring packages ... Selecting previously deselected package dhcp3-server. (Reading database ... 72002 files and directories currently installed.) Unpacking dhcp3-server (from .../dhcp3-server_3.0.4-13_i386.deb) ... Setting up dhcp3-server (3.0.4-13) ... Generating /etc/default/dhcp3-server... Starting DHCP server: dhcpd3 failed to start - check syslog for diagnostics. invoke-rc.d: initscript dhcp3-server, action "start" failed.
2. edit dan ketikan pada dhcpd.conf ( gunakan perintah pico utk mengedit teks)
debian:/etc/dhcp3# pico dhcpd.conf # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #}
hapus tanda ( #) dan tuliskan konfigurasinya menjadi : # A slightly different configuration for an internal subnet. subnet 192.168.1.0 netmask 255.255.255.240 { range 192.168.1.5 192.168.1.14; option domain-name-servers 192.168.1.1; option domain-name "smkbs.sch.id"; option routers 192.168.1.1; option broadcast-address 192.168.1.15;
3. Tekan Ctrl x dan jawab yes untuk menyimpan teks dan keluar
udp 0 0 *:32773 *:* udp 0 0 *:32774 *:* 2850/rpc.statd udp 0 0 debian.com:netbios-ns *:* 2778/nmbd udp 0 0 *:netbios-ns *:* 2778/nmbd udp 0 0 *:906 *:* 2850/rpc.statd udp 0 0 debian.com:netbios-dgm *:* 2778/nmbd udp 0 0 *:netbios-dgm *:* 2778/nmbd udp 0 0 localhost.localdoma:921 *:* 2284/lwresd udp 0 0 *:817 *:* 2761/rpc.mountd udp 0 0 debian.com:domain *:* 2270/named udp 0 0 localhost.locald:domain *:* 2270/named udp 0 0 *:mdns *:* 2638/avahi-daemon: udp 0 0 *:sunrpc *:* 2017/portmap udp 0 0 *:ipp *:* 2563/cupsd udp6 0 0 *:32769 *:* 2270/named udp6 0 0 *:32771 *:* 2284/lwresd
Instalasi BIND
Reading package lists... Done Building dependency tree... Done Suggested packages: bind-doc The following packages will be REMOVED:
bind9 The following NEW packages will be installed: bind 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. Need to get 0B/966kB of archives. After unpacking 1356kB of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 71947 files and directories currently installed.) Removing bind9 ... Stopping domain name service...: bind. Selecting previously deselected package bind. (Reading database ... 71924 files and directories currently installed.) Unpacking bind (from .../b/bind/bind_8.4.7-1_i386.deb) ... Replaced by files in installed package dnsutils ... Setting up bind (8.4.7-1) ... Installing new version of config file /etc/bind/named.conf ... Installing new version of config file /etc/bind/named.conf.local ... Installing new version of config file /etc/bind/named.conf.options ... Starting domain name service: named.
Konfigurasi named.conf
/ be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912
Lakukan pengcopian ke 2 file pada direktori /etc/bind yaitu db.local menjadi forward dan db.127 menjadi reverse
Konfigurasi Forward
smkbs:/etc/bind# pico forward ; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA localhost. root.localhost. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ;
@ IN NS localhost. @ IN A 127.0.0.1
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA smkbs.sch.id. root.smkbs.sch.id. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS smkbs.sch.id. @ IN A 192.168.1.1 IN MX 10 mail.smkbs.sch.id. ns IN A 192.168.1.1 www IN CNAME @ tkj IN CNAME @ mail IN CNAME @
Konfigurasi Reverse
; ; BIND reverse data file for local loopback interface ; $TTL 604800 @ IN SOA localhost. root.localhost. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS localhost. 1.0.0 IN PTR localhost.
$TTL 604800 @ IN SOA smkbs.sch.id. root.smkbs.sch.id. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS smkbs.sch.id. 1 IN PTR smkbs.sch.id.
PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.209 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.163 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.168 ms
PING smkbs.sch.id (192.168.1.1) 56(84) bytes of data. 64 bytes from smkbs.sch.id.sch.id (192.168.1.1): icmp_seq=1 ttl=64 time=0.117 ms 64 bytes from smkbs.sch.id.sch.id (192.168.1.1): icmp_seq=2 ttl=64 time=0.140 ms 64 bytes from smkbs.sch.id.sch.id (192.168.1.1): icmp_seq=3 ttl=64 time=0.160 ms 64 bytes from smkbs.sch.id.sch.id (192.168.1.1): icmp_seq=4 ttl=64 time=0.154 ms
www.smkbs.sch.id is an alias for smkbs.sch.id. smkbs.sch.id has address 192.168.1.1 smkbs.sch.id mail is handled by 10 mail.smkbs.sch.id.
; <<>> DiG 9.3.4 <<>> www.smkbs.sch.id ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52928 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1
;; ANSWER SECTION: www.smkbs.sch.id. 604800 IN CNAME smkbs.sch.id. smkbs.sch.id. 604800 IN A 192.168.1.1 ;; AUTHORITY SECTION: smkbs.sch.id. 604800 IN NS smkbs.sch.id.
;; ADDITIONAL SECTION: smkbs.sch.id. 604800 IN A 192.168.1.1 ;; Query time: 3 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Wed Apr 7 20:28:53 2010 ;; MSG SIZE rcvd: 94
Cek dibrowser melalui Epiphany Web Browser www.sm kbs.sch.i d atau dengan IP Address 192.168. 1.1
D. Instalasi Apache2
Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: apache2 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/38.6kB of archives. After unpacking 86.0kB of additional disk space will be used. Selecting previously deselected package apache2. (Reading database ... 71959 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.2.3-4_all.deb) ... Setting up apache2 (2.2.3-4) ...
php-pear The following packages will be REMOVED: libapache2-mod-php4 The following NEW packages will be installed: libapache2-mod-php5 php5 php5-common 0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded. Need to get 0B/2626kB of archives. After unpacking 2875kB of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 71961 files and directories currently installed.) Removing libapache2-mod-php4 ... Module php4 disabled; run /etc/init.d/apache2 force-reload to fully disable. Selecting previously deselected package php5-common. (Reading database ... 71958 files and directories currently installed.) Unpacking php5-common (from .../php5-common_5.2.0-8+etch1_i386.deb) ... Selecting previously deselected package libapache2-mod-php5. Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.2.0-8+etch1_i386.d eb) ... Selecting previously deselected package php5. Unpacking php5 (from .../php5_5.2.0-8+etch1_all.deb) ... Setting up php5-common (5.2.0-8+etch1) ... Setting up libapache2-mod-php5 (5.2.0-8+etch1) ... Creating config file /etc/php5/apache2/php.ini with new version Forcing reload of web server (apache2).... Setting up php5 (5.2.0-8+etch1) ...
Konfigurasi php
smkbs:/home/smk# cd /var/www smkbs:/var/www# pico info.php
ketikan :
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.188 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.153 ms 64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=0.150 ms
2. Buat website direktori /var/www smkbs:/var/www # mkdir -p /var/www/www.smkbs.sch.id/public_html smkbs:/var/www # mkdir -p /var/www/tkj.smkbs.sch.id/public_html
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA smkbs.sch.id. root.smkbs.sch.id. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS smkbs.sch.id. @ IN A 192.168.1.1 IN MX 10 mail.smkbs.sch.id.
Konfigurasi Reverse
; ; BIND reverse data file for local loopback interface ;
$TTL 604800 @ IN SOA smkbs.sch.id. root.smkbs.sch.id. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS smkbs.sch.id. 1 IN PTR smkbs.sch.id. 1 IN PTR mail.smkbs.sch.id. 2 IN PTR tkj.smkbs.sch.id.
Konfigurasi pada default pada direktori /etc/apache2/sites-available masuk ke direktori /etc/apache2/sites-available/default Perintah :
Konfigurasi file default Konfigurasi pada default pada direktori /etc/apache2/sites-available masuk ke direktori /etc/apache2/sites-available Jangan lupa back up terlebih dahulu default menjadi nama file master
<VirtualHost 192.168.1.2>
smkbs:/etc/apache2# cd /etc/apache2 smkbs:/etc/apache2# ls apache2.conf envvars mods-available ports.conf sites-enabled conf.d httpd.conf mods-enabled sites-available
Lakukan service : 1. smkbs:/etc/apache2# /etc/init.d/bind restart Stopping domain name service: named.
Copyright 2010 SMK-TI Bina Sejahtera 1 Linux Debian Etch 4.0 Teknik Komputer & Jaringan