VMware Images:
|
The Perfect Server - Debian Squeeze (Debian 6.0) [ISPConfig 2] - Page 3
4 Install The SSH ServerIf you didn't install an SSH server during the basic 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 Squeeze 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 Squeeze 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 squeeze-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). 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 Install Some SoftwareNow we install a few packages that are needed later on. Run apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb-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 (This command must go into one line!)
10 Quota(If you have chosen a different partitioning scheme than I did, you must adjust this chapter so that quota applies to the partitions where you need it.) To install quota, run apt-get install quota Edit /etc/fstab. Mine looks like this (I added ,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 to the partition with the mount point /): vi /etc/fstab
To enable quota, run these commands: mount -o remount / quotacheck -avugm
11 BIND9 DNS ServerRun apt-get install bind9 to install BIND9. For security reasons we want to run BIND chrooted so we have to do the following steps: /etc/init.d/bind9 stop Edit the file /etc/default/bind9 so that the daemon will run as the unprivileged user bind, chrooted to /var/lib/named. Modify the line: OPTIONS="-u bind" so that it reads OPTIONS="-u bind -t /var/lib/named": vi /etc/default/bind9
Create the necessary directories under /var/lib: mkdir -p /var/lib/named/etc Then move the config directory from /etc to /var/lib/named/etc: mv /etc/bind /var/lib/named/etc Create a symlink to the new config directory from the old location (to avoid problems when BIND gets updated in the future): ln -s /var/lib/named/etc/bind /etc/bind Make null and random devices, and fix permissions of the directories: mknod /var/lib/named/dev/null c 1 3 We need to create the file /etc/rsyslog.d/bind-chroot.conf... vi /etc/rsyslog.d/bind-chroot.conf ... with the following line so that we can still get important messages logged to the system logs:
Restart the logging daemon: /etc/init.d/rsyslog restart Start up BIND, and check /var/log/syslog for errors: /etc/init.d/bind9 start
|



Recent comments
1 day 5 hours ago
1 day 7 hours ago
1 day 19 hours ago
1 day 22 hours ago
2 days 2 hours ago
2 days 8 hours ago
2 days 18 hours ago
2 days 19 hours ago
3 days 4 hours ago
3 days 5 hours ago