linux instal at ion services

24
DEBIAN 4.0 SERVER PERFECT SETUP The Perfect Setup untuk Debian Server Tutorial ini akan menjelaskan bagaimana menginstall Debian Etch berbasis server, dan menginstall beberapa standart services untuk server, saya menggunakan software dibawah ini : Web Server: Apache 2 .2 Database Server: MySQL 5.0 Mail Server: Po stfix DNS Server: BIN D9 FTP Server: proftpd Pertama yang ingin saya katakan adalah, ini bukanlah satu cara untuk mensetting system server. Ada banyak cara yang bisa anda lakukan agar dapat mensetting server seperti ini. 1. Requirements Hal yang anda perlukan untuk menginstall Server Debian adalah : - PC Standart, kebanyakan PC sekarang sudah jauh melampui requirements yang dibutuhkan untuk install Server. - CD Debian Etch installation bisa di download di mirror list http://www.debian.org/CD/http-ftp/ - I downloaded this one: http://ftp.de.debian.or g/debian-cd/4.0_r0/ i386/iso- cd/debian-40r0-i 386-netinst.i so) - Koneksi intern et yang cepat. Pada Dokumentasi kali ini, saya menggunakan hostname mail.jatmiko.web.id dengan menggunakan I P addres s 202.47.77.249. Settingan ini mungkin akan berbeda jadi silahkan sesuaikan dengan kebutuhan anda. OK sekaran mari kita mulai Installation Server dengan Debian Etch.

Upload: terlalugitu

Post on 09-Apr-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 1/24

DEBIAN 4.0 SERVER PERFECT SETUP

The Perfect Setup untuk Debian Server

Tutorial ini akan menjelaskan bagaimana menginstall Debian Etch berbasis server,

dan menginstall beberapa standart services untuk server, saya menggunakan

software dibawah ini :

• Web Server: Apache 2 .2

• Database Server: MySQL 5.0

• Mail Server: Postfix

DNS Server: BIND9

• FTP Server: proftpd

Pertama yang ingin saya katakan adalah, ini bukanlah satu cara untuk mensetting system

server. Ada banyak cara yang bisa anda lakukan agar dapat mensetting server seperti ini.

1. Requirements

Hal yang anda perlukan untuk menginstall Server Debian adalah :

- PC Standart, kebanyakan PC sekarang sudah jauh melampui requirements yang

dibutuhkan untuk install Server.

- CD Debian Etch installation bisa di download di mirror list

http://www.debian.org/CD/http-ftp/- I downloaded this one:http://ftp.de.debian.org/debian-cd/4.0_r0/i386/iso-cd/debian-40r0-i386-netinst.iso)

- Koneksi internet yang cepat.

Pada Dokumentasi kali ini, saya menggunakan hostname mail.jatmiko.web.id

dengan menggunakan IP address 202.47.77.249. Settingan ini mungkin akan

berbeda jadi silahkan sesuaikan dengan kebutuhan anda. OK sekaran mari kita

mulai Installation Server dengan Debian Etch.

Page 2: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 2/24

3 The Base System

Masukkan CD Debian Installation pada computer anda pada saat pertama kali

booting. Lalu tekan enter

Proses instalasi server dimulai, dan pertama anda akan memilih bahasa gunakan

defaultnya saja English

Page 3: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 3/24

Pilih lokasi Negara dimana anda berada : Indonesia  

Page 4: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 4/24

Pilih layout keyboard :

Proses instalasi akan men check hardware dan konfigurasi network dan juga

memastikan apakah ada DCHP server pada network anda.

Page 5: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 5/24

 

Masukkan Hostname pada pada contoh system yang kita bangun adalah

mail.jatmiko.web.id jadi anda bisa masukkan hostname nya menjadi : mail

Masukkan nama domain yang anda gunakan saya memakai jatmiko.web.id.

Page 6: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 6/24

 

Sekarang anda akan melakukan partisi pada hard disk anda. Untuk lebih mudahnya

saya akan membuat satu partisi hardisk dengan sedikit swap partisi jadi pada

panduan instalasi saya memilih, Use entire disk.

