ANDI SURYANTO

Wana Wisata Rowo Bayu

Songgon, Banyuwangi- Jawa timur Merupakan wisata alam yang alami dan asri.

Smk 17 Agustus 1945 Genteng - XII tkj

yesi damita, nuri ulaika, bagus efendi, heri cahyono, maya safitri, reza tri , ayang putri, andi suryanto.

Universitas Udayana

Halim, Andi, Dayus, Wisnu, Arian.

SMP Negeri 1 Songgon - DKG (Dewan Kerja Galang)

Luristya nur mahfud, HD Sofyan, Andi Suryanto, Prasetyawan, Krisna nugraha.

Famili

Imet, Ciprut, Kepres, Mueng, kikik, komik.

Kamis, 21 Februari 2013

Prosedur instalasi server dengan linux ubuntu 10.04


Prosedur instalasi server dengan linux ubuntu 10.04

Ø Berdoa terlebih dahullu
Ø pastikan bahwa eth kita sudah terpasang dengan benar serta drivernya sudah terinstall (biasanya kalo sudah terdetect maka lampu indikator di lan kita hidup)
Ø pada dasarnya satu land card bisa di beri 2 ip address (nyata dan virtual)
Ø anda harus masuk sebagai root dengan perintah berikut “sudo –i” kemudian masukkan passwordnya
           
KONFIGURASI ALAMAT IP
Dalam melakukan configurasi dan pembuatan ip-address ada beberapa cara antara lain sbb :
1.    root:~#ifconfig eth0 192.168.0.1 netmask 255.255.255.0
configurasi seperti diatas bersifat temporary atau sementara bila komputer reboot maka ip-address kembali seperti semula.

2.    root:~#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).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
     address 192.168.55.1
     netmask 255.255.255.0
     network 192.168.55.0
     broadcast 192.168.55.255
     gateway 192.168.55.1

auto eth0:1
iface eth0:1 inet static
     address 192.168.4.44
     netmask 255.255.255.0
     network 192.168.4.0
     broadcast 192.168.4.255
     gateway 192.168.4.1

a.       Jika ada perintah yang di awali dengan tanda pagar “#” maka artinya adalah intruksi dan tidak di baca untuk settingan, jadi tidak usah di hiraukan.
b.      Pada contoh konfigurasi di atas di ketahui bahwa terdapat 2 ip yang di suntukkan pada land card yaitu ip nyata: 192.168.55.1 dan ip virtualnya: 192.168.4.44

3.    root:~#/etc/init.d/networking restart
     perintah di atas adalah perintah untuk merestart jaringan kita supaya settingan kita tersimpan

4.    root:~#ifconfig eth0
setelah itu untuk memastikan ip kita sudah tersetting dengan benar maka masukkan perintah untuk melihat alamat ip
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:36:02:04 
          inet addr:192.168.55.1  Bcast:192.168.55.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:4cff:fe36:204/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13914 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9002 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7050128 (7.0 MB)  TX bytes:2206266 (2.2 MB)
          Interrupt:26 Base address:0xc000

eth0:1    Link encap:Ethernet  HWaddr 00:e0:4c:36:02:04 
          inet addr:192.168.4.44  Bcast:192.168.4.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:26 Base address:0xc000
5.    root:~#ping 192.168.4.2
coba untuk melakukan ping untuk mengetahui konektifitas, seperti contoh di bawah penulis menanyakan konektifitas terhadap ip 192.168.4.2 yang merupakan ip repository lokal saya
jika ada jawaban seperti di bawah ini maka berhasil.
64 bytes from 192.168.4.2: icmp_seq=1 ttl=64 time=3.76 ms
64 bytes from 192.168.4.2: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 192.168.4.2: icmp_seq=3 ttl=64 time=0.085 ms
64 bytes from 192.168.4.2: icmp_seq=4 ttl=64 time=0.086 ms
64 bytes from 192.168.4.2: icmp_seq=5 ttl=64 time=0.085 ms
64 bytes from 192.168.4.2: icmp_seq=6 ttl=64 time=0.086 ms
64 bytes from 192.168.4.2: icmp_seq=7 ttl=64 time=0.087 ms
64 bytes from 192.168.4.2: icmp_seq=8 ttl=64 time=0.086 ms


