Skip to content

Commit 3a94180

Browse files
committed
- Added install instructions for debian 5.0 with dovecot and bind.
- Improved debian installer.
1 parent 2aa041a commit 3a94180

File tree

2 files changed

+271
-0
lines changed

2 files changed

+271
-0
lines changed
Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
Installation
2+
-----------
3+
4+
# It is recommended to use a clean (fresh) Debian lenny install where you just selected "Standard System" as the package selection during
5+
# setup. Then follow the steps below to setup your server with ISPConfig 3. In this guide "vi" is used as texteditor, but you ofcourse
6+
# you can use whatever you prefer. You should be root for doing all of this.
7+
8+
9+
# Check we have Fully Qualified Domain Name
10+
11+
/bin/hostname
12+
13+
# it should return something like "ispconfig.example.com"
14+
# if not, then we assign a hostname (for example ispconfig):
15+
16+
echo ispconfig.example.com > /etc/hostname
17+
18+
vi /etc/hosts
19+
20+
# and add lines similar but appropriate:
21+
22+
127.0.0.1 localhost.localdomain localhost
23+
192.168.0.100 ispconfig.example.com ispconfig
24+
25+
# Run:
26+
27+
/etc/init.d/hostname.sh
28+
29+
# Some optional choices
30+
31+
opt0.1) Optionally install SSH-server to get remote shell
32+
33+
apt-get install ssh openssh-server
34+
35+
opt0.2) Optionally if you are not running in virtual machine you can set server clocksync via NTP. Virtual quests get this from the host.
36+
37+
apt-get -y install ntp ntpdate
38+
39+
opt0.3) Optionally if you want vi editor improvement
40+
41+
apt-get -y install vim-nox
42+
43+
44+
# Next is the real deal
45+
46+
1) Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils with the following command line (on one line!):
47+
48+
apt-get -y install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d
49+
50+
# Answer the questions from the package manager as follows.
51+
52+
Create directories for web-based administration ? <-- No
53+
General type of configuration? <-- Internet site
54+
Mail name? <-- server1.mydomain.tld
55+
SSL certificate required <-- Ok
56+
57+
# ...use your own domain name of course ;)
58+
59+
60+
61+
# Edit the file /etc/mysql/my.cnf
62+
63+
vi /etc/mysql/my.cnf
64+
65+
# and change the line:
66+
67+
bind-address = 127.0.0.1
68+
69+
to:
70+
71+
#bind-address = 127.0.0.1
72+
73+
# then restart mysql
74+
75+
/etc/init.d/mysql restart
76+
77+
2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
78+
79+
apt-get -y 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
80+
81+
82+
3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mcrypt (1 line!):
83+
84+
apt-get -y 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 apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby
85+
86+
87+
# When phpMyAdmin is asking weather to configure itself automatically, select "Apache2"
88+
89+
# Then run the following to enable the Apache modules suexec, rewrite and ssl:
90+
91+
a2enmod suexec rewrite ssl actions include
92+
93+
# restart apache before continuing
94+
95+
/etc/init.d/apache2 restart
96+
97+
98+
4) Install pure-ftpd and quota
99+
100+
apt-get -y install pure-ftpd-common pure-ftpd-mysql quota quotatool
101+
102+
# Optional: Enable TLS in pureftpd
103+
echo 1 > /etc/pure-ftpd/conf/TLS
104+
mkdir -p /etc/ssl/private/
105+
openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
106+
chmod 600 /etc/ssl/private/pure-ftpd.pem
107+
108+
109+
# Edit /etc/fstab. Mine looks like this (I added ,usrquota,grpquota to the partition with the mount point /):
110+
111+
vi /etc/fstab
112+
113+
----------------------------------------------------------------------------------------------
114+
# /etc/fstab: static file system information.
115+
#
116+
# <file system> <mount point> <type> <options> <dump> <pass>
117+
proc /proc proc defaults 0 0
118+
/dev/sda1 / ext3 errors=remount-ro,usrquota,grpquota 0 1
119+
/dev/sda5 none swap sw 0 0
120+
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
121+
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
122+
----------------------------------------------------------------------------------------------
123+
124+
# To enable quota, run these commands:
125+
126+
touch /quota.user /quota.group
127+
chmod 600 /quota.*
128+
mount -o remount /
129+
quotacheck -avugm
130+
quotaon -avug
131+
132+
133+
5) Install BIND DNS Server
134+
135+
apt-get -y install bind9 dnsutils
136+
137+
6) Install vlogger and webalizer
138+
139+
apt-get -y install vlogger webalizer
140+
141+
142+
7) Install Jailkit (optional, only needed if you want to use chrroting for SSH users)
143+
144+
apt-get -y install build-essential autoconf automake1.9 libtool flex bison debhelper
145+
cd /tmp
146+
wget http://olivier.sessink.nl/jailkit/jailkit-2.11.tar.gz
147+
tar xvfz jailkit-2.11.tar.gz
148+
cd jailkit-2.11
149+
./debian/rules binary
150+
cd ..
151+
dpkg -i jailkit_2.11-1_*.deb
152+
rm -rf jailkit-2.11*
153+
154+
8) Install fail2ban (optional but recomended, because the monitor tries to show the log)
155+
More info at: http://www.howtoforge.com/fail2ban_debian_etch
156+
157+
apt-get install fail2ban
158+
159+
9) Install ISPConfig 3
160+
161+
cd /tmp
162+
wget http://www.ispconfig.org/downloads/ISPConfig-3.0.2.tar.gz
163+
tar xvfz ISPConfig-3.0.2.tar.gz
164+
cd ispconfig3_install/install/
165+
166+
# Now start the installation process by executing:
167+
168+
php -q install.php
169+
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 nescessary. To login to the ISPConfig controlpanel, open the following URL in your browser (replace the IP to match your settings!):
171+
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.
180+
181+
182+
183+
----------------------------------------------------------------------------------------------------------
184+
Optional:
185+
186+
Install a webbased Email Client
187+
188+
apt-get install squirrelmail
189+
ln -s /usr/share/squirrelmail/ /var/www/webmail
190+
191+
Access squirrelmail:
192+
193+
http://192.168.0.100/webmail
194+
195+
196+
To configure squirrelmail, run:
197+
198+
/usr/sbin/squirrelmail-configure
199+
200+
----------------------------------------------------------------------------------------------------------
201+
202+
Hints:
203+
204+
debian 5.0 under openvz:
205+
206+
VPSID=101
207+
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
208+
do
209+
vzctl set $VPSID --capability ${CAP}:on --save
210+
done
211+
212+
----------------------------------------------------------------------------------------------------------
213+
214+
215+
Optional recommended packages:
216+
217+
denyhosts - a utility to help sys admins thwart ssh crackers
218+
rsync - fast remote file copy program (for backup)
219+
220+
-----------------------------------------------------------------------------------------------------------
221+
222+
Ispc log files rotate, for now manual add but to add in ispc installer:
223+
224+
/etc/logrotate.d/logispc3
225+
226+
/var/log/ispconfig/ispconfig.log {
227+
weekly
228+
missingok
229+
rotate 4
230+
compress
231+
delaycompress
232+
}
233+
/var/log/ispconfig/cron.log {
234+
weekly
235+
missingok
236+
rotate 4
237+
compress
238+
delaycompress
239+
}
240+
241+
242+
-----------------------------------------------------------------------------------------------------------
243+
244+
Possible errors and their solutions
245+
------------------------------------
246+
247+
pureftpd login does not work. Take a look at the syslog, if you find an error message like this:
248+
Mar 24 16:26:28 ispconfig pure-ftpd: (?@?) [ERROR] Sorry, invalid address given
249+
250+
then pureftpd is not able to resolve the hostname. Name resolving can be disabled with these commands:
251+
252+
echo 'yes' > /etc/pure-ftpd/conf/DontResolve
253+
/etc/init.d/pure-ftpd-mysql restart
254+
255+
256+
257+
258+
259+

