VMware Images: |
The Perfect Server - Debian Wheezy (Apache2, BIND, Dovecot, ISPConfig 3) - Page 3
4 Install The SSH Server (Optional)If you did not install the OpenSSH server during the system installation, you can do it now: apt-get install ssh openssh-server From now on you can use an SSH client such as PuTTY and connect from your workstation to your Debian Wheezy server and follow the remaining steps from this tutorial.
5 Install vim-nox (Optional)I'll use vi as my text editor in this tutorial. The default vi program has some strange behaviour on Debian and Ubuntu; to fix this, we install vim-nox: apt-get install vim-nox (You don't have to do this if you use a different text editor such as joe or nano.)
6 Configure The NetworkBecause the Debian Wheezy installer has configured our system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100) (please note that I replace allow-hotplug eth0 with auto eth0; otherwise restarting the network doesn't work, and we'd have to reboot the whole system): vi /etc/network/interfaces
Then restart your network: /etc/init.d/networking restart Then edit /etc/hosts. Make it look like this: vi /etc/hosts
Now run echo server1.example.com > /etc/hostname Afterwards, run hostname It is important that both show server1.example.com now!
7 Update Your Debian InstallationFirst make sure that your /etc/apt/sources.list contains the wheezy-updates repository (this makes sure you always get the newest updates for the ClamAV virus scanner - this project publishes releases very often, and sometimes old versions stop working), and that the contrib and non-free repositories are enabled (some packages such as libapache2-mod-fastcgi are not in the main repository). vi /etc/apt/sources.list
Run apt-get update to update the apt package database and apt-get upgrade to install the latest updates (if there are any).
8 Change The Default Shell/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this: dpkg-reconfigure dash Use dash as the default system shell (/bin/sh)? <-- No If you don't do this, the ISPConfig installation will fail.
9 Synchronize the System ClockIt is a good idea to synchronize the system clock with an NTP (network time protocol) server over the Internet. Simply run apt-get install ntp ntpdate and your system time will always be in sync.
10 Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutilsWe can install Postfix, Dovecot, MySQL, rkhunter, and binutils with a single command: apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve sudo You will be asked the following questions: General type of mail configuration: <-- Internet Site Next open the TLS/SSL and submission ports in Postfix: vi /etc/postfix/master.cf Uncomment the submission and smtps sections as follows (leave -o milter_macro_daemon_name=ORIGINATING as we don't need it):
Restart Postfix afterwards: /etc/init.d/postfix restart We want MySQL to listen on all interfaces, not just localhost, therefore we edit /etc/mysql/my.cnf and comment out the line bind-address = 127.0.0.1: vi /etc/mysql/my.cnf
Then we restart MySQL: /etc/init.d/mysql restart Now check that networking is enabled. Run netstat -tap | grep mysql The output should look like this: root@server1:~# netstat -tap | grep mysql
11 Install Amavisd-new, SpamAssassin, And ClamavTo install amavisd-new, SpamAssassin, and ClamAV, we run apt-get 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 The ISPConfig 3 setup uses amavisd which loads the SpamAssassin filter library internally, so we can stop SpamAssassin to free up some RAM: /etc/init.d/spamassassin stop
|
Recent comments
15 hours 9 min ago
1 day 8 hours ago
2 days 12 hours ago
2 days 17 hours ago
3 days 33 min ago
3 days 10 hours ago
3 days 15 hours ago
3 days 16 hours ago
4 days 1 hour ago
4 days 3 hours ago