You are on page 1of 17

Konfigurasi Server Ubuntu 9.

04
Oleh : M. Guschoyyin
SMK N 2 B. Lampung

1 Dapatkan Keistimewaan root

Setelah reboot, Anda dapat login dengan username Anda yang dibuat sebelumnya (misalnya
administrator). Karena kita harus menjalankan semua langkah dari tut orial ini dengan hak akses
root, kita dapat prepend semua perintah dalam tutorial ini dengan sudo, atau kita sekarang
menjadi root dengan mengetik :

sudo su

(Anda dapat juga mengaktifkan login root dengan menjalankan

sudo passwd root

dan memberikan password root. Anda kemudian dapat langsung log in sebagai root, tapi ini
disukai oleh pengembang Ubuntu dan masyarakat karena berbagai alasan. Lihat
http://ubuntuforums.org/showthread.php?t=765 414.)

2 Installasi SSH Server (Opsional)

Jika Anda tidak menginstal OpenSSH server selama instalasi sistem, Anda bisa mel akukannya
sekarang :

aptitude install ssh openssh -server

Mulai sekarang Anda dapat menggunakan klien SSH seperti Putty dan koneksi dari komputer Anda
ke Ubuntu 9.04 server dan ikuti langkah -langkah dari tutorial ini.

3 Instal vim-nox (Opsional)

Saya akan menggunakan vi sebagai editor teks dalam tutorial ini. Program vi default memiliki
beberapa perilaku aneh pada Ubuntu dan Debian ; untuk memperbaiki hal ini, kita akan
menginstal vim-nox :

aptitude install vim-nox

(Anda tidak perlu melakukan hal ini jika anda menggunakan editor teks yang berbeda seperti joe
atau nano.)

4 Configure The Network

Karena installer Ubuntu telah mengkonfig urasi sistem kami untuk mendapatkan pengaturan
jaringan melalui DHCP, kita harus mengubah yang sekarang karena server harus memiliki alamat IP
statis. Edit /etc/network/interfaces dan menyesuaikan dengan kebutuhan anda (pada contoh ini
konfigurasi saya akan menggunakan alamat IP 192.168.0.100) :

vi /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 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

Kemudian restart jaringan anda :

/etc/init.d/networking restart

Kemudian edit /etc/hosts. Membuatnya terlihat, seperti ini :

vi /etc/hosts

127.0.0.1 localhost.localdomain localhost


192.168.0.100 server1.example.com server1

# The following lines are desirable for IP v6 capable hosts


::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Sekarang jalankan

echo server1.example.com > /etc/hostname


/etc/init.d/hostname.sh start

Setelah itu, jalankan

hostname
hostname -f

Keduanya harus menunjukkan server1.example.com sekarang.


5 Edit /etc/apt/sources.list dan Update Linux Installan Anda

Edit /etc/apt/sources.list. Komentar keluar atau mengeluarkan CD instalasi dari file dan pastikan
bahwa universe dan repositori multiverse diaktifkan. Seharusnya terlihat seperti ini:

vi /etc/apt/sources.list

#
# deb cdrom:[Ubuntu-Server 9.04 _Jaunty Jackalope_ - Release amd64 (20090421.1)]/ jaunty main
restricted

#deb cdrom:[Ubuntu-Server 9.04 _Jaunty Jackalope_ - Release amd64 (20090421.1)]/ jaunty main
restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://de.archive.ubuntu.com/ubuntu/ jaunty main restricted


deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ jaunty -updates main restricted
deb-src http://de.archive.ubuntu .com/ubuntu/ jaunty-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://de.archive.ubuntu.com/ubuntu/ jaunty universe
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty universe
deb http://de.archive.ubuntu.com/ubuntu/ jaunty -updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty -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://de.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://de.archive.ubuntu.com/ubuntu/ jaunty -updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty -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://de.archive.ubuntu.com/ubunt u/ jaunty-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty -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 jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

deb http://security.ubuntu.com/ubuntu jaunty -security main restricted


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

Kemudian jalankan

aptitude update

untuk update paket database apt, jalankan

aptitude safe-upgrade

untuk menginstal pembaruan terbaru (jika ada). Jika Anda melihat bahwa kernel baru akan diinstal
sebagai bagian dari update, Anda harus reboot sistem setelahnya :

reboot

6 Ubah Default Shell

/bin/sh adalah sebuah symlink ke /bin/dash, Namun kita perlu /bin/bash, tidak /bin/dash. Oleh
karena itu kita melakukan ini :

dpkg-reconfigure dash

Install dash sebagai /bin/sh? <-- No

Jika Anda tidak melakukan ini, instalasi ISPConfig akan gagal.

7 Disable AppArmor

AppArmor adalah ekstensi keamanan (mirip dengan SELinux) yang harus men yediakan keamanan
diperluas. Menurut pendapat saya anda tidak memerlukannya untuk mengkonfigurasi sistem yang
aman, dan biasanya menyebabkan lebih banyak masalah daripada keuntungan (memikirkan hal ini
setelah Anda telah mel akukan pemecahan masalah karena beberapa operator tidak bekerja
seperti yang diharapkan, dan kemudian Anda mencari tahu bahwa semuanya ok, hanya AppArmor
yang menyebabkan masalah). Oleh karena itu saya menonaktifkan itu (ini adalah suatu keharusan
jika Anda ingin menginstal ISPConfig di kemudian hari).

Kita dapat menonaktifkan seperti ini :

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
aptitude remove apparmor apparmor -utils

8 Install Beberapa Software


Sekarang kita menginstal beberapa paket yang dibutuhkan nanti. Jalankan

aptitude install binutils cpp fetchmail flex gcc libarchive -zip-perl libc6-dev libcompress-zlib-perl
libdb4.6-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap openssl perl perl -modules unzip zip
zlib1g-dev autoconf automake1.9 libtool bison autotools -dev g++ build-essential

(Perintah ini harus ada ke dalam satu baris!)

9 Quota

(Jika Anda memilih skema partisi yang berbeda daripada Saya, Anda harus menyesuaikan bab ini
sehingga kuota berlaku pada partisi di mana Anda membutuhkannya.)

Untuk install quota, Jalankan

aptitude install quota

Edit /etc/fstab. tampak seperti ini (Saya menambahkan, usrquota, grpquota ke partisi dengan
mount point /):

vi /etc/fstab

# /etc/fstab: static file system information.


#
# Use 'vol_id --uuid' to print the universally unique ide ntifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/mapper/server1 -root during installation
UUID=b8d265bc-5959-404d-a68e-8dc1c76f18d6 / ext3 relatime,errors=remount -
ro,usrquota,grpquota 0 1
# /boot was on /dev/sda5 during installatio n
UUID=01e9c3c7-2ad0-4f52-a356-18290517b362 /boot ext2 relatime 0 2
# swap was on /dev/mapper/server1 -swap_1 during installation
UUID=c1e0bcbb-5c73-4bd2-a7b2-8beeb7526200 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

Untuk mengaktifkan kuota, jalankan perintah -perintah ini :

touch /quota.user /quota.group


chmod 600 /quota.*
mount -o remount /

quotacheck -avugm
quotaon -avug

10 DNS Server

Jalankan
aptitude install bind9

Untuk alasan keamanan kita ingin menjalankan BIND chroot sehingga kita harus mel akukan
langkah-langkah berikut :

/etc/init.d/bind9 stop

Edit file /etc/default/bind9 sehingga daemon akan berjalan sebagai pengguna Unp rivileged
mengikat, chroot ke /var/lib/named. Ubah baris: OPTIONS = " -u bind" sehingga berbunyi OPTIONS
= "-u bind-t /var/lib/named":

vi /etc/default/bind9

# run resolvconf?
RESOLVCONF=yes

# startup options for the server


OPTIONS="-u bind -t /var/lib/named"

Buat direktori yang diperlukan dalam / var/lib:

mkdir -p /var/lib/named/etc
mkdir /var/lib/named/dev
mkdir -p /var/lib/named/var/cache/bind
mkdir -p /var/lib/named/var/run/bind/run

Kemudian memindahkan direktori konfigurasi dari /etc ke /var /lib/named/etc:

mv /etc/bind /var/lib/named/etc

Buat symlink ke direktori konfigurasi baru dari lokasi lama (untuk menghindari masalah ketika bind
akan diperbarui di masa mendatang):

ln -s /var/lib/named/etc/bind /etc/bind

Membuat null dan random devices, dan memperbaiki akses dari direktori :

mknod /var/lib/named/dev/null c 1 3
mknod /var/lib/named/dev/random c 1 8
chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random
chown -R bind:bind /var/lib/named/var/*
chown -R bind:bind /var/lib/named/etc/bind

Kita perlu memodifikasi /etc/default/ syslogd sehingga kita masih bisa mendapatkan log pesan -
pesan penting ke sistem log. Memodifikasi baris: syslogd = "" sehingga berbunyi: sy slogd = "-a
/var/lib/named/dev/log":

vi /etc/default/syslogd

#
# Top configuration file for syslogd
#

#
# Full documentation of possible arguments are found in the manpage
# syslogd(8).
#

#
# For remote UDP logging use SYSLOGD=" -r"
#
SYSLOGD="-a /var/lib/named/dev/log"

Restart logging daemon :

/etc/init.d/sysklogd restart

Start up BIND, dan periksa /var/log/syslog dari errors :

/etc/init.d/bind9 start

11 MySQL

Untuk menginstal MySQL, kita jalankan

aptitude install mysql-server mysql-client libmysqlclient15-dev

Anda akan diminta untuk membe rikan password untuk MySQL user root - password ini berlaku
bagi pengguna root @ localhost maupun root@server1.example.com, jadi kita tidak perlu
menentukan password root MySQL secara manual di kemudian hari :

New password for the MySQL "root" user: < -- yourrootsqlpassword


Repeat password for the MySQL "root" user: < -- yourrootsqlpassword

Kami ingin MySQL untuk semua interface, tidak hanya localhost, oleh karena itu kita edit
/etc/mysql/my.cnf dan isikan baris bind-address = 127.0.0.1:

vi /etc/mysql/my.cnf

[...]
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
[...]

Kemudian kita restart MySQL :

/etc/init.d/mysql restart

Sekarang periksa jaringan yang aktif. Jalankan

netstat -tap | grep mysql


Output akan terlihat seperti ini :

root@server1:~# netstat -tap | grep mysql


tcp 0 0 *:mysql *:* LISTEN 4318/mysqld
root@server1:~#

12 Postfix Dengan SMTP-AUTH dan TLS

Untuk menginstal Postfix dengan SMTP -AUTH dan TLS lakukan langkah-langkah berikut :

aptitude install postfix libsasl2 -2 sasl2-bin libsasl2-modules procmail

Anda akan ditanyakan dua pertanyaan. Jawaban sebagai berikut :

General type of mail configuration: <-- Internet Site


System mail name: <-- server1.example.com

Kemudian Jalankan

dpkg-reconfigure postfix

Sekali lagi, Anda akan ditanya beberapa pertanyaan :

General type of mail configuration: <-- Internet Site


System mail name: <-- server1.example.com
Root and postmaster mail recipient: <-- [blank]
Other destinations to accept mail for (blank for none): <-- server1.example.com,
localhost.example.com, localhost.localdomain, localhost
Force synchronous updates on mail queue? <-- No
Local networks: <-- 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
Use procmail for local delivery? <-- Yes
Mailbox size limit (bytes): <-- 0
Local address extension character: <-- +
Internet protocols to use: <-- all

Selanjutnya, lakukan ini :

postconf –e ‘smtpd_sasl_local_domain =’
postconf –e ‘smtpd_sasl_auth_enable = yes ’
postconf –e ‘smtpd_sasl_security_options = noanonymous ’
postconf –e ‘broken_sasl_auth_clients = yes ’
postconf –e ‘smtpd_sasl_authenticated_header = yes ’
postconf –e ‘smtpd_recipient_restrictions =
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination ’
postconf –e ‘inet_interfaces = all’
echo ‘pwcheck_method: saslauthd ’ >> /etc/postfix/sasl/smtpd.conf
echo ‘mech_list: plain login’ >> /etc/postfix/sasl/smtpd.conf

Setelah itu kami buat sertifikat untuk TLS :


mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024

chmod 600 smtpd.key


openssl req -new -key smtpd.key -out smtpd.csr

openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt

openssl rsa -in smtpd.key -out smtpd.key.unencrypted

mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

Selanjutnya kita mengkonfigurasi postfix untuk TLS (pastikan bahw a anda menggunakan nama
host yang benar untuk myhostname) :

postconf -e 'myhostname = server1.example.com'

postconf -e 'smtpd_tls_auth_only = no'


postconf -e 'smtp_use_tls = yes'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtp_tls_note_starttls_offer = yes'
postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
postconf -e 'smtpd_tls_loglevel = 1'
postconf -e 'smtpd_tls_received_header = yes'
postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
postconf -e 'tls_random_source = dev:/dev/urandom'

File /etc/postfix/main.cf akan terlihat seperti ini :

cat /etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commente d, more complete version

# Debian specific: Specifying a file name will cause the first


# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)


biff = no

# appending .domain is the MUA's job.


append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings


#delay_warning_time = 4h
readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for


# information on enabling SSL in the smtp client.

myhostname = server1.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.example.com, localhost.example.co m, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

Otentikasi akan dilakukan oleh saslauthd. Kita harus mengubah beberapa hal untuk membuatnya
bekerja dengan baik. Kare na untuk menjalankan Postfix chroot di /var/spool/postfix kita harus
melakukan hal berikut :

mkdir -p /var/spool/postfix/var/run/saslauthd

Sekarang kita harus mengedit /etc/default/saslauthd untuk mengaktifkan saslauthd. Set START ke
ya dan mengubah baris OPTIONS = " -c-m /var/run/saslauthd" untuk OPTIONS = "-c-m
/var/spool/postfix/var/run/saslauthd-r" :

vi /etc/default/saslauthd

# Settings for saslauthd daemon


# Please read /usr/share/doc/sasl2 -bin/README.Debian for details.
#

# Should saslauthd run automatically on startup? (default: no)


START=yes

# Description of this saslauthd instance. Recommended.


# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"

# Short name of this saslauthd instance. Strongly recommended.


# (suggestion: saslauthd)
NAME="saslauthd"

# Which authentication mechanisms should saslauthd use? (default: pam)


#
# Available options in this Debian packa ge:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"

# Additional options for this mechanism. (default: none)


# See the saslauthd man page for information about mech -specific options.
MECH_OPTIONS=""

# How many saslauthd processes should we run? (default: 5)


# A value of 0 will fork a new process for each connection.
THREADS=5

# Other options (default: -c -m /var/run/saslauthd)


# Note: You MUST specify the -m option or saslauthd won't run!
#
# WARNING: DO NOT SPECIFY THE -d OPTION.
# The -d option will cause saslauthd to run in the foreground instead of as
# a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING P ROPERLY. If you wish
# to run saslauthd in debug mode, please run it by hand to be safe.
#
# See /usr/share/doc/sasl2 -bin/README.Debian for Debian -specific information.
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
#
# Example for postfix users: " -c -m /var/spool/postfix/var/run/saslauthd"
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

Selanjutnya postfix menambahkan user ke grup sasl (ini akan mema stikan bahwa Postfix memiliki
izin untuk mengakses saslauthd) :

adduser postfix sasl

Sekarang restart Postfix dan mulai saslauthd :


/etc/init.d/postfix restart
/etc/init.d/saslauthd start

Untuk melihat apakah SMTP -AUTH dan TLS bekerja dengan baik sekarang jalankan perintah
berikut :

telnet localhost 25

Setelah Anda telah menetapkan sambungan ke server mail Postfix Anda ketik

ehlo localhost

Jika Anda melihat :

250-STARTTLS

dan

250-AUTH LOGIN PLAIN

Berarti semuanya baik.

Output pada sistem saya terlihat se perti ini :

root@server1:/etc/postfix/ssl# telnet localhost 25


Trying ::1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 server1.example.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-server1.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
root@server1:/etc/postfix/ssl#

Type

quit
untuk kembali ke sistem shell.

13 Courier-IMAP/Courier-POP3

Jalankan ini untuk menginstal Courier -IMAP/Courier-IMAP-SSL (untuk IMAPs pada port 993) dan
Courier-POP3/Courier-POP3-SSL (untuk POP3s pada port 995) :

aptitude install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop


courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0 -0

Anda akan diminta dua pertanyaan :

Create directories for web-based administration? <-- No


SSL certificate required <-- Ok

Selama instalasi, SSL sertifikat untuk IMAP -SSL dan POP3-SSL diciptakan dengan hostname
localhost. Untuk mengubahnya ke nama host yang benar (server1.example.com dalam tutorial ini),
menghapus sertifikat ...

cd /etc/courier
rm -f /etc/courier/imapd.pem
rm -f /etc/courier/pop3d.pem

... dan memodifikasi dua file berikut, ga nti CN = localhost dengan CN = server1.example.com (Anda
juga dapat memodifikasi nilai -nilai lain, jika perlu) :

vi /etc/courier/imapd.cnf

[...]
CN=server1.example.com
[...]

vi /etc/courier/pop3d.cnf

[...]
CN=server1.example.com
[...]

Kemudian Buat kembali sertifikat ...

mkimapdcert
mkpop3dcert

... dan restart Courier-IMAP-SSL dan Courier-POP3-SSL :

/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop-ssl restart

Jika Anda tidak ingin menggunakan ISPConfig, mengkonfigurasi Postfix untuk mengirim email ke
pengguna Maildir * :
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart

* Harap diperhatikan : Anda tidak perlu melakukan hal ini jika Anda berniat untuk menggunakan
ISPConfig pada sistem anda sebaga i ISPConfig melakukan konfigurasi yang diperlukan
menggunakan resep procmail. Tapi silakan kunjungi Pastikan untuk mengaktifkan Maildir di bawah
Manajemen -> Server -> Settings -> EMail di ISPConfig web interface.

14 Apache/PHP5/Ruby/Python/WebDAV

Sekarang kita menginstal Apache :

aptitude install apache2 apache2 -doc apache2-mpm-prefork apache2-utils apache2-suexec


libexpat1 ssl-cert

Selanjutnya kita menginstal PHP5, Ruby, dan Python (semua tiga sebagai modul Apache) :

aptitude install libapache2 -mod-php5 libapache2-mod-ruby libapache2-mod-python php5 php5-


common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt
php5-memcache php5-mhash php5-ming php5-mysql php5-pspell php5-recode php5-snmp php5-
sqlite php5-tidy php5-xmlrpc php5-xsl

Selanjutnya kita edit /etc/apache2/mods-available/dir.conf :

vi /etc/apache2/mods-available/dir.conf

dan ubah baris DirectoryIndex :

<IfModule mod_dir.c>

#DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm


DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl
index.xhtml

</IfModule>

Sekarang kita harus mengaktifkan beberapa Apache modules (SSL, rewrite, suexec, include, dan
WebDAV):

a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include
a2enmod dav_fs
a2enmod dav

Restart Apache :

/etc/init.d/apache2 restart
Kita harus memperbaiki masalah kecil dengan Ruby. Jika Anda menginstal Ruby ISPConfig dan
memungkinkan untuk situs web,. Rbx file ini akan dijalankan baik -baik saja dan ditampilkan dalam
browser, namun ini tidak bekerja. Rb file - Anda akan diminta untuk men -download. Rb file - yang
sama terjadi jika mengkonfigurasi Ruby secara manual untuk vhost (yakni, tidak ada hubungannya
dengan ISPConfig). Untuk memper baiki hal ini, kita buka file /etc/mime.types ...

vi /etc/mime.types

... dan isikan rb pada baris aplikasi /x-ruby :

[...]
#application/x-ruby rb
[...]

Restart Apache:

/etc/init.d/apache2 restart

Sekarang. Rb file ini akan dieksek usi dan ditampilkan dalam browser, seperti. Rbx file.
Dalam bab berikutnya (17.1) kita akan menonaktifkan PHP (ini hanya diperlukan jika anda ingin
menginstall ISPConfig pada server ini). Tidak seperti PHP, Ruby dan Python yang dinonaktifkan
secara default, oleh karena itu kita tidak harus mel akukannya.

14.1 Disable PHP Globally

(Jika anda tidak berencana untuk menginstal ISPConfig pada server ini, silakan melewati bagian
ini!)

Dalam ISPConfig Anda akan mengkonfigurasi PHP pada situs dari dasar, yaitu Anda dapat
menentukan situs web yang dapat menjalankan skrip PHP dan yang satu tidak bisa. Ini hanya
dapat bekerja jika PHP ini dinonaktifkan secara global karena kalau tidak semua situs Web akan
dapat menjalankan skrip PHP, terserah apa yang Anda tetapkan dal am ISPConfig.
Untuk menonaktifkan PHP secara global, kita edit file /etc/mime.types dan isikan phtml pht php
pada baris aplikasi / x-httpd-php :

vi /etc/mime.types

[...]
#application/x-httpd-php phtml pht php
#application/x-httpd-php-source phps
#application/x-httpd-php3 php3
#application/x-httpd-php3-preprocessed php3p
#application/x-httpd-php4 php4
[...]

Edit /etc/apache2/mods-enabled/php5.conf dan isikan di baris berikut :

vi /etc/apache2/mods-enabled/php5.conf

<IfModule mod_php5.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>

Kemudian restart Apache :

/etc/init.d/apache2 restart

15 Proftpd

Untuk menginstal proftpd, jalankan

aptitude install proftpd ucf

Anda akan ditanya pertanyaan :

Run proftpd: <-- standalone

Untuk alasan keamanan tambahkan baris berikut ke /etc/proftpd/proftpd.conf (terima kasih


kepada Reinaldo Carvalho; informasi lebih lanjut dapat ditemukan di sini :
http://proftpd.org/localsite/Userguide/linked/userguide.html ) :

vi /etc/proftpd/proftpd.conf

[...]
DefaultRoot ~
IdentLookups off
ServerIdent on "FTP Server ready."
[...]

ISPConfig mengharapkan untuk konfigurasi di /etc/proftpd.conf bukan /etc/proftpd/proftpd.conf ,


oleh karena itu kita buat sebuah symlink (Anda dapat melewati perintah ini jika anda tidak ingin
menginstal ISPConfig) :

ln -s /etc/proftpd/proftpd.conf /etc/proftpd.conf

Kemudian restart Proftpd :

/etc/init.d/proftpd restart

16Webalizer

Untuk install webalizer, hanya menjalankan

aptitude install webalizer

17 Synchronize System Clock


Ini adalah ide yang baik untuk menyinkronkan si stem jam dengan NTP (network time protocol)
server melalui internet. Jalankan

aptitude install ntp ntpdate

dan waktu sistem anda akan selalu sinkron.

18 Instal Beberapa Perl Modul Needed Oleh SpamAssassin ( Datang dengan ISPConfig)

Jalankan

aptitude install libhtml-parser-perl libdb-file-lock-perl libnet-dns-perl

19 ISPConfig

Konfigurasi server sekarang sudah selesai, dan jika Anda ingin kini Anda dapat menginstal
ISPConfig di atasnya. Harap periksa instalasi ISPConfig manual :
http://www.ispconfig.org/manual_installation.htm

19.1 Sebuah catatan On SuExec


Jika Anda ingin menjalankan script CGI dibawah suExec, anda harus menentukan /var/www
sebagai direktori home untuk situs web yang diciptak an oleh ISPConfig sebagai suE xec Ubuntu
dikompilasi dengan /var/www sebagai Doc_Root. Jalankan

/usr/lib/apache2/suexec -V

dan output akan terlihat seperti ini :

root@server1:~# /usr/lib/apache2/suexec -V
-D AP_DOC_ROOT="/var/www"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="www-data"
-D AP_LOG_EXEC="/var/log/apache2/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=100
-D AP_USERDIR_SUFFIX="public_html"
root@server1:~#

Jadi, jika Anda ingin menggunakan suExec dengan ISPconfig, jangan me ngubah default web root
(yaitu /var/www) jika anda menggunakan mode ahli selama instalasi ISPConfig (dalam modus
standar Anda tidak dapat mengubah akar web sehingga Anda tetap online. dan akan dapat
menggunakan suExec dalam hal apapun).

20 Sumber / Links

 Ubuntu: http://www.ubuntu.com
 ISPConfig: http://www.ispconfig.org
 Linux : http://www.howtoforge.com

You might also like