Marius Cramer
2013-10-14 d9bcf68e395d6156645a7974b1a992aa6e6c00aa
commit | author | age
2aa041 1
T 2
3 Installation
4 -----------
5
6 It is recommended to use a clean (fresh) CentOS 5.4 install. Then follow the steps below to setup your server with ISPConfig 3:
7
8 Installation of some basic requirements:
9
10 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
11
12 enable the contrib and centosplus repositories.
13
14 vi /etc/yum.repos.d/CentOS-Base.repo
15
16 1. Edit the file /etc/yum.repos.d/CentOS-Base.repo and edit the lines below.
17
18 [base]
19 exclude=postfix
20
21 [update]
22 exclude=postfix
23
24 [centosplus]
25 enabled=1
26 includepkgs=postfix
27
28 [contrib]
29 enabled=1
30
31 rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
32
33 cd /tmp
34 wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
35 rpm -i rpmforge-release-0.5.1-1.el5.rf.i386.rpm
36 yum update
37
38 You should disable selinux now, as some programs will not start when selinux is enabled:
39
40 system-config-securitylevel-tui
41
42 then reboot the server.
43
44 Then remove the postfix without mysql support
45
46 yum remove postfix
47
48 1) Install Postfix fron centosplus with mysql support, Dovecot, MySQL, phpMyAdmin with the following command line (on one line!):
49
50 yum install ntp httpd mysql-server php php-mysql php-mbstring phpMyAdmin postfix getmail
51
52 For 32Bit systems:
53
722e8e 54 rpm -i http://dl.atrpms.net/all/dovecot-1.2.11-3_108.el5.i386.rpm
2aa041 55 rpm -i http://dl.atrpms.net/all/dovecot-sieve-0.1.15-4.el5.i386.rpm
T 56
57 For 64Bit Systems:
58
722e8e 59 rpm -ivh http://dl.atrpms.net/all/dovecot-1.2.11-3_108.el5.x86_64.rpm
T 60 rpm -ivh http://dl.atrpms.net/all/dovecot-sieve-0.1.15-4.el5.x86_64.rpm
2aa041 61
T 62
63 chkconfig --levels 235 mysqld on
64 /etc/init.d/mysqld start
65
66 chkconfig --levels 235 httpd on
67 /etc/init.d/httpd start
68
69 chkconfig --levels 235 dovecot on
70 /etc/init.d/dovecot start
71
72 chkconfig --levels 235 sendmail off
73 chkconfig --levels 235 postfix on
74 /etc/init.d/sendmail stop
75 /etc/init.d/postfix start
76
77
78 Set the mysql database password:
79
80 /usr/bin/mysql_secure_installation
81
82
83 2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
84
85 yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar
86
87 sa-update
88 chkconfig --levels 235 amavisd on
89 chkconfig --levels 235 clamd on
90 /usr/bin/freshclam
91 /etc/init.d/amavisd start
92 /etc/init.d/clamd start
93
94 If you use the amavisd from rpmforge (as we do in this guide) and not the one from centos, you will have to do these additional steps:
95
96 add the following line in /etc/sysconfig/amavisd:
97
98 CONFIG_FILE="/etc/amavisd/amavisd.conf
99
100 run:
101
102 mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
103 chown amavis /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
104 ln -s /var/run/clamav/clamd.sock /var/spool/amavisd/clamd.sock
105 yum install perl-DBD-mysql
106
107
108 3) Install apache, PHP5 and phpmyadmin (1 line!):
109
110 yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator  php-mbstring php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel phpmyadmin
111
112
113 4) Install pure-ftpd and quota
114
115 yum install pure-ftpd quota
116
117 chkconfig --levels 235 pure-ftpd on
118 /etc/init.d/pure-ftpd start
119
120 5) Install bind dns server
121
122 yum install bind-chroot
123
124 chmod 755 /var/named/
125 chmod 775 /var/named/chroot/
126 chmod 775 /var/named/chroot/var/
127 chmod 775 /var/named/chroot/var/named/
128 chmod 775 /var/named/chroot/var/run/
129 chmod 777 /var/named/chroot/var/run/named/
130 cd /var/named/chroot/var/named/
131 ln -s ../../ chroot
132 cp /usr/share/doc/bind-9.3.6/sample/var/named/named.local /var/named/chroot/var/named/named.local
133 cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
134 touch /var/named/chroot/etc/named.conf
21c959 135 touch /var/named/chroot/etc/named.conf.local
2aa041 136
T 137 vi /var/named/chroot/etc/named.conf
138
139 --------------------------------------------------------------------------------------------------
140 //
141 // named.conf
142 //
143 // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
144 // server as a caching only nameserver (as a localhost DNS resolver only).
145 //
146 // See /usr/share/doc/bind*/sample/ for example named configuration files.
147 //
148
149 options {
150         listen-on port 53 { 127.0.0.1; };
151         listen-on-v6 port 53 { ::1; };
152         directory       "/var/named/chroot/var/named";
153         dump-file       "/var/named/chroot/var/named/data/cache_dump.db";
154         statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
155         memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
156         allow-query     { localhost; };
157         recursion yes;
158 };
159
160 logging {
161         channel default_debug {
162                 file "data/named.run";
163                 severity dynamic;
164         };
165 };
166
167 zone "." IN {
168         type hint;
169         file "named.root";
170 };
171
172 include "/var/named/chroot/etc/named.conf.local";
173 --------------------------------------------------------------------------------------------------
174
175 chkconfig --levels 235 named on
176 /etc/init.d/named start
177
178 6) Install vlogger dependencies and webalizer
179
180 yum install webalizer perl-DateTime-Format-HTTP perl-DateTime-Format-Builder
181
182 Installing Jailkit:
183
184 yum install gcc
185 cd /tmp
186 wget http://olivier.sessink.nl/jailkit/jailkit-2.11.tar.gz
187 tar xvfz jailkit-2.11.tar.gz
188 cd jailkit-2.11
189 ./configure
190 make
191 make install
192 rm -rf jailkit-2.11*
193
9f56bd 194 Edit the file /etc/sudoers
T 195
196 vi /etc/sudoers
197
198 and change the line:
199
200 Defaults    requiretty
201
202 to:
203
204 # Defaults    requiretty
205
2aa041 206
T 207 7) Install ISPConfig 3
208
209
210 cd /tmp
211 wget http://www.ispconfig.org/downloads/ISPConfig-3.0.2.tar.gz
212 tar xvfz ISPConfig-3.0.2.tar.gz
213 cd ispconfig3_install/install/
214
215 Now start the installation process by executing:
216
217 php -q install.php
218
6aac1a 219 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!):
2aa041 220
T 221 http://192.168.0.100:8080/
222
223 the default login is:
224
225 user: admin
226 password: admin
227
228 In case you get a permission denied error from apache, please restart the apache webserver process.
229
230 Optional:
231
232 Install a webbased Email Client
233
234 yum install squirrelmail
235
236
237