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