tbrehm
2012-06-11 897af06af9522ded99b1e0f46730299e89856ffe
commit | author | age
a7cf08 1 ===============================================================================
R 2
ba0264 3 Installation
a7cf08 4 ===============================================================================
ba0264 5
239490 6 It is recommended to use a clean (fresh) Ubuntu 8.04 LTS install where you selected no additional packages or servers during setup. Then follow the steps below to setup your server with ISPConfig 3:
ba0264 7
a7cf08 8 1) Prepare your OS
R 9 *******************************************************************************
10 Become root user by executing:
11 ___
ba0264 12 sudo su
a7cf08 13 ___
ba0264 14
T 15 and entering the password of the user that you created during setup.
16
17 Edit the file /etc/apt/sources.list and comment out the line beginning with "deb cdrom:....", then run:
a7cf08 18 ___
ba0264 19 apt-get update
T 20 apt-get -u upgrade
a7cf08 21 ___
R 22
23 1.1) Change The Default Shell
24 *******************************************************************************
25 There are alway Shell-Scripts which are not POSIX-compatible and only run when using BASH instead of DASH!
26 ___
27 sudo dpkg-reconfigure dash
28                            <-- ANSWER WITH: No
29 ___
30
31 1.1) Install some software
32 *******************************************************************************
33 ___
34 apt-get install wget
35 ___
ba0264 36
T 37
a7cf08 38 2) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin
R 39 *******************************************************************************
40 (1 line!)
41 ___
871b33 42 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-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop getmail4
a7cf08 43 ___
ba0264 44
T 45 Answer the questions from the package manager as follows.
46
a7cf08 47 Enter the mysql root password. <-- Enter your mysql-root Password
ba0264 48 Create directories for web-based administration ? <-- No
T 49 General type of configuration? <-- Internet site
50 Mail name? <-- server1.mydomain.tld
a7cf08 51 SSL certificate required <-- Ok
ba0264 52
a7cf08 53 ... use your own domain name of course ;)
R 54
55 Authentication will be done by saslauthd. We have to change a few things to make it work properly. Because Postfix runs chrooted in /var/spool/postfix  we have to do the following:
56 ___
57 echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
58 echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf
59
60 mkdir -p /var/spool/postfix/var/run/saslauthd
61 ___
62 Now we have to edit /etc/default/saslauthd in order to activate saslauthd. Set
63 ###
64 START=yes
65 ###
66
67 and change the line OPTIONS="-c -m /var/run/saslauthd" to
68 ###
69 OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
70 ###
71
72 Next add the postfix user to the sasl group (this makes sure that Postfix has the permission to access saslauthd):
73 ___
74 adduser postfix sasl
75 ___
76
77 Now restart Postfix and start saslauthd:
78 ___
79 /etc/init.d/postfix restart
80 /etc/init.d/saslauthd start
81 ___
ba0264 82
239490 83
a7cf08 84 3) Install Amavisd-new, Spamassassin and Clamav
R 85 *******************************************************************************
86 (1 line!)
87 ___
ba0264 88 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
a7cf08 89 ___
ba0264 90
T 91
a7cf08 92 4) Install apache, PHP5 and phpmyadmin
R 93 *******************************************************************************
94 (1 line!)
95 ___
ba0264 96 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
a7cf08 97 ___
ba0264 98
T 99 Then run the following to enable the Apache modules:
a7cf08 100 ___
ba0264 101 a2enmod suexec
T 102 a2enmod rewrite
103 a2enmod ssl
1f0c31 104 a2enmod include
9e356a 105 a2enmod actions
a7cf08 106 a2enmod headers
R 107 ___
ba0264 108
a7cf08 109 4.1) Optional: Install SuPHP
R 110 *******************************************************************************
111 ___
871b33 112 apt-get install libapache2-mod-suphp
T 113 vi /etc/suphp/suphp.conf
a7cf08 114 ___
871b33 115
T 116 set docroot to:
a7cf08 117 ###
f99160 118 docroot=/var/www/clients
a7cf08 119 ###
871b33 120
a7cf08 121 Change: application/x-httpd-php=php:/usr/bin/php-cgi to:
R 122 ###
871b33 123 x-httpd-php=php:/usr/bin/php-cgi
a7cf08 124 ###
R 125
126 4.2) Optional: Install Fast-CGI
127 *******************************************************************************
128 ___
129 apt-get install libapache2-mod-fcgid
130 ___
871b33 131
T 132
a7cf08 133 5) Install pure-ftpd and quota
R 134 *******************************************************************************
135 ___
ba0264 136 apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
T 137 echo 'yes' > /etc/pure-ftpd/conf/DontResolve
a7cf08 138 ___
ba0264 139
239490 140
a7cf08 141 6) Install mydns
R 142 *******************************************************************************
143 ___
ba0264 144 apt-get install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
T 145 cd /tmp
239490 146 wget http://heanet.dl.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.15.tar.gz
R 147 tar xvfz mydns-1.2.8.15.tar.gz
871b33 148 cd mydns-1.2.8
ba0264 149 ./configure
T 150 make
151 make install
a7cf08 152 ___
ba0264 153
d75f08 154 Now create the start / stop script for mydns:
a7cf08 155 ___
d75f08 156 vi /etc/init.d/mydns
a7cf08 157 ___
d75f08 158
a7cf08 159 and enter the following lines (between the "---"-lines):
d75f08 160
a7cf08 161 -------------------------------------------------------------------------------
239490 162 #! /bin/bash
d75f08 163 #
T 164 # mydns         Start the MyDNS server
165 #
166 # Author:       Philipp Kern <phil@philkern.de>.
167 #               Based upon skeleton 1.9.4 by Miquel van Smoorenburg
168 #               <miquels@cistron.nl> and Ian Murdock <imurdock@gnu.ai.mit.edu>.
169 #
170
171 set -e
172
173 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
871b33 174 DAEMON=/usr/local/sbin/mydns
d75f08 175 NAME=mydns
T 176 DESC="DNS server"
177
178 SCRIPTNAME=/etc/init.d/$NAME
179
180 # Gracefully exit if the package has been removed.
181 test -x $DAEMON || exit 0
182
183 case "$1" in
184   start)
185         echo -n "Starting $DESC: $NAME"
186         start-stop-daemon --start --quiet \
187                 --exec $DAEMON -- -b
188         echo "."
189         ;;
190   stop)
191         echo -n "Stopping $DESC: $NAME"
192         start-stop-daemon --stop --oknodo --quiet \
193                 --exec $DAEMON
194         echo "."
195         ;;
196   reload|force-reload)
239490 197         echo -n "Reloading $DESC configuration ..."
d75f08 198         start-stop-daemon --stop --signal HUP --quiet \
T 199                 --exec $DAEMON
200         echo "done."
201         ;;
202   restart)
203         echo -n "Restarting $DESC: $NAME"
204         start-stop-daemon --stop --quiet --oknodo \
205                 --exec $DAEMON
206         sleep 1
207         start-stop-daemon --start --quiet \
208                 --exec $DAEMON -- -b
209         echo "."
210         ;;
211   *)
212         echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
213         exit 1
214         ;;
215 esac
216
217 exit 0
a7cf08 218 -------------------------------------------------------------------------------
d75f08 219
T 220 now execute:
a7cf08 221 ___
d75f08 222 chmod +x /etc/init.d/mydns
T 223 update-rc.d mydns defaults
a7cf08 224 ___
d75f08 225
ba0264 226
a7cf08 227 7) Install vlogger, webalizer and firewall
R 228 *******************************************************************************
229 ___
6eb625 230 apt-get install vlogger webalizer bastille awstats geoip-bin
a7cf08 231 ___
R 232
233 7.1) OPTIONAL: Installing Jailkit
234 *******************************************************************************
235 ___
55411a 236 apt-get install build-essential autoconf automake1.9 libtool flex bison debhelper
a7cf08 237 cd /tmp
55411a 238 wget http://olivier.sessink.nl/jailkit/jailkit-2.7.tar.gz
M 239 tar xvfz jailkit-2.7.tar.gz
240 cd jailkit-2.7
241 ./debian/rules binary
242 cd ..
243 dpkg -i jailkit_2.7-1_i386.deb
244 rm -rf jailkit-2.7*
a7cf08 245 ___
ba0264 246
T 247
a7cf08 248 8) Install ISPConfig 3
R 249 *******************************************************************************
239490 250 There are two possile scenarios a) or b), but not both:
ba0264 251
239490 252 a) Installation of beta 3
a7cf08 253 ___
R 254 cd /tmp
2ce158 255 wget http://www.ispconfig.org/downloads/ISPConfig-3.0.0.9-rc2.tar.gz
T 256 tar xvfz ISPConfig_3.0.0.9-rc2.tar.gz
a7cf08 257 cd ispconfig3_install/install/
R 258 ___
ba0264 259
239490 260 b) Installation from SVN
a7cf08 261 ___
R 262 apt-get install subversion
263 cd /tmp
264 svn export svn://svn.ispconfig.org/ispconfig3/trunk/
265 cd trunk/install
266 ___
ba0264 267
239490 268 after a) or b)
ba0264 269
a7cf08 270 proceed with the ISPConfig installation. Now start the installation process by executing:
R 271 ___
ba0264 272 php -q install.php
a7cf08 273 ___
ba0264 274
6aac1a 275 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 necessary. To login to the ISPConfig controlpanel, open the following URL in your browser (replace the IP to match your settings!):
ba0264 276
239490 277 http://server1.mydomain.tld:8080/
ba0264 278
T 279 the default login is:
280
281 user: admin
282 password: admin
283
284 In case you get a permission denied error from apache, please restart the apache webserver process.
692f6f 285
Q 286
a7cf08 287 8) Further Configuration-Tips
R 288 *******************************************************************************
289 8.1) Apache
290 *******************************************************************************
291 edit /etc/apache2/sites-available/default
292 change the first lines to match your system.
bac6ef 293
a7cf08 294 Replace 0.0.0.0 with your IP.
R 295 Change Document root to /var/www/apache2-default/
296 This directory is now the standard-hompage for your Server.
297 ###
298 NameVirtualHost 0.0.0.0:80
bac6ef 299
a7cf08 300 <VirtualHost 0.0.0.0:80>
R 301     ServerAdmin webmaster@localhost
bac6ef 302
a7cf08 303     DocumentRoot /var/www/apache2-default/
239490 304
a7cf08 305 ###
R 306
307 8.2) Postfix - Aliases
308 *******************************************************************************
309 change /etc/aliases
310 ###
311 # See man 5 aliases for format
312 postmaster:    root
313 clamav: root
314
315 root: webmaster@yourdomain.tld
316 ###
317
318 Then run:
319 ___
320 newaliases
321 ___
322
323 8.3) Php.ini
324 *******************************************************************************
325 I changed the following in the php.ini-Files in the following directorys:
326 /etc/php5/apache2/
327 /etc/php5/cgi/
328 /etc/php5/cli/
329
330 It is important to search the following parameters in the php.ini and replace them!!!
331 Don't just copy the whole stuff to the end of the file.
332
333 ###
334 memory_limit = 64M      ; Maximum amount of memory a script may consume (16MB)
335
336 display_errors = Off
337
338 log_errors = On
339
340 upload_max_filesize = 32M
341
342 allow_url_fopen = On
343 allow_url_include = On
344
345 date.timezone = Europe/Berlin
346
347 extension = imap.so
348 extension = mcrypt.so
349
350 ;Typo3 fast-cgi PHP5 bug fix
351 cgi.fix_pathinfo = 0
352
353 ###
354
355 add to the end of the file:
356 ###
357 [htscanner]
358 Extension = "htscanner.so"
359 config_file = ".htaccess"
360 default_docroot = "/var/www"
361 ###
bac6ef 362
Q 363
a7cf08 364 9) Additional Software
R 365 *******************************************************************************
366 9.1) NTP, Denyhosts
367 *******************************************************************************
368 __
369 apt-get install ntp denyhosts
370 __
bac6ef 371
a7cf08 372 in /etc/ntp.conf replace the server-line with:
R 373 ###
374 server 0.pool.ntp.org
375 server 1.pool.ntp.org
376 server 2.pool.ntp.org
377 ###
692f6f 378
a7cf08 379 9.2) Typo3 - typo3.org
R 380 *******************************************************************************
381 ___
382 apt-get install imagemagick php5-gd php5-imagick gs gs-esp
383 ___
692f6f 384
a7cf08 385 There is a bug in the php5-library under Ubuntu 8.04. You can fix it by changing "cgi.fix_pathinfo = 0" in the php.ini. Look at 8.4).
R 386
387 10.2) Horde (Webmail) - horde.org
388 *******************************************************************************
389 First of all, install the horde3 and Imp4 packages (Ubuntu/Debian)
390 ___
391 apt-get install horde3 imp4 gollem kronolith2 mnemo2 nag2 turba2
392 pear install --onlyreqdeps Log Mail Mail_Mime MDB2 File Date
393 ___
394
395 It is then necessary to setup an Alias for Apache. 
396 If you want horde only on single pages, that are created with ispc3:
397 Add the following line to ISPConfig->Sites->Web Domain->Options->Apache directives
398 If you want to access webmail on all pages add the following line to /etc/apache2/apache2.conf
399 ###
400 Alias /horde3 /usr/share/horde3
401 ###
402
403 Allow Apache to write horde configuration files :
404 ___
405 chown -R www-data:www-data /etc/horde
406 ___
407
408 Important parameters to change are (in Horde setup) :
409 ###
410 Horde URL (change it to /horde3)
411 Enable Database Access. Do Not use MySQL Improved (4+), my attempts at using it failed. MySQL Standard runs fine however
412 Enable Authentication. I recommend IMAP authentication (something like {localhost:143/imap/notls}. Do not forget the /notls, not specifying failed on my setup). Also make sure to add your username to the list of Administrators, otherwise, you won’t have access to horde/imp4 parameters. Using anything else than IMAP seeemed to fail on my setup
413 Generate the configuration
414 Horde should now be setup. You now have to configure imp4
415 generate a configuration using the horde administration panel
416 modify the /etc/horde/imp4/servers.php file. Instruction are given inside the file concerning the syntax. If you run Courier-IMAP, and want Imp to automatically authenticate using horde credentials :
417 $servers[’imap’] = array(
418 ‘name’ => ‘IMAP Server’,
419 ’server’ => ‘localhost’,
420 ‘hordeauth’ => true,
421 ‘protocol’ => ‘imap/notls’,
422 ‘port’ => 143,
423 ‘folders’ => ‘INBOX.’,
424 ‘namespace’ => ‘’,
425 ‘maildomain’ => ‘domain.com’,
426 ’smtphost’ => ‘localhost’,
427 ’smtpport’ => 25,
428 ‘realm’ => ‘’,
429 ‘preferred’ => ‘’,
430 ‘dotfiles’ => false,
431 ‘hierarchies’ => array()
432 );
433 ###
434
435
436 11) have fun and drink a cup of coffee
437 *******************************************************************************
438 :-)