Pilih disk yang akan dipartisi :

Pilih skema partisi, seperti yang saya gunakan sebelumnya, saya pilih All files dalam

satu partisi (untuk new users) .

Page 7: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 7/24

 

Jika sudah selesai, pilih Finish partitioning and write change to disk

Page 8: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 8/24

 

Pilih ya pada prompt Write changes to disks?:

Selanjutnya, partisi baru anda akan di format

Page 9: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 9/24

 

4 Install The SSH Server

Debian Etch does not install OpenSSH by default, therefore we do it now. Run

Secara default Debian Etch tidak menginstall OpenSSH, jadi kitra akan menginstallnya :

apt-get install ssh openssh-server

You will be prompted to insert the installation CD again.

Anda akan diminta untuk memasukan CD installation kembali

Page 10: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 10/24

 

5 Configure The Network

Karena pada awal instalasi Debian Etch kita telah mensetting network via DHCP, jadi kita

harus mengganti dengan mengunakan IP static. Edit / etc/network/ interfaces dan

sesuaikan dengan settingan IP anda. Disini saya menggunakan IP address 10.8.8.136

Perhatikan, saya mengganti allow-hotplug eth0 menjadi auto eth0, lalu restart network anda,

 jika tidak berhasil anda harus mereboot system.

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

#allow-hotplug eth0

#iface eth0 inet dhcp

auto eth0iface eth0 inet static

address 10.8.8.136

netmask 255.255.255.0

network 10.8.8.0

 broadcast 10.8.8.255

gateway 10.8.8.1 

Then restart network:

 /etc/init.d/networking restart

Page 11: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 11/24

 

Kemudian edit  / e t c / h o s t s   dan ubah jadi seperti ini

vi

 /etc/

hosts

Kemudian

echo server1.example.com > /etc/hostname

lalu reboot system :

shutdown -r now

Selanjutnya jalankan :

hostname

hostname -f 

kedua nya harus menampilkan mail.jatmiko.web.id 

127.0.0.1 localhost.localdomain localhost

10.8.8.136   mail.jatmiko.web.id mail

# 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 

Page 12: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 12/24

Sekarang kita dapat menggunakan SSH Client seperti PuTTy dan terhubung ke server dari

workstation yang lain.

6 Edit /etc/apt/sources.list And Update Your Linux Installation

Edit /etc/apt/sources.list. beri tanda pagar untuk CD, seperti contoh dibawah :

vi /etc/apt/sources.list

#

# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1

20070407-11:29]/ etch contrib main

#deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1

20070407-11:29]/ etch contrib main

deb http://ftp2.de.debian.org/debian/ etch main

deb-src http://ftp2.de.debian.org/debian/ etch main

deb http://security.debian.org/ etch/updates main contrib

deb-src http://security.debian.org/ etch/updates main contrib 

Jalankan perintah

apt-get update

update apt package database untuk menginstall update terbaru

apt-get upgrade

7 Install Software

Now we install a few packages that are needed later on. Run

Page 13: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 13/24

apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl

libdb4.3-dev libpcre3 libpopt-dev linux-kernel-headers lynx m4 make ncftp nmap openssl perl

perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++

(Perin tah ini harus dijalankan dalam satu baris!)

8 Quota

(Jika anda memilih schema pertisi berbeda dengan yang saya lakukan, anda harus

menyesuaikan dengan cara yang anda perlukan )

Untuk mengginstall quota jalankan perintah :

apt-get install quota

Edit  /etc/fstab. Saya menambahkan pada bagian ini ( ,usrquota,grpquota ) pada partisi

 /dev/sda1 

vi /etc/fstab

# /etc/fstab: static file system information.

## <file system> <mount point> <type> <options> <dump> <pass>

  proc /proc proc defaults 0 0

/dev/sda1 / ext3 defaults,errors=remount-

ro,usrquota,grpquota 0 1

/dev/sda5 none swap sw 0 0

/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0

/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 

Untuk mengaktigkan Quota jalankan perintah :

touch /quota.user /quota.group

chmod 600 /quota.*

