Marius Cramer
2013-10-14 d9bcf68e395d6156645a7974b1a992aa6e6c00aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
 
 
WARNING: Support for CentOS is experimental only. For production systems better use Debian or Ubuntu.
 
 
Installation
-----------
 
It is recommended to use a clean (fresh) CentOS 5.2 install. Then follow the steps below to setup your server with ISPConfig 3:
 
Installation of some basic requirements:
 
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum update
yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'
 
You should disable selinux now, as some programs will not start when selinux is enabled:
 
system-config-securitylevel-tui
 
then reboot the server.
 
 
1) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin with the following command line (on one line!):
 
yum install ntp httpd mysql-server php php-mysql php-mbstring rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel phpMyAdmin pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel postfix
 
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
 
cd /tmp
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum update
 
yum install getmail
 
useradd -m -s /bin/bash compileuser
passwd compileuser
 
visudo
 
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
compileuser   ALL=(ALL)       ALL
 
 
su compileuser
 
mkdir $HOME/rpm
mkdir $HOME/rpm/SOURCES
mkdir $HOME/rpm/SPECS
mkdir $HOME/rpm/BUILD
mkdir $HOME/rpm/SRPMS
mkdir $HOME/rpm/RPMS
mkdir $HOME/rpm/RPMS/i386
mkdir $HOME/rpm/RPMS/x86_64
 
echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
 
 
wget http://prdownloads.sourceforge.net/courier/courier-authlib-0.61.0.tar.bz2
wget http://prdownloads.sourceforge.net/courier/courier-imap-4.4.1.tar.bz2
wget http://prdownloads.sourceforge.net/courier/maildrop-2.0.4.tar.bz2
 
sudo rpmbuild -ta courier-authlib-0.61.0.tar.bz2
 
sudo rpm -ivh /home/compileuser/rpm/RPMS/i386/courier-authlib-0.61.0-1.i386.rpm
sudo rpm -ivh /home/compileuser/rpm/RPMS/i386/courier-authlib-mysql-0.61.0-1.i386.rpm
sudo rpm -ivh /home/compileuser/rpm/RPMS/i386/courier-authlib-devel-0.61.0-1.i386.rpm
 
rpmbuild -ta courier-imap-4.4.1.tar.bz2
 
sudo rpm -ivh /home/compileuser/rpm/RPMS/i386/courier-imap-4.4.1-1.i386.rpm
 
sudo rpmbuild -ta maildrop-2.0.4.tar.bz2
 
sudo rpm -ivh /home/compileuser/rpm/RPMS/i386/maildrop-2.0.4-1.i386.rpm
 
exit
 
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
 
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
 
chkconfig --levels 235 courier-authlib on
/etc/init.d/courier-authlib start
 
chkconfig --levels 235 sendmail off
chkconfig --levels 235 postfix on
chkconfig --levels 235 saslauthd on
/etc/init.d/sendmail stop
/etc/init.d/postfix start
/etc/init.d/saslauthd start
 
chkconfig --levels 235 courier-imap on
/etc/init.d/courier-authlib restart
/etc/init.d/courier-imap restart
 
 
Set the mysql database password:
 
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h ispconfig.local -u root password yourrootsqlpassword
 
 
2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
 
yum install amavisd-new spamassassin clamav clamd clamav-data clamav-server clamav-update unzip bzip2 unrar
 
chkconfig --levels 235 amavisd on
chkconfig --levels 235 clamd on
/usr/bin/freshclam
/etc/init.d/amavisd start
/etc/init.d/clamd start
 
If you use the amavisd from rpmforge and not the one from centos, you will have to do these additional steps:
 
add the following line in /etc/sysconfig/amavisd:
 
CONFIG_FILE="/etc/amavisd/amavisd.conf
 
run:
 
mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
chown amavis /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
yum install perl-DBD-mysql
 
 
3) Install apache, PHP5 and phpmyadmin (1 line!):
 
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel phpmyadmin
 
 
4) Install pure-ftpd and quota
 
cd /tmp
wget http://centos.karan.org/el5/extras/testing/i386/RPMS/pure-ftpd-1.0.21-15.el5.kb.i386.rpm
rpm -i pure-ftpd-1.0.21-15.el5.kb.i386.rpm
 
yum install quota
 
chkconfig --levels 235 pure-ftpd on
/etc/init.d/pure-ftpd start
 
5) Install mydns
 
wget http://mydns.bboy.net/download/mydns-mysql-1.1.0-1.i386.rpm
rpm -ivh mydns-mysql-1.1.0-1.i386.rpm
 
chkconfig --levels 235 mydns on
 
6) Install vlogger and webalizer
 
yum install webalizer perl-DateTime-Format-HTTP perl-DateTime-Format-Builder
 
cd /tmp
wget http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz
tar xvfz vlogger-1.3.tar.gz
mv vlogger-1.3/vlogger /usr/sbin/
rm -rf vlogger*
 
Edit the file /etc/sudoers
 
vi /etc/sudoers
 
and change the line:
 
Defaults    requiretty
 
to:
 
# Defaults    requiretty
 
7) Install ISPConfig 3
 
Disable the firewall:
 
system-config-securitylevel-tui
 
There are two possile scenarios, but not both:
7.1) Install the latest released version 
7.2) Install directly from SVN
 
7.1) Installation of beta 3 from tar.gz
 
  cd /tmp
  wget http://www.ispconfig.org/downloads/ISPConfig-3.0.0.9-rc2.tar.gz
  tar xvfz ISPConfig-3.0.0.9-rc2.tar.gz
  cd ispconfig3_install/install/
 
7.2) Installation from SVN
 
  yum install subversion
  cd /tmp
  svn export svn://svn.ispconfig.org/ispconfig3/trunk/
  cd trunk/install
 
 
7.1+7.2) Now proceed with the ISPConfig installation.
 
Now start the installation process by executing:
 
php -q install.php
 
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!):
 
http://192.168.0.100:8080/
 
the default login is:
 
user: admin
password: admin
 
In case you get a permission denied error from apache, please restart the apache webserver process.
 
Optional:
 
Install a webbased Email Client
 
yum install squirrelmail
 
 
----------------------------------------------------------------------------------------------------------
 
Hints:
 
debian 4.0 under openvz:
 
VPSID=101
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
do
  vzctl set $VPSID --capability ${CAP}:on --save
done
 
----------------------------------------------------------------------------------------------------------
 
Installing Jailkit:
 
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.5.tar.gz
tar xvfz jailkit-2.5.tar.gz
cd jailkit-2.5
./configure
make
make install
rm -rf jailkit-2.5*