setting repository supaya mengarah ke repository lokal
Setelah komputer kita bisa connect dan melakukan instalass paket dengan repository lokalnya maka langkah-langkahnya sebagai berikut. .
6.    root:~#nano /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

#deb http://id.archive.ubuntu.com/ubuntu/ lucid main restricted
#deb-src http://id.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
#deb http://id.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
#deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
#deb http://id.archive.ubuntu.com/ubuntu/ lucid universe
#deb-src http://id.archive.ubuntu.com/ubuntu/ lucid universe
#deb http://id.archive.ubuntu.com/ubuntu/ lucid-updates universe
#deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
#deb http://id.archive.ubuntu.com/ubuntu/ lucid multiverse
#deb-src http://id.archive.ubuntu.com/ubuntu/ lucid multiverse
#deb http://id.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
#deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://id.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
# deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu lucid partner
# deb-src http://archive.canonical.com/ubuntu lucid partner

#deb http://security.ubuntu.com/ubuntu lucid-security main restricted
#deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
#deb http://security.ubuntu.com/ubuntu lucid-security universe
#deb-src http://security.ubuntu.com/ubuntu lucid-security universe
#deb http://security.ubuntu.com/ubuntu lucid-security multiverse
#deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse

deb http://192.168.4.2 stable main contrib
Pastikan bahwa semua perintah sudah di beri tanda ‘#’ supaya perintahnya tidak terbaca oleh system. Kemudian masukkan skrip sebagaimana yang saya beri tanda pada contoh di atas. Sebagai berikut  “deb http://192.168.4.2 stable main contrib”

7.      root:~#apt-get update
perintah di atas di gunakan untuk merestart settingan repository supaya perubahan settingan yang baru saja kita ubah dapat terbaca.

instalasi paket softwere
8.      apt-get install mc  
mc di gunakan exspler berbasis text
9.      apt-get install nmap
10.  apt-get install ssh
11.  apt-get install bind9
kemudian ada pertanyaan lalu ketikkan ‘y’ . ini adalah untuk server DNS
12.  apt-get install apache2
kemudian ada pertanyaan lalu ketikkan ‘y’ . ini adalah untuk server web/http
13.  apt-get install vsftpd
kemudian ada pertanyaan lalu ketikkan ‘y’ . ini adalah untuk server ftp
14.  apt-get install squid
kemudian ada pertanyaan lalu ketikkan ‘y’ . ini adalah untuk server proxy
15.  setelah semua terinstall maka cek dengan perintah ‘nmap localhost’ maka akan muncul tampilan berikut apabila berhasil dan semua terinstall dengan baik
Starting Nmap 5.00 ( http://nmap.org ) at 2002-01-02 18:05 WIT
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost (127.0.0.1):
Not shown: 996 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
53/tcp   open  domain
80/tcp   open  http
3128/tcp open  squid-http

Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds

16.  KONFIGURASI DNS (domain name system / bind9)
A.    root:~#cd /etc/bind
masuk ke direktori /etc/bind
B.     root:/etc/bind#named.conf.local
kemudian masukkan skrip berikut

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "sekolah.sch.id" {
        type master;
        file "/etc/bind/db.sekolah";
};

zone "55.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.ip";
};

zone "institusi.com" {
        type master;
        file "/etc/bind/db.institusi";
};
C.    kemudian kita membuat file sesuai dengan skrip yang kita buat di named.conf.local barusan (yang saya beri tanda kuning)
a.      root:/etc/bind#nano db.sekolah
isikan skrip berikut
$TTL 604800
@    IN   SOA sekolah.sch.id. root.sekolah.sch.id. (
                     2          ; Serial
                     604800     ; Refresh
                     86400      ; Retry
                     2419200    ; Expire
                     604800 )   ; Negative Cache TTL



@    IN NS   sekolah.sch.id.
@    IN  A    192.168.55.1
@    IN  AAAA ::1


www  IN  A    192.168.55.1
ftp  IN  A    192.168.55.1
proxy IN  A    192.168.55.1
    Jika sudah maka simpan dengan menekan kombinasi ctrt+x , y lalu enter

b.      root:/etc/bind#nano db.ip
isikan skrip berikut
$TTL 604800
@    IN   SOA sekolah.sch.id. root.sekolah.sch.id. (
                     2          ; Serial
                     604800     ; Refresh
                     86400      ; Retry
                     2419200    ; Expire
                     604800 )   ; Negative Cache TTL


