Marius Cramer
2013-10-14 d9bcf68e395d6156645a7974b1a992aa6e6c00aa
commit | author | age
4cb0eb 1 Installation
T 2 -----------
3
4 It is recommended to use a clean (fresh) Debian etch install where you just selected "Standard System" as the package selection during setup. Then follow the steps below to setup your server with ISPConfig 3:
5
fdf891 6 assign hostname (for example ispconfig)
F 7
8 echo ispconfig.example.com > /etc/hostname
9
10 vi /etc/hosts
11 and add line similar but appropriate:
12 127.0.0.1       localhost.localdomain   localhost
13 192.168.0.100   ispconfig.example.com   ispconfig
14
39b058 15 1) Add the debian volatile repository to the apt sources list:
T 16
17 vi /etc/apt/sources.list
18
19 and insert the line:
20
21 deb http://volatile.debian.org/debian-volatile etch/volatile main contrib non-free
22
0e9ad6 23 Then execute these commands to insert the Debian voltaile gpg key to the apt keyring:
T 24
25 cd /tmp
26 apt-get install wget
27 wget http://www.debian.org/volatile/etch-volatile.asc
28 apt-key add etch-volatile.asc
29 rm -f etch-volatile.asc
30
31 Now we update the package list by executing:
39b058 32
T 33 apt-get update
34
610bc7 35 Now Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin, ntpdate, rkhunter, binutils with the following command line (on one line!):
4cb0eb 36
fb5ebb 37 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 ntp ntpdate rkhunter binutils sudo
4cb0eb 38
T 39 Answer the questions from the package manager as follows.
40
41 Create directories for web-based administration ? <-- No
42 General type of configuration? <-- Internet site
43 Mail name? <-- server1.mydomain.tld
44  SSL certificate required <-- Ok
45
46 ...use your own domain name of course ;)
47
5f7eea 48 Edit the file /etc/mysql/my.cnf
d4c9b3 49
T 50 vi /etc/mysql/my.cnf
51
52 and comment out the line
53
54 bind-address          = 127.0.0.1
55
56 then restart mysql
57
58 /etc/init.d/mysql restart
59
60 Set the mysql database password:
61
62 mysqladmin -u root password yourrootsqlpassword
63 mysqladmin -h ispconfig.local -u root password yourrootsqlpassword
64
65
4cb0eb 66 2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
T 67
ba66cd 68 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 69
T 70 3) Install apache, PHP5 and phpmyadmin (1 line!):
71
b5f091 72 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
4cb0eb 73
T 74 Then run the following to enable the Apache modules:
75
76 a2enmod suexec
77 a2enmod rewrite
30aa08 78 a2enmod ssl
9e356a 79 a2enmod actions
dab853 80 a2enmod include
4cb0eb 81
T 82 4) Install pure-ftpd and quota
83
84 apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
85
af8f1b 86 Edit the file /etc/default/pure-ftpd-common
T 87
88 vi /etc/default/pure-ftpd-common
89
4fe973 90 and change the start mode from inetd to standalone. 
T 91
3845f1 92 Edit the file /etc/inetd.conf
T 93
94 vi /etc/inetd.conf
4fe973 95
T 96 and comment out the line for the FTP service, so it looks like this:
97
98 # ftp   stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper
99
100 Then execute:
af8f1b 101
T 102 /etc/init.d/openbsd-inetd restart
103
4cb0eb 104
T 105 5) Install mydns
106
107 apt-get install mydns-mysql
108
a4262c 109 What is the hostname of the machine on which the database will run? -> localhost
T 110 What is the database name for the MyDNS database? -> mydns
d4c9b3 111 Would you like to set up the database and tables automatically? -> yes
T 112 What is the username of the MySQL administrator? -> root
113 Enter the MySQL administrator password -> yourrootsqlpassword
114 Confirm this password -> yourrootsqlpassword
115 What is the MyDNS username? -> mydns
116 What is the MyDNS user password? -> mydnspassword
117
4cb0eb 118 The mydns installer is a bit tricky, you will have to select to create a new database for mydns and use a existing mysql user, e.g. the mysql root user. This database is only to fullfill the requirements for the debian pacakge during installation and will not be used by ISPConfig later. ISPConfig will automatically change the mydns configuration files to use the ISPConfig database.
T 119
120
121 6) Install vlogger and webalizer
122
123 apt-get install vlogger webalizer
124
0dd849 125 7) Install Jailkit (optional, only needed if you want to use chrroting for SSH users)
4cb0eb 126
55411a 127 apt-get install build-essential autoconf automake1.9 libtool flex bison debhelper
0dd849 128 cd /tmp
55411a 129 wget http://olivier.sessink.nl/jailkit/jailkit-2.7.tar.gz
M 130 tar xvfz jailkit-2.7.tar.gz
131 cd jailkit-2.7
132 ./debian/rules binary
133 cd ..
134 dpkg -i jailkit_2.7-1_i386.deb
135 rm -rf jailkit-2.7*
0dd849 136
476a60 137 8) Install fail2ban (optional but recomended, because the monitor tries to show the log)
V 138 More info at: http://www.howtoforge.com/fail2ban_debian_etch
0dd849 139
476a60 140 apt-get install fail2ban
V 141
142
143 9) Install ISPConfig 3
4cb0eb 144
T 145 There are two possile scenarios, but not both:
476a60 146 9.1) Install the latest released version 
V 147 9.2) Install directly from SVN
4cb0eb 148
476a60 149 9.1) Installation of last version from tar.gz
4cb0eb 150
T 151   cd /tmp
2ce158 152   wget http://www.ispconfig.org/downloads/ISPConfig-3.0.0.9-rc2.tar.gz
T 153   tar xvfz ISPConfig-3.0.0.9-rc2.tar.gz
3fac98 154   cd ispconfig3_install/install/
4cb0eb 155
476a60 156 9.2) Installation from SVN
4cb0eb 157
T 158   apt-get install subversion
159   cd /tmp
160   svn export svn://svn.ispconfig.org/ispconfig3/trunk/
161   cd trunk/install
162
163
476a60 164 9.1+9.2) Now proceed with the ISPConfig installation.
4cb0eb 165
T 166 Now start the installation process by executing:
167
168 php -q install.php
169
6aac1a 170 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!):
4cb0eb 171
T 172 http://192.168.0.100:8080/
173
174 the default login is:
175
176 user: admin
177 password: admin
178
179 In case you get a permission denied error from apache, please restart the apache webserver process.
ba66cd 180
3845f1 181 Optional:
T 182
490039 183 Install a webbased Email Client
3845f1 184
T 185 apt-get install squirrelmail
186 ln -s /usr/share/squirrelmail/ /var/www/webmail
187
188 Access squirrelmail:
189
190 http://192.168.0.100/webmail
191
192
193 To configure squirrelmail, run:
194
195 /usr/sbin/squirrelmail-configure
196
ba66cd 197 ----------------------------------------------------------------------------------------------------------
T 198
199 Hints:
200
201 debian 4.0 under openvz:
202
8a6a58 203 VPSID=101
ba66cd 204 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 205 do
206   vzctl set $VPSID --capability ${CAP}:on --save
207 done
46bf55 208
14716c 209 ----------------------------------------------------------------------------------------------------------
F 210
211 Optional packages recommended:
212
213 denyhosts - a utility to help sys admins thwart ssh crackers
6aac1a 214 rsync - fast remote file copy program (for backup)