install/lib/installer_base.lib.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,18 @@ public function configure_pureftpd()
834834
//exec('mkdir -p '.$config_dir.'/conf/ChrootEveryone');
835835
exec('echo "yes" > '.$config_dir.'/conf/ChrootEveryone');
836836
exec('echo "yes" > '.$config_dir.'/conf/BrokenClientsCompatibility');
837+
838+
if(is_file('/etc/default/pure-ftpd-common')) {
839+
replaceLine('/etc/default/pure-ftpd-common','STANDALONE_OR_INETD=inetd','STANDALONE_OR_INETD=standalone',1,0);
840+
replaceLine('/etc/default/pure-ftpd-common','VIRTUALCHROOT=false','VIRTUALCHROOT=true',1,0);
841+
}
842+
843+
if(is_file('/etc/inetd.conf')) {
844+
replaceLine('/etc/inetd.conf','ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper','#ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper',1,0);
845+
if(is_file('/etc/init.d/openbsd-inetd')) exec('/etc/init.d/openbsd-inetd restart');
846+
}
847+
848+
if(!is_file('/etc/pure-ftpd/conf/DontResolve')) exec("echo 'yes' > /etc/pure-ftpd/conf/DontResolve");
837849
}
838850

839851
public function configure_mydns()

0 commit comments

Comments
 (0)