@    IN NS   sekolah.sch.id.

1    IN  PTR  www.sekolah.sch.id.
1    IN PTR  ftp.sekolah.sch.id.
1    IN  PTR  proxy.sekolah.sch.id.
    Jika sudah maka simpan dengan menekan kombinasi ctrt+x , y lalu enter

c.       root:/etc/bind#nano db.institusi
    Isikan skrip berikut
$TTL 604800
@    IN   SOA institusi.com. root.institusi.com. (
                     2          ; Serial
                     604800     ; Refresh
                     86400      ; Retry
                     2419200    ; Expire
                     604800 )   ; Negative Cache TTL



@    IN NS   institusi.com.
@    IN  A    192.168.55.1
@    IN  AAAA ::1


www  IN  A    192.168.55.1

   Jika sudah maka simpan dengan menekan kombinasi ctrt+x , y lalu enter

D.    root:~#nano /etc/resolv.conf
kemudian membuat file di direktory /etc/ dengan mengisikan skrip berikut
search www.institusi.com
nameserver 192.168.55.1

E.     root:~#/etc/init.d/bind9 restart
perintah di atas adalah perintah untuk merestart dns server kita supaya settingan yang baru saja kita buat dapat berjalan.
* Stopping domain name service... bind9                [ OK ]
* Starting domain name service... bind9                [ OK ]

F.     root:~#nslookup www.sekolah.sch.id
Server:    192.168.55.1
Address:   192.168.55.1#53

Name: sekolah.sch.id
Address: 192.168.55.1

G.    root:~#nslookup www.institusi.com
2 perintah di atas di gunakan untuk mengetahui apakah dns server kita sudah berjalan dengan baik. Jika berhasil maka akan muncul seperti berikut :
Server:    92.168.55.1
Address:   192.168.55.1#53

Name: institusi.com
Address: 192.168.55.1
    Maka dns server sudah terkonfigurasi dan sudah dapat di gunakan.

17.  Konfigurasi web server (apache2)
a.      root:~#cd /var/www
Perintah di atas di gunakan untuk  Masuk direktory /var/www

b.      root:/var/www#mkdir sekolah
kemudian isi direktory sekolah dengan file .html yang kita miliki. Jika kita tidak memiliki file html maka kita bisa mengcopy file index.html yang ada di direktory /var/www. Dengan perintah di bawah ini
·         root:/var/www#cp index.html sekolah/index.html (ubah file index.html yang ada di dalam direktory sekolah sesuai dengan keinginnan anda dengan perintah root:/var/www#nano sekolah/index.html )

c.       root:/var/www#mkdir institusi
kemudian isi direktory sekolah dengan file .html yang kita miliki. Jika kita tidak memiliki file html maka kita bisa mengcopy file index.html yang ada di direktory /var/www. Dengan perintah di bawah ini
·         root:/var/www#cp index.html sekolah/index.html (ubah file index.html yang ada di dalam direktory sekolah sesuai dengan keinginnan anda dengan perintah root:/var/www#nano sekolah/index.html )

d.      root:/var/www#ls
perintah di atas untuk melihat daftar file yang ada pada direktori /var/www
e.       kita bisa menghapus file index.html yang ada di /var/www dengan perintah
root:/var/www#rm index.html
f.       root:/var/www#cd /etc/apache2/sites-available
g.      root:/etc/apache2/sites-available#cp dafault sekolah
perintah di atas di gunakan untuk mengcopy file default dan mengganti namanya dengan sekolah
h.      root:/etc/apache2/sites-available#cp dafault institusi
perintah di atas di gunakan untuk mengcopy file default dan mengganti      namanya dengan institusi
i.        root:/etc/apache2/sites-available#nano sekolah
<VirtualHost *:80>
     ServerAdmin webmaster@localhost
     ServerName www.sekolah.sch.id
     DocumentRoot /var/www/sekolah
     <Directory />
           Options FollowSymLinks
           AllowOverride None
     </Directory>
     <Directory /var/www/sekolah/>
           Options Indexes FollowSymLinks MultiViews
           AllowOverride None
           Order allow,deny
           allow from all
     </Directory>

     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
     <Directory "/usr/lib/cgi-bin">
           AllowOverride None
           Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
           Order allow,deny
           Allow from all
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log

     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn

     CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>