mount -o remount / 

quotacheck -avugm

quotaon –avug

Page 14: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 14/24

 

9 DNS Server

Instalasi DNS Server :

apt-get install bind9

Untuk alasan keamanan kita jalankan BIND chroot, jadi langkah selanjutnya adalah :

 /etc/init.d/bind9 stop

Edit the file /etc/default/bind9 jadi deaemon akan aktif sebagai unprivileged user bind jadi

daemon tersebut akan aktif sebagai chrooted pada  /var/lib/named. Ubah baris : OPTIONS="-

u bind" so that it reads OPTIONS="-u bind -t /var/lib/named":

vi /etc/default/bind9

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

# Set RESOLVCONF=no to not run resolvconf

RESOLVCONF=yes 

Buat direktori yang diperlukan di /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

Lalu pindahkan konfigurasi bind dari /etc ke /var/lib/named/etc :

Page 15: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 15/24

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

Buat symlink dari directory baru ke directory yang lama (untuk menghindari masalah ketika

bind melakukan update nantinya)

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

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 juga perlu merubah /etc/default/syslog jadi kita bisa tetap mendapatkan log pesan

penting. Ganti baris SYSLOGD=’’ menjadi SYSLOGD="-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

Aktifkan BIND, and check /var/log/syslog jika ada errors:

 /etc/init.d/bind9 start

10 MySQL

Untuk menginstall MySQL, jalankan perintah

Page 16: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 16/24

apt-get install mysql-server mysql-client libmysqlclient15-dev

Kita ingin MySQL bisa aktif di semua host, jadi kita edit /etc/mysql/my.cnf dan beri tanda

pagar pada baris bind-address = 127.0.0.1:

vi /etc/mysql/my.cnf 

[...]

#bind-address = 127.0.0.1

[...] 

Kemudian Restart MySQL

 /etc/init.d/mysql restart

Now check that networking is enabled. Run

Lalu check apakah mysql sudah aktif ? , Jalankan perintah :

netstat -tap

Output akan menampilkan :

tcp 0 0 *:mysql *:* LISTEN 3281/mysqld

Run

mysqladmin -u root password admin123

mysqladmin -h mail.jatmiko.web.id -u root password admin123

11 Instalasi Postfix

Pada instalasi postfix dengan SMTP-AUTH langkah yang kita lakukan adalah :

apt-get install postfix libsasl2 sasl2-bin libsasl2-modules libdb3-util procmail

Page 17: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 17/24

 

Anda akan diberi pertanyaan. Jawab seperti dibawah ini :

General type of configuration? <-- Internet Site 

Mail name? <-- mail.jatmiko.web.id 

Kemudian jalankan

dpkg-reconfigure postfix

Sekali lagi anda akan di beri beberapa pertanyaan :

General type of configuration? <-- Internet Site 

Where should mail for root go <-- [blank] 

Mail name? <-- mail.jatmiko.web.id 

Other destinations to accept mail for? (blank for none) <-- mail.jatmiko.web.id,

localhost.example.com, localhost.localdomain, localhost 

Force synchronous updates on mail queue? <-- No 

Local networks? <-- 127.0.0.0/8 

Use procmail for local delivery? <-- Yes 

Mailbox size limit <-- 0 

Local address extension character? <-- + 

Internet protocols to use? <-- all 

Next, do this:

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

Selanjutnya kita akan buat certificates untuk TLS :

Page 18: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 18/24

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

Next we configure Postfix for TLS:

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'

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

The file /etc/postfix/main.cf should now look like this:

cat /etc/postfix/main.cf 

# See /usr/share/postfix/main.cf.dist for a commented, 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 (Debian/GNU)

biff = no

# appending .domain is the MUA's job.

Page 19: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 19/24

append_dot_mydomain = no

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

#delay_warning_time = 4h

# 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:${queue_directory}/smtpd_scache

