Skip to content

Commit 0f2bb17

Browse files
committed
- Improved Fedora installer.
- Added Installation instructions for Fedora 12 - Added Dovecot support for fedora 12
1 parent 8f898a3 commit 0f2bb17

File tree

7 files changed

+1700
-10
lines changed

7 files changed

+1700
-10
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
2+
Installation
3+
-----------
4+
5+
It is recommended to use a clean (fresh) Fedora install. Then follow the steps below to setup your server with ISPConfig 3:
6+
7+
Installation of some basic requirements:
8+
9+
// rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
10+
yum update
11+
// yum groupinstall 'Development Tools'
12+
// yum groupinstall 'Development Libraries'
13+
14+
You should disable selinux now, as some programs will not start when selinux is enabled:
15+
16+
vi /etc/selinux/config
17+
18+
and set:
19+
20+
SELINUX=disabled
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 phpMyAdmin getmail postfix dovecot dovecot-mysql wget
28+
29+
chkconfig --levels 235 mysqld on
30+
/etc/init.d/mysqld start
31+
32+
chkconfig --levels 235 httpd on
33+
/etc/init.d/httpd start
34+
35+
chkconfig --levels 235 dovecot on
36+
/etc/init.d/dovecot start
37+
38+
chkconfig --levels 235 sendmail off
39+
chkconfig --levels 235 postfix on
40+
/etc/init.d/sendmail stop
41+
/etc/init.d/postfix start
42+
/etc/init.d/saslauthd start
43+
44+
45+
Set the mysql database password:
46+
47+
/usr/bin/mysql_secure_installation
48+
49+
50+
2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
51+
52+
yum install amavisd-new spamassassin clamav clamav-data clamav-server clamav-update unzip bzip2 unrar
53+
54+
chkconfig --levels 235 amavisd on
55+
chkconfig --levels 235 clamd.amavisd on
56+
/usr/bin/freshclam
57+
/etc/init.d/amavisd start
58+
/etc/init.d/clamd.amavisd start
59+
60+
3) Install apache, PHP5 and phpmyadmin (1 line!):
61+
62+
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
63+
64+
disable php mapserver module as it causes errors on cli:
65+
66+
vi /etc/php.d/mapserver.ini
67+
68+
and add ; in front of the line extension=php_mapscript.so
69+
70+
; extension=php_mapscript.so
71+
72+
4) Install pure-ftpd and quota
73+
74+
yum install pure-ftpd quota
75+
76+
chkconfig --levels 235 pure-ftpd on
77+
78+
5) Install bind dns server
79+
80+
yum install bind bind-utils
81+
82+
chkconfig --levels 235 named on
83+
84+
6) Install vlogger dependencies and webalizer
85+
86+
yum install webalizer perl-DateTime-Format-HTTP perl-DateTime-Format-Builder
87+
88+
6.5) Install jailkit
89+
90+
yum install gcc
91+
92+
cd /tmp
93+
wget http://olivier.sessink.nl/jailkit/jailkit-2.11.tar.gz
94+
tar xvfz jailkit-2.11.tar.gz
95+
cd jailkit-2.11
96+
./configure
97+
make
98+
make install
99+
rm -rf jailkit-2.11*
100+
101+
6.6) Install fail2ban
102+
103+
yum install fail2ban
104+
105+
7) Configure the firewall
106+
107+
Now you should switch off the firewall by running:
108+
109+
system-config-firewall-tui
110+
111+
ISPConfig comes with a iptables bsed firewall script that can be managed from within the ispconfig interface.
112+
113+
114+
8) Install ISPConfig 3
115+
116+
cd /tmp
117+
wget http://www.ispconfig.org/downloads/ISPConfig-3.0.2.tar.gz
118+
tar xvfz ISPConfig-3.0.2.tar.gz
119+
cd ispconfig3_install/install/
120+
121+
Now start the installation process by executing:
122+
123+
php -q install.php
124+
125+
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!):
126+
127+
http://192.168.0.100:8080/
128+
129+
the default login is:
130+
131+
user: admin
132+
password: admin
133+
134+
In case you get a permission denied error from apache, please restart the apache webserver process.
135+
136+
Optional:
137+
138+
Install a webbased Email Client
139+
140+
yum install squirrelmail
141+
142+
143+
----------------------------------------------------------------------------------------------------------
144+
145+
Hints:
146+
147+
debian 4.0 under openvz:
148+
149+
VPSID=101
150+
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
151+
do
152+
vzctl set $VPSID --capability ${CAP}:on --save
153+
done
154+
155+
----------------------------------------------------------------------------------------------------------
156+
157+

docs/INSTALL_OPENSUSE_11_2.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ yast2 -i php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-f
6868

6969
rpm -i http://download.opensuse.org/repositories/server:/php/openSUSE_11.2/i586/suphp-0.7.1-3.1.i586.rpm
7070

71+
Edit the file /etc/php5/cli/php.ini
72+
73+
vi /etc/php5/cli/php.ini
74+
75+
and change:
76+
77+
error_reporting = E_ALL & ~E_DEPRECATED
78+
79+
to:
80+
81+
error_reporting = E_ALL & ~E_NOTICE
7182

7283
Then run the following to enable the Apache modules:
7384

install/dist/conf/fedora9.conf.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
//* Dovecot
128128
$conf['dovecot']['installed'] = false; // will be detected automatically during installation
129-
$conf['dovecot']['config_dir'] = '/etc/dovecot';
129+
$conf['dovecot']['config_dir'] = '/etc';
130130
$conf['dovecot']['init_script'] = 'dovecot';
131131

