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