install webserver

Assalamu’alaikum Wr Wb,
Ok…pada penulisan sebelumnya, sudah dijelaskan bagaimana cara installasi ubuntu server ( penulis memakai ubuntu server 8.10 ). Kali ini penulis akan mencoba melakukan installasi webserver ( webhosting ) lengkap dengan ISPConfig sebagai Cpanelnya
ISPConfig adalah salah satu Control Panel management yang free ( Opensource ), lebih lengkap bisa dibaca di sini
Ok…Berikut adalah langkah-langkah installasinya
1. Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin, rkhunter, binutils
Perintah untuk installasi program2 tersebut adalah sebagai berikut
root@nms:/home/saudi# aptitude install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl maildrop getmail4 rkhunter binutils
Kemudian Enter ( ingat…itu perintah tersebut dalam satu baris! )

Pada saat proses installasi, maka akan ada beberapa pertanyaan, diantaranya
New password for the MySQL “root” user: <— isikan mysqlroot ( jika pada saat instalalsi tidak di kasih, di enter saja / kosong )
Repeat password for the MySQL “root” user: <— ulangi lagi password root mysql
Create directories for web-based administration? <— Jawb No
General type of mail configuration: <—Pilih Internet Site
System mail name: <– Isikan sysem mail, misal server.contoh.com
SSL certificate required <– Jawab YES

Kita menginginkan mysql dapat membaca dari semua interface, maka localhost di my.cnf di /etc/mysql/my.cnf di nonactivekan, caranya
root@nms:/home/saudi# nano /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 bisa restart MySQL kita, dengan perintah
root@nms:/home/saudi# /etc/init.d/mysql restart

Note : SSL Certificate pada saat installasi untuk IMAP-SSL dan POP3-SSL masih untuk localhost, agar sesuai dengan domain yang benar, maka sertificate tersebut harus dihapus, langkahnya sbb
root@nms:/home/saudi# cd /etc/courier/
root@nms:/etc/courier# rm -f /etc/courier/imapd.pem
root@nms:/etc/courier# rm -f /etc/courier/pop3d.pem

Selanjutnya rubah 2 file, imapd.cnf dan pop3d.cnf dari localhost menjadi : nama domain anda, misal spt dibawah
root@nms:/etc/courier# nano /etc/courier/imapd.cnf
CN=server.contoh.com
emailAddress=saudi@xxx.xxx

root@nms:/etc/courier# nano /etc/courier/pop3d.cnf
CN=server.contoh.com
emailAddress=saudi@xxx.xxx

Create Ceritificate
root@nms:/etc/courier# mkimapdcert
root@nms:/etc/courier# mkpop3dcert

Restart Courier IMAP-SSL dan POP3-SSL
root@nms:/etc/courier# /etc/init.d/courier-imap-ssl restart
root@nms:/etc/courier# /etc/init.d/courier-pop-ssl restart

2. Install Amavisd-new, SpamAssassin, And Clamav

Command Installasinya adalah sebagai berikut
aptitude install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

3. Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt

Command Installasinya adalah sebagai berikut
aptitude install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp

Pada saat prosess installasi akan muncul pertanyaan
Web server to reconfigure automatically: <— apache2

Lakukan perintah dibawah untuk mengaktivekan apache module suexec, rewrite, ssl, actions, dan include
root@nms:/etc/courier# a2enmod suexec rewrite ssl actions include

Delete htpasswd.setup untuk mensecure phpmyadmin
root@nms:/etc/courier# rm -f /etc/phpmyadmin/htpasswd.setup

Jangan aktivekan section dibawah di phpmyadmin
root@nms:/# nano /etc/phpmyadmin/apache.conf

# # Authorize for setup
#
# # For Apache 1.3 and 2.0
#
# AuthType Basic
# AuthName “phpMyAdmin Setup”
# AuthUserFile /etc/phpmyadmin/htpasswd.setup
#
# # For Apache 2.2
#
# AuthType Basic
# AuthName “phpMyAdmin Setup”
# AuthUserFile /etc/phpmyadmin/htpasswd.setup
#
# Require valid-user
#

Restart Apache
root@nms:/# /etc/init.d/apache2 restart

4. Install PureFTPd And Quota
Command/perintah untuk installasinya adalah sebagai berikut
root@nms:/# aptitude install pure-ftpd-common pure-ftpd-mysql quota quotatool

Edit file /etc/default/pure-ftpd-common
root@nms:/# nano /etc/default/pure-ftpd-common
STANDALONE_OR_INETD=standalone

# VIRTUALCHROOT:
# whether to use binary with virtualchroot support
# valid values are “true” or “false”
# Any change here overrides the setting in debconf.
VIRTUALCHROOT=true <– sebelumnya false

Restart pure-ftp
root@nms:/# /etc/init.d/pure-ftpd-mysql restart

Edit fstab dengan menambahi usrquota,grpquota
root@nms:/# nano /etc/fstab
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/sda1
UUID=0e33cff2-ded5-465f-8d88-3f14ef58e37c / ext3 relatime,errors=remount-ro,usrquota,grpquota 0 1
# /dev/sda5
UUID=b453c025-a0ee-4916-bdb4-e35d623f84a6 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

Enable quota dengan perintah sbb
touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /

quotacheck -avugm
quotaon -avug

