This tutorial shows how to prepare a Debian Lenny (Debian 5.0) server for the installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3 is a webhosting control panel that allows you to configure the following services through a web browser: Apache web server, Postfix mail server, MySQL, MyDNS nameserver, PureFTPd, SpamAssassin, ClamAV, and many more.
You can read on http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3
But this one is different .. more simple .. but tough !
=========================
RUMUS SINGKAT DEBIAN LENNY PERFECT SERVER
=========================
Berikut ini command singkat cara menjadikan OS Debian anda menjadi Perfect Server
#install ssh dan nano
apt-get install ssh openssh-server
#buat yang biasa pake nano editor
apt-get install nano
#set interface
nano /etc/network/interfaces
/etc/init.d/networking restart
nano /etc/hosts
#run configurasi hostname
echo server1.example.com > /etc/hostname
/etc/init.d/hostname.sh start
#after run
hostname
hostname -f
#update package linux
apt-get update
#upgrade package
apt-get upgrade
#Install software2 pendukung
apt-get 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
#instal quote
apt-get install quota
vi /etc/fstab
#instal bind server
apt-get install bind9
/etc/init.d/bind9 stop
vi /etc/default/bind9
#Create the necessary directories under /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
#/etc to /var/lib/named/etc
mv /etc/bind /var/lib/named/etc
#Create a symlink
ln -s /var/lib/named/etc/bind /etc/bind
#open /etc/rsyslog.d/bind-chroot.conf…
vi /etc/rsyslog.d/bind-chroot.conf
#Restart the logging daemon:
/etc/init.d/rsyslog restart
#Start up BIND, and check /var/log/syslog for errors:
/etc/init.d/bind9 start
#install MySQL
apt-get install mysql-server mysql-client libmysqlclient15-dev
vi /etc/mysql/my.cnf
/etc/init.d/mysql restart
netstat -tap | grep mysql
mysql -u root -p
#seting mysql
SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’roots_password’);
SET PASSWORD FOR ‘root’@'msa’ = PASSWORD(’roots_password’);
FLUSH PRIVILEGES;
SHOW VARIABLES LIKE ‘innodb_fast_shutdown’;
QUIT
#phpmyadmin
apt-get install phpmyadmin
gedit /etc/phpmyadmin/apache.conf
kemudian copykan isi seluruh perintah di file tersebut ke file /etc/apache2/apache2.conf di baris paling akhir
#install Postfix with SMTP-AUTH and TLS
apt-get install postfix libsasl2-2 sasl2-bin libsasl2-modules procmail
dpkg-reconfigure postfix
#create the certificates for 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
#configure Postfix for TLS
postconf -e ‘myhostname = server1.example.com’
#file /etc/postfix/main.cf should now look like this:
cat /etc/postfix/main.cf
#Authentication will be done by saslauthd./var/spool/postfix
mkdir -p /var/spool/postfix/var/run/saslauthd
adduser postfix sasl
/etc/init.d/postfix restart
/etc/init.d/saslauthd start
telnet localhost 25
#Postfix mail server type
ehlo localhost
#instal Courier-IMAP/Courier-POP3
apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0
cd /etc/courier
rm -f /etc/courier/imapd.pem
rm -f /etc/courier/pop3d.pem
vi /etc/courier/imapd.cnf
vi /etc/courier/pop3d.cnf
#then recreate the certificates…
mkimapdcert
mkpop3dcert
#restart Courier-IMAP-SSL and Courier-POP3-SSL:
/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop-ssl restart
#configure Postfix to deliver emails to a user’s Maildir*:
postconf -e ‘home_mailbox = Maildir/’
postconf -e ‘mailbox_command =’
/etc/init.d/postfix restart
##Apache/PHP5/Ruby/Python
apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils apache2-suexec libexpat1 ssl-cert
# install PHP5, Ruby, and Python (all three as Apache modules):
apt-get 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-suhosin php5-tidy php5-xcache php5-xmlrpc php5-xsl
#Next edit /etc/apache2/mods-available/dir.conf…
vi /etc/apache2/mods-available/dir.conf
#enable some Apache modules (SSL, rewrite, suexec, and include):
a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include
#restart apache
/etc/init.d/apache2 restart
#fix a small problem with Ruby.
vi /etc/mime.types
/etc/init.d/apache2 restart
#Disable/enable PHP Globally
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
[...]
#
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>
/etc/init.d/apache2 restart
#install Proftpd
apt-get install proftpd ucf
vi /etc/proftpd/proftpd.conf
#link ftpd
ln -s /etc/proftpd/proftpd.conf /etc/proftpd.conf
/etc/init.d/proftpd restart
#install webalizer
apt-get install webalizer
#Synchronize the System Clock
apt-get install ntp ntpdate
#Install Some Perl Modules
apt-get install libhtml-parser-perl libdb-file-lock-perl libnet-dns-perl
#run CGI scripts under suExec
/usr/lib/apache2/suexec -V
Credits: http://www.howtoforge.us/debian-lenny-perfect-server





J o u r n a l


