Jumat, 07 Maret 2014

SETING NIC Debian 5

Posted by Dian Nurma A. On Jumat, Maret 07, 2014 | No comments


SETING NIC



vim /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


# The primary network interface
auto eth0
iface eth0 inet static
      address 200.100.50.25
      netmask 255.255.255.240
      network 200.100.50.25.16
      broadcast 255.255.255.31
      gateway 200.100.50.25
      # dns-* options are implemented by the resolvconf package, if installed
      dns-nameservers 200.100.50.25
      dns-search ns

vim /etc/hosts

127.0.0.1 localhost
200.100.50.25 ns.sekolah.sch.id ns
# 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

vim /etc/resolv.conf

search sekolah.sch.id
nameserver 200.100.50.25

vim /etc/hostname

Merestart layanan network
ns:~# /etc/init.d/networking restart


SETING DNS DAN APACHE ( Seting  DNS )
  • Install Bind9
ns:~# apt-get install bind9

  • Copi file db.local ke       /etc/bind/db.for  :
  • cp /etc/bind/db.local /etc/bind/db.for dengan isi file sbb

;
; BIND data file for local loopback interface
;
$TTL  604800
@     IN    SOA   ns.sekolah.sch.id. root.sekolah.sch.id. (
                        2           ; Serial
                   604800           ; Refresh
                    86400           ; Retry
                  2419200           ; Expire
                   604800 )   ; Negative Cache TTL
;
@     IN    NS    ns.sekolah.sch.id.
      IN    MX    10    mail.sekolah.sch.id.
ns    IN    A     200.100.50.25
www   IN    CNAME ns
ftp   IN    CNAME ns
mail  IN    CNAME ns
jurusan     IN    CNAME ns
  


  • Copi file db.127 ke       /etc/bind/db.rev  :
  • cp /etc/bind/db.127 /etc/bind/db.rev  dengan  isi file sbb

;
; BIND reverse data file for local loopback interface
;
$TTL  604800
@     IN    SOA   ns.sekolah.sch.id. root.sekolah.sch.id. (
                        1           ; Serial
                   604800           ; Refresh
                    86400           ; Retry
                  2419200           ; Expire
                   604800 )   ; Negative Cache TTL
;
      IN    NS    ns.sekolah.sch.id.
25    IN    PTR   ns.sekolah.sch.id.
·       Edit file named.conf    di  /etc/bind  isi file

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
      type hint;
      file "/etc/bind/db.root";
};


// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
      type master;
      file "/etc/bind/db.local";
};

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

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

zone "255.in-addr.arpa" {
      type master;
      file "/etc/bind/db.255";
};
zone "sekolah.sch.id" {
      type master;
      file "/etc/bind/db.for";
};
zone "50.100.200.in-addr.arpa" {
      type master;
      file "/etc/bind/db.rev";
};
include "/etc/bind/named.conf.local";

·        Restart bind9
·       nslookup 200.100.50.25
·       nslookup  ns.sekolah.sch.id, ip clinet dns di patch ke ip 200.100.50.25
·       seting cline tip 200.100.50.30 , 255.255.255.240, 200.100.50.25 , dns 200.100.50.25
·       Di cek pakai client ping www,sekolah,sch.id , ping jurusan.sekolah.sch.id


SETING APACHE

  • install apache

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/sekolah

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/jurusan
  • vim /etc/sites-available/jurusan isi file
NameVirtualHost 200.100.50.25:80
<VirtualHost 200.100.50.25:80>
      ServerAdmin dwi@smk.net
      ServerName jurusan.sekolah.sch.id
      DocumentRoot /home/dwi/jurusan/
     

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

      ErrorLog /var/log/apache2/error.log

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

      CustomLog /var/log/apache2/access.log combined
      ServerSignature On
</VirtualHost>

  • mkdir –p /home/dwi
  • mkdir –p/home/dwi/jurusan
  • mkdir –p /home/dwi/cgi-bin
  • copikan file index.php ke /home/bagus/jurusan
  • cd /etc/apache2/sites-enabled
  • a2ensite  jurusan
  • a2dissite default
  • restart apache
 Dengan cara yang sama buat untuk yang dokumen root /home/dwi/sekolah
Panggil lewat ie : www.sekolah.sch.id

0 komentar:

Posting Komentar

Blogroll

Flag Counter

Jadwal Sholat

p style="text-align: center;">jadwal-sholat