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 |
### |
871b33
|
118 |
docroot=/var/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 |
___ |
9d4a9f
|
230 |
apt-get install vlogger webalizer bastille |
a7cf08
|
231 |
___ |
R |
232 |
|
|
233 |
7.1) OPTIONAL: Installing Jailkit |
|
234 |
******************************************************************************* |
|
235 |
___ |
|
236 |
apt-get install build-essential autoconf automake1.9 libtool flex bison |
|
237 |
cd /tmp |
|
238 |
wget http://olivier.sessink.nl/jailkit/jailkit-2.5.tar.gz |
|
239 |
tar xvfz jailkit-2.5.tar.gz |
|
240 |
cd jailkit-2.5 |
|
241 |
./configure |
|
242 |
make |
|
243 |
make install |
|
244 |
___ |
ba0264
|
245 |
|
T |
246 |
|
a7cf08
|
247 |
8) Install ISPConfig 3 |
R |
248 |
******************************************************************************* |
239490
|
249 |
There are two possile scenarios a) or b), but not both: |
ba0264
|
250 |
|
239490
|
251 |
a) Installation of beta 3 |
a7cf08
|
252 |
___ |
R |
253 |
cd /tmp |
|
254 |
wget http://www.ispconfig.org/downloads/ISPConfig_3.0.0.8-rc1.tar.gz |
|
255 |
tar xvfz ISPConfig_3.0.0.8-rc1.tar.gz |
|
256 |
cd ispconfig3_install/install/ |
|
257 |
___ |
ba0264
|
258 |
|
239490
|
259 |
b) Installation from SVN |
a7cf08
|
260 |
___ |
R |
261 |
apt-get install subversion |
|
262 |
cd /tmp |
|
263 |
svn export svn://svn.ispconfig.org/ispconfig3/trunk/ |
|
264 |
cd trunk/install |
|
265 |
___ |
ba0264
|
266 |
|
239490
|
267 |
after a) or b) |
ba0264
|
268 |
|
a7cf08
|
269 |
proceed with the ISPConfig installation. Now start the installation process by executing: |
R |
270 |
___ |
ba0264
|
271 |
php -q install.php |
a7cf08
|
272 |
___ |
ba0264
|
273 |
|
T |
274 |
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!): |
|
275 |
|
239490
|
276 |
http://server1.mydomain.tld:8080/ |
ba0264
|
277 |
|
T |
278 |
the default login is: |
|
279 |
|
|
280 |
user: admin |
|
281 |
password: admin |
|
282 |
|
|
283 |
In case you get a permission denied error from apache, please restart the apache webserver process. |
692f6f
|
284 |
|
Q |
285 |
|
a7cf08
|
286 |
8) Further Configuration-Tips |
R |
287 |
******************************************************************************* |
|
288 |
8.1) Apache |
|
289 |
******************************************************************************* |
|
290 |
edit /etc/apache2/sites-available/default |
|
291 |
change the first lines to match your system. |
bac6ef
|
292 |
|
a7cf08
|
293 |
Replace 0.0.0.0 with your IP. |
R |
294 |
Change Document root to /var/www/apache2-default/ |
|
295 |
This directory is now the standard-hompage for your Server. |
|
296 |
### |
|
297 |
NameVirtualHost 0.0.0.0:80 |
bac6ef
|
298 |
|
a7cf08
|
299 |
<VirtualHost 0.0.0.0:80> |
R |
300 |
ServerAdmin webmaster@localhost |
bac6ef
|
301 |
|
a7cf08
|
302 |
DocumentRoot /var/www/apache2-default/ |
239490
|
303 |
|
a7cf08
|
304 |
### |
R |
305 |
|
|
306 |
8.2) Postfix - Aliases |
|
307 |
******************************************************************************* |
|
308 |
change /etc/aliases |
|
309 |
### |
|
310 |
# See man 5 aliases for format |
|
311 |
postmaster: root |
|
312 |
clamav: root |
|
313 |
|
|
314 |
root: webmaster@yourdomain.tld |
|
315 |
### |
|
316 |
|
|
317 |
Then run: |
|
318 |
___ |
|
319 |
newaliases |
|
320 |
___ |
|
321 |
|
|
322 |
8.3) Php.ini |
|
323 |
******************************************************************************* |
|
324 |
I changed the following in the php.ini-Files in the following directorys: |
|
325 |
/etc/php5/apache2/ |
|
326 |
/etc/php5/cgi/ |
|
327 |
/etc/php5/cli/ |
|
328 |
|
|
329 |
It is important to search the following parameters in the php.ini and replace them!!! |
|
330 |
Don't just copy the whole stuff to the end of the file. |
|
331 |
|
|
332 |
### |
|
333 |
memory_limit = 64M ; Maximum amount of memory a script may consume (16MB) |
|
334 |
|
|
335 |
display_errors = Off |
|
336 |
|
|
337 |
log_errors = On |
|
338 |
|
|
339 |
upload_max_filesize = 32M |
|
340 |
|
|
341 |
allow_url_fopen = On |
|
342 |
allow_url_include = On |
|
343 |
|
|
344 |
date.timezone = Europe/Berlin |
|
345 |
|
|
346 |
extension = imap.so |
|
347 |
extension = mcrypt.so |
|
348 |
|
|
349 |
;Typo3 fast-cgi PHP5 bug fix |
|
350 |
cgi.fix_pathinfo = 0 |
|
351 |
|
|
352 |
### |
|
353 |
|
|
354 |
add to the end of the file: |
|
355 |
### |
|
356 |
[htscanner] |
|
357 |
Extension = "htscanner.so" |
|
358 |
config_file = ".htaccess" |
|
359 |
default_docroot = "/var/www" |
|
360 |
### |
bac6ef
|
361 |
|
Q |
362 |
|
a7cf08
|
363 |
9) Additional Software |
R |
364 |
******************************************************************************* |
|
365 |
9.1) NTP, Denyhosts |
|
366 |
******************************************************************************* |
|
367 |
__ |
|
368 |
apt-get install ntp denyhosts |
|
369 |
__ |
bac6ef
|
370 |
|
a7cf08
|
371 |
in /etc/ntp.conf replace the server-line with: |
R |
372 |
### |
|
373 |
server 0.pool.ntp.org |
|
374 |
server 1.pool.ntp.org |
|
375 |
server 2.pool.ntp.org |
|
376 |
### |
692f6f
|
377 |
|
a7cf08
|
378 |
9.2) Typo3 - typo3.org |
R |
379 |
******************************************************************************* |
|
380 |
___ |
|
381 |
apt-get install imagemagick php5-gd php5-imagick gs gs-esp |
|
382 |
___ |
692f6f
|
383 |
|
a7cf08
|
384 |
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 |
385 |
|
|
386 |
10.2) Horde (Webmail) - horde.org |
|
387 |
******************************************************************************* |
|
388 |
First of all, install the horde3 and Imp4 packages (Ubuntu/Debian) |
|
389 |
___ |
|
390 |
apt-get install horde3 imp4 gollem kronolith2 mnemo2 nag2 turba2 |
|
391 |
pear install --onlyreqdeps Log Mail Mail_Mime MDB2 File Date |
|
392 |
___ |
|
393 |
|
|
394 |
It is then necessary to setup an Alias for Apache. |
|
395 |
If you want horde only on single pages, that are created with ispc3: |
|
396 |
Add the following line to ISPConfig->Sites->Web Domain->Options->Apache directives |
|
397 |
If you want to access webmail on all pages add the following line to /etc/apache2/apache2.conf |
|
398 |
### |
|
399 |
Alias /horde3 /usr/share/horde3 |
|
400 |
### |
|
401 |
|
|
402 |
Allow Apache to write horde configuration files : |
|
403 |
___ |
|
404 |
chown -R www-data:www-data /etc/horde |
|
405 |
___ |
|
406 |
|
|
407 |
Important parameters to change are (in Horde setup) : |
|
408 |
### |
|
409 |
Horde URL (change it to /horde3) |
|
410 |
Enable Database Access. Do Not use MySQL Improved (4+), my attempts at using it failed. MySQL Standard runs fine however |
|
411 |
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 |
|
412 |
Generate the configuration |
|
413 |
Horde should now be setup. You now have to configure imp4 |
|
414 |
generate a configuration using the horde administration panel |
|
415 |
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 : |
|
416 |
$servers[’imap’] = array( |
|
417 |
‘name’ => ‘IMAP Server’, |
|
418 |
’server’ => ‘localhost’, |
|
419 |
‘hordeauth’ => true, |
|
420 |
‘protocol’ => ‘imap/notls’, |
|
421 |
‘port’ => 143, |
|
422 |
‘folders’ => ‘INBOX.’, |
|
423 |
‘namespace’ => ‘’, |
|
424 |
‘maildomain’ => ‘domain.com’, |
|
425 |
’smtphost’ => ‘localhost’, |
|
426 |
’smtpport’ => 25, |
|
427 |
‘realm’ => ‘’, |
|
428 |
‘preferred’ => ‘’, |
|
429 |
‘dotfiles’ => false, |
|
430 |
‘hierarchies’ => array() |
|
431 |
); |
|
432 |
### |
|
433 |
|
|
434 |
|
|
435 |
11) have fun and drink a cup of coffee |
|
436 |
******************************************************************************* |
|
437 |
:-) |