Pages

Selasa, 03 September 2013

Konfigurasi Web Server Debian



Konfigurasi Web Server Debian
KONFIGURASI WEBSERVER DEBIAN LENNY  5

Informasi
Kata yang bertuliskan HITAM tebal adalah command /perintah
Kata yang bertuliskan MERAH   adalah kata yang harus dibuat /di edit
Setting ip address
Command :~#nano /etc/network/interfaces
allow-hotplug eth0
 iface eth0 inet static
address  192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1







Restart Network
Command :~#/etc/init.d/networking restart

Edit host
Command :~#nano /etc/hosts
127.0.0.1         localhost
127.0.0.1         azoema.net     tkj
Ubah menjadi seperti di bawah ini
127.0.0.1         localhost
192.168.1.2     azoema.net     tkj

Install Mysql Server ,Mysql Client, Bind9, Apache2, Php5 dan PhpMyadmin
Command :~#apt-get install mysql-server mysql-client apache2 bind9 php5 phpmyadmin
Please enter your password :*******
Retype your password: *******

Setting bind9
Copy file terlebih dahulu
Command :~#cp /etc/bind/db.127  /etc/bind/db.192
Command :~#cp /etc/bind/db.local  /etc/bind/db.azoema

Edit file db.192
Command:~#nano /etc/bind/db.192

;
;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

;
@         IN         NS        localhost.
1.0.0    IN         PTR      localhost.

Ubah seperti di bawah ini :
;
;BIND            reverse data file for local loopback interface
;
$TTL              604800
@      IN         SOA     azoema.net. root.azoema.net.  (
                                                         1          ; Serial
604800         ; Refresh
86400           ; Retry
2419200       ; Expire
604800 )       ; Negative Cache

;
@      IN         NS        azoema.net.
2.1.168         IN         PTR      azoema.net.
2.1.168         IN         PTR      www.azoema.net.
2.1.168         IN         PTR      webmail.azoema.net.
2.1.168         IN         PTR      ftp.azoema.net.


edit file db.azoema
Command:~#nano /etc/bind/db.azoema
;
;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

;
@       IN         NS        localhost.
@       IN         A          127.0.0.1
@       IN         AAA     ::1

Ubah seperti di bawah ini :
;
;BIND             reverse data file for local loopback interface
;
$TTL               604800
@       IN         SOA     azoema.net. root.azoema.net.  (
                                                           1          ; Serial
604800           ; Refresh
86400             ; Retry
2419200         ; Expire
604800 )         ; Negative Cache

;
@       IN         NS        azoema.net.
@       IN         A          192.168.1.2
@       IN         A          www.192.168.1.2
@       IN         A          webmail.192.168.1.2
@       IN         A          ftp.192.168.1.2


Edit file named.conf di dalam bind9
Command:~#nano /etc/bind/named.conf
Cari script berikut:
Zone “localhost” {
type master;
file “/etc/bind/db.local”;
};
Zone “127.in-addr.arpa” {
type master;
file “/etc/bind/db.127”;
};
Ubah menjadi :
Zone “azoema.net” {
type master;
file “/etc/bind/db.azoema.net”;
};
Zone “192.in-addr.arpa” {
type master;
file “/etc/bind/db.192”;
};

Restart Bind9
Command:~#/etc/init.d/bind9 restart
Coba buka melalui browser
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpS_y2B-N_LXZOecGtrqTaynNn1uAC0ukav3x_uCm7TuawWd-QbbqeJWV8hOevj1pAsdYhmyRGfqxQLXrnExwTrQFlOhJc8RZLhHzjfpjS_Y9SzrIyQAxUukTyn5nlVaGyQIx_6kix0sU/s640/browser.png
Jika mau mengubah index.html masuk  ke folder var/www
Command:~#cd /var/www
Untuk melihat isi dari folder www ketikan ls
Command:~#ls
Index.html
Lalu edit file index.html tersebut
Command:~#nano index.html
<html><body><h1>It’s Work’s !</h1></body>
</html>

Install ftp
Command:~#apt-get install proftpd
Buat folder untuk FTP
Command:~#mkdir –p /ftpserver
Ubah akses foldernya
Command:~#chmod 775 –R /ftpserver
Buat user untuk ftp
Command:~#useradd –d /ftpserver ftp
 Buatlah file di dalam directory ftpserver Contoh:
 Command:~#nano /ftpserver/test.txt