5. Install MyDNS atau BIND
Sebelum prosess installasinya, lakukan installasi software/packet dibawah
aptitude install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
selanjutnya silahkan install MyDNS atau BIND

chmod +x /etc/init.d/mydns
update-rc.d mydns defaults

jika pakai myDNS, jika BIND disesuaikan jg

6. Install Vlogger And Webalizer
command installasinya adalah sebagai berikut
root@nms:/# aptitude install vlogger webalizer

7. Install Jailkit
#aptitude install build-essential autoconf automake1.9 libtool flex bison

cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.5.tar.gz
tar xvfz jailkit-2.5.tar.gz
cd jailkit-2.5
./configure
make
make install
cd ..
rm -rf jailkit-2.5*

8. Install fail2ban
Command installasinya
root@nms:/# aptitude install fail2ban

9. Install SquirrelMail
Command installasinya
root@nms:/# aptitude install squirrelmail

Create symlink
root@nms:/# ln -s /usr/share/squirrelmail/ /var/www/webmail

Configure squirelmail
root@nms:/# squirrelmail-configure

SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu —
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> > > courier

imap_server_type = courier
default_folder_prefix = INBOX.
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = .
delete_folder = true

Press any key to continue… > > <– pilih Q ( Quit )

10. Install ISPConfig 3
command installasinya adalah sebagai berikut

cd /tmp
wget http://downloads.sourceforge.net/ispconfig/ISPConfig-3.0.1.tar.gz?use_mirror=
tar xvfz ISPConfig-3.0.1.tar.gz
cd ispconfig3_install/install/

Kemudian jalankan perintah
php -q install.php

——————————————————————————–
_____ ___________ _____ __ _
|_ _/ ___| ___ \ / __ \ / _(_)
| | \ `–.| |_/ / | / \/ ___ _ __ | |_ _ __ _
| | `–. \ __/ | | / _ \| ‘_ \| _| |/ _` |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| |
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, |
__/ |
|___/
——————————————————————————–

>> Initial configuration

Operating System: Debian Lenny/Sid or compatible

Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with .
Tap in “quit” (without the quotes) to stop the installer.

Select language (en,de) [en]: <– ENTER

Installation mode (standard,expert) [standard]: <– ENTER

Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server.contoh.com]: <– ENTER

MySQL server hostname [localhost]: <– ENTER

MySQL root username [root]: <– ENTER

MySQL root password []: <– passsword root mysql

MySQL database to create [dbispconfig]: <– ENTER

MySQL charset [utf8]: <– ENTER

Generating a 2048 bit RSA private key
………………………………………………….+++
.+++
writing new private key to 'smtpd.key'
—–
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
—–
Country Name (2 letter code) [AU]: <– ENTER
State or Province Name (full name) [Some-State]: <– ENTER
Locality Name (eg, city) []: <– ENTER
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <– ENTER
Organizational Unit Name (eg, section) []: <– ENTER
Common Name (eg, YOUR name) []: <– ENTER
Email Address []: <– ENTER
Configuring Jailkit
Configuring SASL
Configuring PAM
Configuring Courier
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring MyDNS
Configuring Apache
Configuring Firewall
Installing ISPConfig
ISPConfig Port [8080]: <– ENTER

Configuring DBServer
Installing Crontab
no crontab for root
no crontab for getmail
Restarting services …
* Stopping MySQL database server mysqld
…done.
* Starting MySQL database server mysqld
…done.
* Checking for corrupt, not cleanly closed and upgrade needing tables.
* Stopping Postfix Mail Transport Agent postfix
…done.
* Starting Postfix Mail Transport Agent postfix
…done.
* Stopping SASL Authentication Daemon saslauthd
…done.
* Starting SASL Authentication Daemon saslauthd
…done.
Stopping amavisd: amavisd-new.
Starting amavisd: amavisd-new.
* Stopping ClamAV daemon clamd
…done.
* Starting ClamAV daemon clamd
LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
…done.
* Stopping Courier authentication services authdaemond
…done.
* Starting Courier authentication services authdaemond
…done.
* Stopping Courier IMAP server…
…done.
* Starting Courier IMAP server…
…done.
* Stopping Courier IMAP-SSL server…
…done.
* Starting Courier IMAP-SSL server…
…done.
* Stopping Courier POP3 server…
…done.
* Starting Courier POP3 server…
…done.
* Stopping Courier POP3-SSL server…
…done.
* Starting Courier POP3-SSL server…
…done.
* Restarting web server apache2
… waiting …done.
Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -E -u 1000 -O clf:/var/log/pure-ftpd/transfer.log -b -A -B
Installation completed.
root@nms:/# /tmp/ispconfig3_install/install#

Maka akan muncul menu login sbg berikut

Isi di dalam ISPCOnfig adalah seperti gambar dibawah dan Cpanel ISPConfig siap digunakan..

Alhamduillah sudah selesai dan ….ikuti terus seri tutorial-tutorial selanjutnya.!

Wassalamu’alaikum
Al-Faqir, Saudi Arabia

2 Comments

  1. mas saya da berhasil coba tutorial di atas cuman kok dak bisa login passwd ya pa ya mas

  2. Boss, saya kok coba ikuti step by step masih belum berhasil. Sudah 2x coba belum berhasil juga ya? klo test smokeping & cacti saya test berhasil langsung


Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s