smtp_tls_session_cache_database = btree:${queue_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.com,

localhost.localdomain, localhost

relayhost =

mynetworks = 127.0.0.0/8

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

Restart Postfix:

 /etc/init.d/postfix restart

Page 20: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 20/24

Authentication telah berhasil dengan saslauthd. Kita harus merubah beberapa hal agar dapat

bekerja dengan benar, karena postfixt berjalan pada chroot di /var/spool/postfix kita harus

melakukan hal dibawah ini :

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

Sekarang kita harus edit file /etc/default/saslauthd untuk mengaktifkan. Set START = yes 

Dan ganti baris OPTIONS="-c" to OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r":

vi /etc/default/saslauthd

#

# Settings for saslauthd daemon

#

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

START=yes

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

#

# Available options in this Debian package:

# 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)

# See the saslauthd man page for information about these options.

Page 21: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 21/24

#

# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"

# Note: See /usr/share/doc/sasl2-bin/README.Debian

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r" 

Sekarang start saslauthd:

 /etc/init.d/saslauthd start

Untuk melihat apakah SMTP sudah bekerja dengan benar jalankan perintah :

telnet localhost 25

Selelah terhubung dengan postfix mail server ketik perintah :

ehlo localhost

Jika anda melihat baris berikut :

250-STARTTLS

and

250-AUTH PLAIN LOGIN

berarti semuanya lancer

Semua outpot pada telnet, akan menampilkan sebagai berikut :

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

Trying 127.0.0.1...

Connected to localhost.localdomain.

Escape character is '^]'.

220 server1.example.com ESMTP Postfix (Debian/GNU)

ehlo localhost

250-server1.example.com

250-PIPELINING

250-SIZE 10240000

250-VRFY

Page 22: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 22/24

250-ETRN

250-STARTTLS

250-AUTH PLAIN LOGIN

250-AUTH=PLAIN LOGIN

250-ENHANCEDSTATUSCODES

250-8BITMIME

250 DSN

quit

221 2.0.0 Bye

Connection closed by foreign host.

Type

quit

untuk kembali ke system shell ketik quit.

13 Apache/PHP5

Sekarang kita akan menginstall apache, dengan menjalankan perintah :

apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

kemudian kita install PHP5:

apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-

idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash

php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy

php5-xmlrpc php5-xsl

Anda akan diberikan beberapa pertanyaan seperti dibawah ini:

Continue installing libc-client without Maildir support? <-- Yes 

Sekarang kita endi file /etc/apache2/mods-available/dir.conf :

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

Ganti baris DirectoryIndex :

Page 23: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 23/24

<IfModule mod_dir.c>

DirectoryIndex index.html index.htm index.shtml index.cgi index.php

index.php3 index.pl index.xhtml

</IfModule> 

Edit /etc/apache2/ports.conf dan tambahkan port Listen 443:

vi /etc/apache2/ports.conf 

Listen 80

Listen 443

Sekarang kita aktifkan beberapa Apache modules (SSL, rewrite, suexec dan include)

a2enmod ssl

a2enmod rewrite

a2enmod suexec

a2enmod include

restart konfigurasi pada apache :

 /etc/init.d/apache2 force-reload

14 Proftpd

untuk menginstall Proftpd, jalankan perintah :

apt-get install proftpd ucf 

anda akan diberikan beberapa pertanyaan :

Run proftpd from inetd or standalone? <-- standalone

Kemudian buka file /etc/proftpd/proftpd.conf dan ganti UseIPv6 dari on ke off, jika tidak maka

akan muncul pesan error ketika merestart proftpd seperti ini 

IPv6 getaddrinfo 'server1.example.com' error: Name or service not known 

Page 24: Linux Instal at Ion Services

8/8/2019 Linux Instal at Ion Services

http://slidepdf.com/reader/full/linux-instal-at-ion-services 24/24

vi /etc/proftpd/proftpd.conf 

[...]

UseIPv6 off

[...] 

Untuk alasan keamanan kita menambahkan baris berikut pada file /etc/proftpd/proftpd.conf/

vi /etc/proftpd/proftpd.conf 

[...]

DefaultRoot ~

IdentLookups off

ServerIdent on "FTP Server ready."

[...] 

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

Then restart Proftpd:

 /etc/init.d/proftpd restart