132132
//* SASL
@@ -161,11 +161,11 @@
161161

162162
//* BIND DNS Server
163163
$conf['bind']['installed'] = false; // will be detected automatically during installation
164-
$conf['bind']['bind_user'] = 'root';
165-
$conf['bind']['bind_group'] = 'bind';
166-
$conf['bind']['bind_zonefiles_dir'] = '/etc/bind';
167-
$conf['bind']['named_conf_path'] = '/etc/bind/named.conf';
168-
$conf['bind']['named_conf_local_path'] = '/etc/bind/named.conf.local';
164+
$conf['bind']['bind_user'] = 'named';
165+
$conf['bind']['bind_group'] = 'named';
166+
$conf['bind']['bind_zonefiles_dir'] = '/var/named';
167+
$conf['bind']['named_conf_path'] = '/etc/named.conf';
168+
$conf['bind']['named_conf_local_path'] = '/etc/named.conf.local';
169169
$conf['bind']['init_script'] = 'named';
170170

171171
//* Jailkit

install/dist/lib/fedora.lib.php

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,74 @@ public function configure_courier()
270270
wf($configfile, $content);
271271
}
272272

273+
public function configure_dovecot()
274+
{
275+
global $conf;
276+
277+
$config_dir = $conf['dovecot']['config_dir'];
278+
279+
//* Configure master.cf and add a line for deliver
280+
if(is_file($config_dir.'/master.cf')){
281+
copy($config_dir.'/master.cf', $config_dir.'/master.cf~2');
282+
}
283+
if(is_file($config_dir.'/master.cf~')){
284+
exec('chmod 400 '.$config_dir.'/master.cf~2');
285+
}
286+
$content = rf($conf["postfix"]["config_dir"].'/master.cf');
287+
// Only add the content if we had not addded it before
288+
if(!stristr($content,"dovecot/deliver")) {
289+
$deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
290+
af($conf["postfix"]["config_dir"].'/master.cf',$deliver_content);
291+
}
292+
unset($content);
293+
unset($deliver_content);
294+
295+
296+
//* Reconfigure postfix to use dovecot authentication
297+
// Adding the amavisd commands to the postfix configuration
298+
$postconf_commands = array (
299+
'dovecot_destination_recipient_limit = 1',
300+
'virtual_transport = dovecot',
301+
'smtpd_sasl_type = dovecot',
302+
'smtpd_sasl_path = private/auth',
303+
'receive_override_options = no_address_mappings'
304+
);
305+
306+
// Make a backup copy of the main.cf file
307+
copy($conf["postfix"]["config_dir"].'/main.cf',$conf["postfix"]["config_dir"].'/main.cf~3');
308+
309+
// Executing the postconf commands
310+
foreach($postconf_commands as $cmd) {
311+
$command = "postconf -e '$cmd'";
312+
caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
313+
}
314+
315+
//* copy dovecot.conf
316+
$configfile = 'dovecot.conf';
317+
if(is_file("$config_dir/$configfile")){
318+
copy("$config_dir/$configfile", "$config_dir/$configfile~");
319+
}
320+
copy('tpl/fedora_dovecot.conf.master',"$config_dir/$configfile");
321+
322+
//* dovecot-sql.conf
323+
$configfile = 'dovecot-sql.conf';
324+
if(is_file("$config_dir/$configfile")){
325+
copy("$config_dir/$configfile", "$config_dir/$configfile~");
326+
exec("chmod 400 $config_dir/$configfile~");
327+
}
328+
329+
$content = rf("tpl/fedora_dovecot-sql.conf.master");
330+
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
331+
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
332+
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
333+
$content = str_replace('{mysql_server_host}',$conf['mysql']['host'],$content);
334+
wf("$config_dir/$configfile", $content);
335+
336+
exec("chmod 600 $config_dir/$configfile");
337+
exec("chown root:root $config_dir/$configfile");
338+
339+
}
340+
273341
public function configure_amavis() {
274342
global $conf;
275343

@@ -406,6 +474,14 @@ public function configure_mydns()
406474

407475
}
408476

477+
public function configure_bind() {
478+
global $conf;
479+
480+
// add the include line at the end of named.conf.
481+
replaceLine('/etc/named.conf','include "/etc/named.conf.local";','include "/etc/named.conf.local";',0,1);
482+
483+
}
484+
409485
public function configure_apache()
410486
{
411487
global $conf;

install/tpl/fedora_amavisd_conf.master

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ $policy_bank{'AM.PDP-SOCK'} = {
9191
};
9292

9393
$sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level
94-
$sa_tag2_level_deflt = 6.2; # add 'spam detected' headers at that level
95-
$sa_kill_level_deflt = 6.9; # triggers spam evasive actions (e.g. blocks mail)
96-
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
94+
$sa_tag2_level_deflt = 20; # add 'spam detected' headers at that level
95+
$sa_kill_level_deflt = 100; # triggers spam evasive actions (e.g. blocks mail)
96+
$sa_dsn_cutoff_level = 100; # spam level beyond which a DSN is not sent
9797
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
9898
$penpals_bonus_score = 8; # (no effect without a @storage_sql_dsn database)
9999
$penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on hi spam
@@ -783,7 +783,7 @@ $spam_admin = undef;
783783
$DO_SYSLOG = 1;
784784
$LOGFILE = "/var/log/amavis.log"; # (defaults to empty, no log)
785785

786-
$log_level = 5; # (defaults to 0)
786+
$log_level = 0; # (defaults to 0)
787787

788788

789789
1; # insure a defined return

0 commit comments

Comments
 (0)