Install ISPConfig on Debian Quickly

By | February 8, 2013

ispconfig-logoI have a client who routinely deploys cloud servers and they like ISPConfig installed to serve as a hosting control panel. ISPConfig is great for your average customer to manage their server or even for a small hosting company to manage their servers. It is a cost effective alternative to commercial solutions like Plesk and CPanel.

Getting ISPConfig installed can be daunting. The documentation points you to one of 5 different 6-10 page tutorials on setting up your server for ISPConfig.

Since I am deploying these regularly, I’ve scripted out the full install, hopefully this will be useful to someone out there.

I typically start out with this script, although not entirely required. Just to get all of the PHP packages installed how I like.

Then I run this script to actually setup ISPConfig. There are a handful of pauses in here where the script tells you what to do when it comes to editing cron jobs and config files. Hopefully it is clear. You can also grab this script here: http://n5net.com/debian/ispconfig.sh
OR

wget http://n5net.com/debian/ispconfig.sh

Here is the entire script:

echo "Install ISPConfig Script"
apt-get install ntp ntpdate
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d sudo
clear
read -p "Fix networking in mysql cfg"
nano /etc/mysql/my.cnf
/etc/init.d/mysql restart
apt-get 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
/etc/init.d/spamassassin stop
update-rc.d -f spamassassin remove
clear
read -p "Select Apache2 and No when asked"
apt-get 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 libruby libapache2-mod-ruby
a2enmod suexec rewrite ssl actions include
a2enmod dav_fs dav auth_digest
/etc/init.d/apache2 restart
apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
clear
read -p "standalone and virtual chroot = true"
nano /etc/default/pure-ftpd-common
echo 1 > /etc/pure-ftpd/conf/TLS
mkdir -p /etc/ssl/private/
openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
chmod 600 /etc/ssl/private/pure-ftpd.pem
/etc/init.d/pure-ftpd-mysql restart
clear
read -p "usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 to /"
nano /etc/fstab
mount -o remount /
quotacheck -avugm
quotaon -avug
apt-get install bind9 dnsutils
apt-get install vlogger webalizer awstats geoip-database
clear
read -p "Comment out all cron jobs"
nano /etc/cron.d/awstats
apt-get install build-essential autoconf automake1.9 libtool flex bison debhelper
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
tar xvfz jailkit-2.14.tar.gz
cd jailkit-2.14
./debian/rules binary
cd ..
dpkg -i jailkit_2.14-1_*.deb
rm -rf jailkit-2.14*
apt-get install fail2ban
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/
php -q install.php

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *