|
| 1 | +Installation |
| 2 | +----------- |
| 3 | + |
| 4 | +# It is recommended to use a clean (fresh) Debian squeeze 6.0 install where you just selected "Standard System" as the package selection during |
| 5 | +# setup. Then follow the steps below to setup your server with ISPConfig 3. In this guide "vi" is used as texteditor, but you ofcourse |
| 6 | +# you can use whatever you prefer. You should be root for doing all of this. |
| 7 | + |
| 8 | + |
| 9 | +# Check we have Fully Qualified Domain Name |
| 10 | + |
| 11 | +/bin/hostname |
| 12 | + |
| 13 | +# it should return something like "ispconfig.example.com" |
| 14 | +# if not, then we assign a hostname (for example ispconfig): |
| 15 | + |
| 16 | +echo ispconfig.example.com > /etc/hostname |
| 17 | + |
| 18 | +vi /etc/hosts |
| 19 | + |
| 20 | +# and add lines similar but appropriate: |
| 21 | + |
| 22 | +127.0.0.1 localhost.localdomain localhost |
| 23 | +192.168.0.100 ispconfig.example.com ispconfig |
| 24 | + |
| 25 | +# Run: |
| 26 | + |
| 27 | +/etc/init.d/hostname.sh |
| 28 | + |
| 29 | +# enable the Debian volaitile repository to get a newer clamav version |
| 30 | +# The volatile repository for debian squueze was not available yet at the time this howto was written. |
| 31 | +# echo "deb http://volatile.debian.org/debian-volatile squeeze/volatile main contrib non-free" >> /etc/apt/sources.list |
| 32 | +# apt-get update |
| 33 | + |
| 34 | +# Some optional choices |
| 35 | + |
| 36 | +opt0.1) Optionally install SSH-server to get remote shell |
| 37 | + |
| 38 | +apt-get install ssh openssh-server |
| 39 | + |
| 40 | +opt0.2) Optionally if you are not running in virtual machine you can set server clocksync via NTP. Virtual quests get this from the host. |
| 41 | + |
| 42 | +apt-get -y install ntp ntpdate |
| 43 | + |
| 44 | +opt0.3) Optionally if you want vi editor improvement |
| 45 | + |
| 46 | +apt-get -y install vim-nox |
| 47 | + |
| 48 | + |
| 49 | +# Next is the real deal |
| 50 | + |
| 51 | +1) Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils with the following command line (on one line!): |
| 52 | + |
| 53 | +apt-get -y install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d |
| 54 | + |
| 55 | +# Answer the questions from the package manager as follows. |
| 56 | + |
| 57 | +General type of configuration? <-- Internet site |
| 58 | +Mail name? <-- server1.mydomain.tld |
| 59 | + |
| 60 | +# ...use your own domain name of course ;) |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +# Edit the file /etc/mysql/my.cnf |
| 65 | + |
| 66 | +vi /etc/mysql/my.cnf |
| 67 | + |
| 68 | +# and change the line: |
| 69 | + |
| 70 | +bind-address = 127.0.0.1 |
| 71 | + |
| 72 | +to: |
| 73 | + |
| 74 | +#bind-address = 127.0.0.1 |
| 75 | + |
| 76 | +# then restart mysql |
| 77 | + |
| 78 | +/etc/init.d/mysql restart |
| 79 | + |
| 80 | +2) Install Amavisd-new, Spamassassin and Clamav (1 line!): |
| 81 | + |
| 82 | +apt-get -y 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 |
| 83 | + |
| 84 | + |
| 85 | +3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mcrypt (1 line!): |
| 86 | + |
| 87 | +apt-get -y 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 imagemagick libapache2-mod-suphp libopenssl-ruby |
| 88 | + |
| 89 | + |
| 90 | +# When phpMyAdmin is asking weather to configure itself automatically, select "Apache2" |
| 91 | + |
| 92 | +# Then run the following to enable the Apache modules suexec, rewrite and ssl: |
| 93 | + |
| 94 | +a2enmod suexec rewrite ssl actions include |
| 95 | + |
| 96 | +# restart apache before continuing |
| 97 | + |
| 98 | +/etc/init.d/apache2 restart |
| 99 | + |
| 100 | + |
| 101 | +4) Install pure-ftpd and quota |
| 102 | + |
| 103 | +apt-get -y install pure-ftpd-common pure-ftpd-mysql quota quotatool |
| 104 | + |
| 105 | +# Optional: Enable TLS in pureftpd |
| 106 | +echo 1 > /etc/pure-ftpd/conf/TLS |
| 107 | +mkdir -p /etc/ssl/private/ |
| 108 | +openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem |
| 109 | +chmod 600 /etc/ssl/private/pure-ftpd.pem |
| 110 | + |
| 111 | + |
| 112 | +# Edit /etc/fstab. Mine looks like this (I added ,usrquota,grpquota to the partition with the mount point /): |
| 113 | + |
| 114 | +vi /etc/fstab |
| 115 | + |
| 116 | +---------------------------------------------------------------------------------------------- |
| 117 | +# /etc/fstab: static file system information. |
| 118 | +# |
| 119 | +# <file system> <mount point> <type> <options> <dump> <pass> |
| 120 | +proc /proc proc defaults 0 0 |
| 121 | +/dev/sda1 / ext3 errors=remount-ro,usrquota,grpquota 0 1 |
| 122 | +/dev/sda5 none swap sw 0 0 |
| 123 | +/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0 |
| 124 | +/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 |
| 125 | +---------------------------------------------------------------------------------------------- |
| 126 | + |
| 127 | +# To enable quota, run these commands: |
| 128 | + |
| 129 | +touch /aquota.user /aquota.group |
| 130 | +chmod 600 /aquota.* |
| 131 | +mount -o remount / |
| 132 | +quotacheck -avugm |
| 133 | +quotaon -avug |
| 134 | + |
| 135 | + |
| 136 | +5) Install BIND DNS Server |
| 137 | + |
| 138 | +apt-get -y install bind9 dnsutils |
| 139 | + |
| 140 | +6) Install vlogger and webalizer |
| 141 | + |
| 142 | +apt-get -y install vlogger webalizer |
| 143 | + |
| 144 | + |
| 145 | +7) Install Jailkit (optional, only needed if you want to use chrroting for SSH users) |
| 146 | + |
| 147 | +apt-get -y install build-essential autoconf automake1.9 libtool flex bison debhelper |
| 148 | +cd /tmp |
| 149 | +wget http://olivier.sessink.nl/jailkit/jailkit-2.11.tar.gz |
| 150 | +tar xvfz jailkit-2.11.tar.gz |
| 151 | +cd jailkit-2.11 |
| 152 | +./debian/rules binary |
| 153 | +cd .. |
| 154 | +dpkg -i jailkit_2.11-1_*.deb |
| 155 | +rm -rf jailkit-2.11* |
| 156 | + |
| 157 | +8) Install fail2ban (optional but recomended, because the monitor tries to show the log) |
| 158 | +More info at: http://www.howtoforge.com/fail2ban_debian_etch |
| 159 | + |
| 160 | +apt-get -y install fail2ban |
| 161 | + |
| 162 | +9) Install ISPConfig 3 |
| 163 | + |
| 164 | +cd /tmp |
| 165 | +wget http://www.ispconfig.org/downloads/ISPConfig-3.0.2.2.tar.gz |
| 166 | +tar xvfz ISPConfig-3.0.2.2.tar.gz |
| 167 | +cd ispconfig3_install/install/ |
| 168 | + |
| 169 | +# Now start the installation process by executing: |
| 170 | + |
| 171 | +php -q install.php |
| 172 | + |
| 173 | +# The installer will configure all services like postfix, sasl, courier, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not nescessary. To login to the ISPConfig controlpanel, open the following URL in your browser (replace the IP to match your settings!): |
| 174 | + |
| 175 | +http://192.168.0.100:8080/ |
| 176 | + |
| 177 | +# the default login is: |
| 178 | + |
| 179 | +user: admin |
| 180 | +password: admin |
| 181 | + |
| 182 | +# In case you get a permission denied error from apache, please restart the apache webserver process. |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | +---------------------------------------------------------------------------------------------------------- |
| 187 | +Optional: |
| 188 | + |
| 189 | +Install a webbased Email Client |
| 190 | + |
| 191 | +apt-get install squirrelmail |
| 192 | +ln -s /usr/share/squirrelmail/ /var/www/webmail |
| 193 | + |
| 194 | +Access squirrelmail: |
| 195 | + |
| 196 | +http://192.168.0.100/webmail |
| 197 | + |
| 198 | + |
| 199 | +To configure squirrelmail, run: |
| 200 | + |
| 201 | +/usr/sbin/squirrelmail-configure |
| 202 | + |
| 203 | +---------------------------------------------------------------------------------------------------------- |
| 204 | + |
| 205 | +Hints: |
| 206 | + |
| 207 | +debian 5.0 under openvz: |
| 208 | + |
| 209 | +VPSID=101 |
| 210 | +for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE |
| 211 | +do |
| 212 | + vzctl set $VPSID --capability ${CAP}:on --save |
| 213 | +done |
| 214 | + |
| 215 | +---------------------------------------------------------------------------------------------------------- |
| 216 | + |
| 217 | + |
| 218 | +Optional recommended packages: |
| 219 | + |
| 220 | +denyhosts - a utility to help sys admins thwart ssh crackers |
| 221 | +rsync - fast remote file copy program (for backup) |
| 222 | + |
| 223 | +----------------------------------------------------------------------------------------------------------- |
| 224 | + |
| 225 | +Ispc log files rotate, for now manual add but to add in ispc installer: |
| 226 | + |
| 227 | +/etc/logrotate.d/logispc3 |
| 228 | + |
| 229 | +/var/log/ispconfig/ispconfig.log { |
| 230 | + weekly |
| 231 | + missingok |
| 232 | + rotate 4 |
| 233 | + compress |
| 234 | + delaycompress |
| 235 | +} |
| 236 | +/var/log/ispconfig/cron.log { |
| 237 | + weekly |
| 238 | + missingok |
| 239 | + rotate 4 |
| 240 | + compress |
| 241 | + delaycompress |
| 242 | +} |
| 243 | + |
| 244 | + |
| 245 | +----------------------------------------------------------------------------------------------------------- |
| 246 | + |
| 247 | +Possible errors and their solutions |
| 248 | +------------------------------------ |
| 249 | + |
| 250 | +pureftpd login does not work. Take a look at the syslog, if you find an error message like this: |
| 251 | +Mar 24 16:26:28 ispconfig pure-ftpd: (?@?) [ERROR] Sorry, invalid address given |
| 252 | + |
| 253 | +then pureftpd is not able to resolve the hostname. Name resolving can be disabled with these commands: |
| 254 | + |
| 255 | +echo 'yes' > /etc/pure-ftpd/conf/DontResolve |
| 256 | +/etc/init.d/pure-ftpd-mysql restart |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
0 commit comments