Install Squirrelmail /webmail
Command:~#apt-get install postfix squirrelmail courier-imap courier-pop
Create directories for web-based administration        : NO
Local only                                                                   : OK
General type of mail configuration                              : Internet Site
System mail name                                                       : azoema.net


Konfigurasi squirrelmail

Command:~#nano /etc/apache2/apache2.conf
                 
 
            # Include the virtual host configurations:
                 
 Include /etc/apache2/sites-enabled/
                 
 Include /etc/squirrelmail/apache.conf






Command:~#nano /etc/squirrelmail/apache.conf

# users will prefer a simple URL like http://webmail.example.com
#<virtualhost 1.2.3.4>
# DocumentRoot /usr/share/squirrelmail
# ServerName webmail.example.com
#</virtualhost>
Ubah seperti di bawah ini :
<virtualhost *:80>
DocumentRoot /usr/share/squirrelmail
ServerName    webmail.azoema.net
</virtualhost>





Restart apache
Command:~#/etc/init.d/apache2 restart

Buka di browser http://webmail.azoema.net

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50cud9PWBdK6qIbZuy9M1YOtt33G-V1wKALmP1wY2R1unx-flsd6K2CRlAuupo0WbUCn1EgbG8-zKrbXAXo_nUgBAUuEekOb8A_I2Zs12UWWoA9Xw5sfw6ZUu_Vl8AMirnLNn4gkv_Gs/s640/squirrel.png

Buat folder untuk webmail
Command:~#Maildirmake /etc/skel/Maildir
Buatlah user baru
Command:~#adduser indra
Command:~#adduser joko
Command:~#dpkg-reconfigure postfix
Local only                                                                       : OK
General type of mail configuration                                     : Internet Site
System mail name                                                            : azoema.net
Root and postmaster mail recipient                                   : (kosongkan)
Other destinations to accept mail for (blank for none)        : 192.168.1.2/24 (<tambahan baris terakhir )
Force synchronous updates on mail queue                        : No
Local networks                                                                : 192.168.1.2/24
Use procmail for local delivery                                         : NO
Mailbox size limit (bytes)                                                 : 0
Local address extension character                                    : +
Internet protocols to use                                                  : ipv4
Command:~#nano /etc/postfix/main.cf

inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/

Edit config.php di squirrelmail
Command:~#nano /etc/squirrelmail/config.php
cari script
$useSendmail = false;
ubah menjadi :
$usesendmail = true ;


* Jangan ubah / hapus baris lainnya.

Command:~#/etc/init.d/postfix  restart
Stopping Postfix Mail Transport Agent : postfix.
Starting Postfix Mail Transport Agent   : postfix.

Command:~#/etc/init.d/courier-imap  restart
Stopping Courier IMAP server : imapd.
Starting Courier IMAP server   : imapd.

Command:~# /etc/init.d/courier-pop  restart
Stopping Courier POP3 server : pop3d.
Starting Courier POP3 server   : pop3d.

Buka Browser PC client anda. Masukkan url "http://webmail.azoema.net" Setelah itu silahkan email2an Jika berhasil maka konfigurasi WebMailserver anda sukses.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_Zbla2EMQXlz0cs2MHTgCodHVCz0O87ggrD6kQjCeAtKqR958zVOQ8cII-uwApCeafkqH2x2uN6fDbMwMowHxmR5fPaHSCeVlaFSyuTEcafWOf_qOY_cczyh9F6OgSDEu8kyNp4CH1N0/s200/images+%285%29.jpg
link di bawah untuk konfigurasi menggunakan ip virtual / ip lebih dari 1

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_Zbla2EMQXlz0cs2MHTgCodHVCz0O87ggrD6kQjCeAtKqR958zVOQ8cII-uwApCeafkqH2x2uN6fDbMwMowHxmR5fPaHSCeVlaFSyuTEcafWOf_qOY_cczyh9F6OgSDEu8kyNp4CH1N0/s200/images+%285%29.jpg

Tidak ada komentar:

Posting Komentar