Jika sudah maka simpan dengan menekan kombinasi ctrt+x , y lalu enter

j.        root:/etc/apache2/sites-available#nano institusi
<VirtualHost *:80>
     ServerAdmin webmaster@localhost
     ServerName www.institusi.com
     DocumentRoot /var/www/institusi
     <Directory />
           Options FollowSymLinks
           AllowOverride None
     </Directory>
     <Directory /var/www/institusi/>
           Options Indexes FollowSymLinks MultiViews
           AllowOverride None
           Order allow,deny
           allow from all
     </Directory>

     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
     <Directory "/usr/lib/cgi-bin">
           AllowOverride None
           Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
           Order allow,deny
           Allow from all
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log

     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn

     CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>


Jika sudah maka simpan dengan menekan kombinasi ctrt+x , y lalu enter

k.      root:~#/etc/init.d/apache2 restart
Restart web server supaya settingan terbaru kita dapat berjalan
l.        root:/etc/apache2/sites-available#a2ensite sekolah
m.    root:/etc/apache2/sites-available#a2ensite institusi
dua perintah di atas di gunakan untuk mengaktifkan settingan file sekolah dan institusi
n.      root:/etc/apache2/sites-available#a2dissite default
perintah di atas di gunakan untuk menonaktifkan file settingan default
o.      root:~#/etc/init.d/apache2 rastart
Restart web server supaya settingan terbaru kita dapat berjalan
p.      untuk mengetes apakah server apache kita sudah berjalan maka gunakan browser, kemudian ketik url: www.institusi.com jika berhasil akan muncul halaman sesuai dengan file yang kita upload di /var/www/institusi. Ini juga berlaku untuk www.sekolah.sch.id sesuai dengan file yang diupload pada /var/www/sekolah

18.  konfigurasi proxy server (squid)
a.      root:~#cd /etc/squid
perintah untuk masuk directory /etc/squid, pada settingan awal folder ini hanya berisi file bernama ‘squid.conf’
b.      root:/etc/squid/#nano dilarang.txt
Jika sudah maka simpan dengan menekan kombinasi ctrt+x , y lalu enter. Anda juga bisa menambahkan berbagai situs yang ingin di blokir
c.       root:/etc/squid/#gedit squid.conf
kemudian temukan bagian TAG: acl, trik untuk menemukannya dengan mudah maka gunakan editor gedit kemudian tekan kombinasi ‘ctrl+f’ masukkan kata kunci ‘TAG: http_access’ pas di atasnya perlu kita ketikkan acl sesuai dengan settingan kita, sebagaimana telah saya beri tanda pada konfigurasi seperti di bawah ini
acl SSL_ports port 443          # https
acl SSL_ports port 563          # snews
acl SSL_ports port 873          # rsync
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl Safe_ports port 631         # cups
acl Safe_ports port 873         # rsync
acl Safe_ports port 901         # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

acl stop dstdomain "/etc/squid/dilarang.txt"

#  TAG: http_access
#    Allowing or Denying access based on defined access lists
#
#    Access to the HTTP port:
#    http_access allow|deny [!]aclname ...
#
#    NOTE on default values:
#
#    If there are no "access" lines present, the default is to deny
#    the request.
#
#    If none of the "access" lines cause a match, the default is the
#    opposite of the last line in the list.  If the last line was
#    deny, the default is allow.  Conversely, if the last line
#    is allow, the default will be deny.  For these reasons, it is a
#    good idea to have an "deny all" or "allow all" entry at the end
#    of your access lists to avoid potential confusion.
#
#Default:
# http_access deny all

#Recommended minimum configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
#
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS


# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
http_access deny stop
# And finally deny all other access to this proxy
# http_access deny all
http_access allow all

d.      root:/etc/squid/#/etc/init.d/squid restart
perintah di atas di gunakan untuk merestart proxy server yang baru saja kita seting supaya konfigurasi kita dapat berjalan dengan baik.
e.       demikianlah cara konfigurasi server ubuntu 10.04, kemudian gunakan pc clien untuk mengecek apakah server kita sudah berjalan dengan baik
f.       Selamat berjuang kawan-kawan. . . . . !!!!