fantu
2008-12-29 f7b32b76cce0cca2dcd5a31b41cd9e4b3bdd5d69
commit | author | age
4cb0eb 1 Installation
T 2 -----------
3
9ba456 4 # It is recommended to use a clean (fresh) Debian lenny install where you just selected "Standard System" as the package selection during
A 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.
4cb0eb 7
9ba456 8
A 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 hostname (for example ispconfig):
fdf891 15
F 16 echo ispconfig.example.com > /etc/hostname
17
18 vi /etc/hosts
4c9967 19
A 20 # and add line similar but appropriate:
9ba456 21
fdf891 22 127.0.0.1       localhost.localdomain   localhost
F 23 192.168.0.100   ispconfig.example.com   ispconfig
24
4cb0eb 25
T 26
9ba456 27 # Some optional choices
A 28
29 opt0.1) Optionally install SSH-server to get remote shell
30
31 apt-get install ssh openssh-server
32
33 opt0.2) Optionally if you are not running in virtual machine you can set server clocksync via NTP. Virtual quests get this from host.
34
35 apt-get install ntp ntpdate
36
37
38
39 # Then into real deal
40
610bc7 41 1) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin, rkhunter, binutils with the following command line (on one line!):
9ba456 42
610bc7 43 apt-get 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 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop getmail4 rkhunter binutils
9ba456 44
A 45 # Answer the questions from the package manager as follows.
4cb0eb 46
T 47 Create directories for web-based administration ? <-- No
48 General type of configuration? <-- Internet site
49 Mail name? <-- server1.mydomain.tld
50  SSL certificate required <-- Ok
51
4c9967 52 # ...use your own domain name of course ;)
4cb0eb 53
9ba456 54
A 55
56 # Edit the file /etc/mysql/my.cnf
d4c9b3 57
T 58 vi /etc/mysql/my.cnf
59
9ba456 60 # and comment out the line
d4c9b3 61
T 62 bind-address          = 127.0.0.1
63
9ba456 64 # then restart mysql
d4c9b3 65
T 66 /etc/init.d/mysql restart
67
9ba456 68 # Set the mysql database password:
d4c9b3 69
T 70 mysqladmin -u root password yourrootsqlpassword
71 mysqladmin -h ispconfig.local -u root password yourrootsqlpassword
9ba456 72
d4c9b3 73
T 74
4cb0eb 75 2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
T 76
ba66cd 77 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
4cb0eb 78
T 79
80
9ba456 81 3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mrypt (1 line!):
4cb0eb 82
b5f091 83 apt-get 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
9ba456 84
A 85
86 # When myphpadmin is asking wether to configure itself automagigally, select "Apache2"
87
88 # Then run the following to enable the Apache modules suexec, rewrite and ssl:
89
9e356a 90 a2enmod suexec rewrite ssl actions
9ba456 91
4c9967 92 # Secure phpMyAdmin by deleting setuppassword-file
A 93 # and removing/commenting Setup Authorization from apache.conf
94
95 rm /etc/phpmyadmin/htpasswd.setup
96
97 vi /etc/phpmyadmin/apache.conf
98
99 # delete/comment following lines (between the ----- lines):
100 ------------------------------------------------------
101         # Authorize for setup
102        <Files setup.php>
103            # For Apache 1.3 and 2.0
104            <IfModule mod_auth.c>
105                AuthType Basic
106                AuthName "phpMyAdmin Setup"
107                AuthUserFile /etc/phpmyadmin/htpasswd.setup
108            </IfModule>
109            # For Apache 2.2
110            <IfModule mod_authn_file.c>
111                AuthType Basic
112                AuthName "phpMyAdmin Setup"
113                AuthUserFile /etc/phpmyadmin/htpasswd.setup
114            </IfModule>
115            Require valid-user
116        </Files>
117 ------------------------------------------------------
118
119
9ba456 120 opt3.1) Optionally install some imagemanipulation capabilities to make advanced webdesigners happy
A 121
122 apt-get install php5-imagick imagemagick
123
4c9967 124 # restart apache before continuing
9ba456 125
4c9967 126 /etc/init.d/apache2 restart
A 127  
4cb0eb 128
T 129 4) Install pure-ftpd and quota
130
131 apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
132
9ba456 133 # Edit the file /etc/default/pure-ftpd-common to change the start mode from "inetd" to "standalone".
af8f1b 134
T 135 vi /etc/default/pure-ftpd-common
136
9ba456 137 # Edit the file /etc/inetd.conf to prevent inetd from trying to start ftp.
A 138 # To do this, comment line starting like "ftp   stream  tcp" by adding "#"-sign in front of the line.
3845f1 139
T 140 vi /etc/inetd.conf
4fe973 141
9ba456 142 # Then execute:
af8f1b 143
T 144 /etc/init.d/openbsd-inetd restart
9ba456 145
af8f1b 146
4cb0eb 147
T 148 5) Install mydns
149
777da7 150 apt-get install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
4cb0eb 151
777da7 152 cd /tmp
T 153 wget http://heanet.dl.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.4.tar.gz
154 tar xvfz mydns-1.2.8.4.tar.gz
155 cd mydns-1.2.8
156 ./configure
157 make
158 make install
d4c9b3 159
4c9967 160 # Now create the start / stop script for mydns:
4cb0eb 161
777da7 162 vi /etc/init.d/mydns
T 163
4c9967 164 # and enter the following lines (between the ----- lines):
777da7 165
T 166 ------------------------------------------------------
167 #! /bin/sh
168 #
169 # mydns         Start the MyDNS server
170 #
171 # Author:       Philipp Kern <phil@philkern.de>.
172 #               Based upon skeleton 1.9.4 by Miquel van Smoorenburg
173 #               <miquels@cistron.nl> and Ian Murdock <imurdock@gnu.ai.mit.edu>.
174 #
175
176 set -e
177
178 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
179 DAEMON=/usr/local/sbin/mydns
180 NAME=mydns
181 DESC="DNS server"
182
183 SCRIPTNAME=/etc/init.d/$NAME
184
185 # Gracefully exit if the package has been removed.
186 test -x $DAEMON || exit 0
187
188 case "$1" in
189   start)
190         echo -n "Starting $DESC: $NAME"
191         start-stop-daemon --start --quiet \
192                 --exec $DAEMON -- -b
193         echo "."
194         ;;
195   stop)
196         echo -n "Stopping $DESC: $NAME"
197         start-stop-daemon --stop --oknodo --quiet \
198                 --exec $DAEMON
199         echo "."
200         ;;
201   reload|force-reload)
202         echo -n "Reloading $DESC configuration..."
203         start-stop-daemon --stop --signal HUP --quiet \
204                 --exec $DAEMON
205         echo "done."
206         ;;
207   restart)
208         echo -n "Restarting $DESC: $NAME"
209         start-stop-daemon --stop --quiet --oknodo \
210                 --exec $DAEMON
211         sleep 1
212         start-stop-daemon --start --quiet \
213                 --exec $DAEMON -- -b
214         echo "."
215         ;;
216   *)
217         echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
218         exit 1
219         ;;
220 esac
221
222 exit 0
223 ---------------------------------------------------------------------------
224
4c9967 225 # now execute:
777da7 226
T 227 chmod +x /etc/init.d/mydns
228 update-rc.d mydns defaults
4cb0eb 229
T 230 6) Install vlogger and webalizer
231
232 apt-get install vlogger webalizer
233
234
235 7) Install ISPConfig 3
236
4c9967 237 # There are two possile scenarios, but not both:
369a38 238 7.1) Install the latest released version 
4fe973 239 7.2) Install directly from SVN
4cb0eb 240
6627a9 241 7.1) Installation of last version from tar.gz
4cb0eb 242
T 243   cd /tmp
bf50bc 244   wget http://www.ispconfig.org/downloads/ISPConfig-3.0.0.8-rc1.tar.gz
T 245   tar xvfz ISPConfig-3.0.0.8-rc1.tar.gz
3fac98 246   cd ispconfig3_install/install/
4cb0eb 247
4fe973 248 7.2) Installation from SVN
4cb0eb 249
T 250   apt-get install subversion
251   cd /tmp
252   svn export svn://svn.ispconfig.org/ispconfig3/trunk/
253   cd trunk/install
254
255
4fe973 256 7.1+7.2) Now proceed with the ISPConfig installation.
4cb0eb 257
4c9967 258 # Now start the installation process by executing:
4cb0eb 259
T 260 php -q install.php
261
4c9967 262 # 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!):
4cb0eb 263
T 264 http://192.168.0.100:8080/
265
4c9967 266 # the default login is:
4cb0eb 267
T 268 user: admin
269 password: admin
270
4c9967 271 # In case you get a permission denied error from apache, please restart the apache webserver process.
ba66cd 272
9ba456 273
A 274
275 ----------------------------------------------------------------------------------------------------------
3845f1 276 Optional:
T 277
490039 278 Install a webbased Email Client
3845f1 279
T 280 apt-get install squirrelmail
281 ln -s /usr/share/squirrelmail/ /var/www/webmail
282
283 Access squirrelmail:
284
285 http://192.168.0.100/webmail
286
287
288 To configure squirrelmail, run:
289
290 /usr/sbin/squirrelmail-configure
291
ba66cd 292 ----------------------------------------------------------------------------------------------------------
T 293
294 Hints:
295
296 debian 4.0 under openvz:
297
8a6a58 298 VPSID=101
ba66cd 299 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
T 300 do
301   vzctl set $VPSID --capability ${CAP}:on --save
302 done
46bf55 303
T 304 ----------------------------------------------------------------------------------------------------------
305
306 Installing Jailkit:
307
308 apt-get install build-essential autoconf automake1.9 libtool flex bison
309 cd /tmp
310 wget http://olivier.sessink.nl/jailkit/jailkit-2.5.tar.gz
311 tar xvfz jailkit-2.5.tar.gz
312 cd jailkit-2.5
313 ./configure
314 make
315 make install
316 rm -rf jailkit-2.5*
9ba456 317 ----------------------------------------------------------------------------------------------------------