Ubuntu 6.06 LTS ISP Server Setup with DTC
Install of Ubuntu 6.06 LTS Server with the DTC control panel to provide a secure virtual hosting platform for Email, Webmail Anti-spam and Anti-virus with usage statistics.
This system uses the LAMP install of Ubuntu and Domain Technologies control panel.
Remote access with ssh
Firewall security with Shorelines Shorewall
DNS Sever: Bind9
FTP server: Pureftp
Mail: Postfix, Courier POP(s), IMAP(s)
Web mail with Squirrelmail
Mailing lists management with mlmmj
Anti virus and Spam controls with Spam Assassin, Clam AV,SPF, Amavis
Web statistics with Webalizer and awstats
Security certificates from CaCerts
The control panel also features a package installer for 'one click' application deployment.
For the future, the control panel supports virtualisation with xen.
I can be contacted by email at kdavies at syntosdotltddotuk or from my website www.syntos.ltd.uk.
Enjoy
Kevin
Install the Ubuntu LAMP server.
Reconfigure eth0 for a static ip address.
In this example I used 192.168.1.15 as the server ip.
Now for some configuration changes as root.
sudo -i
vi /etc/network/interfaces
#This file describes the network interfaces available on your system
#and how to activate them. For more information, see interfaces(5).
#The loopback network interface
auto lo
iface lo inet loopback
#The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.15
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
Turn off IPv6
echo "alias net-pf-10 off" > /etc/modprobe.d/bad_list
reload the network settings
/etc/init.d/networking restart
edit the /etc/hosts file to reflect the new ip.
vi /etc/hosts
127.0.0.1 localhost
192.168.1.15 myhostname.home.net myhostname
#The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
A reboot may be desirable at this stage.
Update your system
Check /etc/apt/sources.list to ensure repositories are enabled and remove cdrom from sources.list
vi /etc/apt/sources.list
apt-get update
apt-get upgrade
Remote access with ssh
apt-get install ssh
use ssh to connect to your server.
ssh [email protected]
To log into the admin account on the server without having to enter a password each time, populate the authorized_keys file on the server
ssh-copy-id -i ~/.ssh/id_dsa.pub [email protected]
You can now logon to the server.
ssh [email protected]
Start a root session
sudo -i
Remove some unwanted software
apt-get remove pppoeconf ppp pppconfig
Now to get some software
apt-get install screen defoma fontconfig gawk fileutils unrar-free zip unzip libzzip-0-12 mhonarc fakeroot chrootuid patch ucf openntpd ncftp
apt-get install php5 php5-cli php5-cgi php5-curl php5-gd php5-imap php5-mcrypt php5-mhash php5-pspell php5-recode php5-snmp php5-xmlrpc php5-xsl php-pear php-net-smtp php-net-socket php-xml-parser
When asked about libclient answer no. we want to use maildirs.
apt-get install bind9 bindgraph
apt-get install rrdtool rrdcollect mrtg-rrd librrd2 mrtg libgd-tools mrtg-contrib
Answer no to MRTG user only.
edit mrtg.cfg to reflect your web work directory
vi /etc/mrtg.cfg
apt-get install libmysqlclient12 libdigest-hmac-perl libdigest-sha1-perl libhtml-parser-perl libhtml-tagset-perl libltdl3 liburi-perl libnet-ip-perl libnet-dns-perl libnet-cidr-lite-perl libmail-spf-query-perl
apt-get install libsocket6-perl
needed for mysql authentication
apt-get install libpam-mysql libnss-mysql
apt-get install postfix postfix-mysql courier-base courier-pop courier-imap courier-authdaemon courier-maildrop courier-authmysql courier-ssl courier-imap-ssl courier-pop-ssl sasl2-bin libsasl2 libsasl2-module
rm /var/spool/postfix/var/run/saslauthd/
ln -s /var/run/saslauthd /var/spool/postfix/var/run
Answer yes for web based configuration files.
Chose Internet site
apt-get install spamassassin spamc
apt-get install clamav-base clamav-daemon php5-clamavlib clamav clamav-freshclam
apt-get install phpmyadmin webalizer awstats squirrelmail sqwebmail amavisd-new amavisd-new-milter
Had some problems with ftp-server, this worked.
aptitude -t ftp-server install pure-ftpd pure-ftpd-common pure-ftpd-mysql
pear install Crypt_CBC Auth_SASL
Some setting up
ln -s /usr/share/php/PEAR /usr/share/pear
ln -s /var/log /etc/apache2/logs
touch /etc/apache2/logs/mod_log_sql-preserve
chown nobody:nogroup /etc/apache2/logs/mod_log_sql-preserve
Set up root user password for MySQL
mysqladmin password mysqlrootpassword
PHP settings
Edit php.ini files.
vi /etc/php5/apache2/php.ini
max_execution_time = 300
memory_limit = 32M
upload_max_filesize = 6M
extension=mysql.so
extension=mysqli.so
then copy to the cgi and cli directories
cp /etc/php5/apache2/php.ini /etc/php5/cgi
cp /etc/php5/apache2/php.ini /etc/php5/cli
Apache configuration
copy the cgi-bin alias from default site to apache2.conf
vi /etc/apache2/apache2.conf
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Restart Apache webserver
apache2ctl restart
Add the dtc repository to /etc/apt/sources.list
echo deb ftp://ftp.gplhost.com/debian stable main /etc/apt/sources.list
Update apt
apt-get update
apt-get install mlmmj sbox-dtc libapache2-mod-log-sql-mysql libapache2-mod-log-sql libapache2-mod-log-sql-ssl
Install DTC control panel
For the standard release:
apt-get dtc
For the latest version from cvs:
apt-get install cvs
cvs -d :pserver:[email protected]:/var/lib/cvs login
Password is anoncvs
cvs -d :pserver:[email protected]:/var/lib/cvs checkout dtc
cvs -d :pserver:[email protected]:/var/lib/cvs logout
Now to make DTC package
cd dtc/bin
./makeDebian
Next install the control panel
dpkg -i dtc_0.21.0-0_all.deb
To remove dtc
dpkg -r dtc
To reconfigure dtc
dpkg-reconfigure dtc
Install some traffic loggers
apt-get install mysqmail-postfix-logger mysqmail-courier-logger mysqmail-pure-ftpd-logger
Firewall configuration with Shorewall
apt-get install shorewall
To get phpmyadmin to work I had to edit /etc/phpmyadmin/blowfish_secret.inc.php and add it to /usr/share/phpmyadmin/config.inc.php
Using the control panel
Browse to http://yourdtcdomain.com/dtcadmin
Log in
Select DTC general configuration
Set Use SSL to yes
Using DTC
Set up mail
Select Users Administration ==>dtcdomain ==>Mailboxes
In the login box enter postmaster
Enter a password
for the postmaster username
In the Catch-all dropdown box select postmaster
Select ok
Continue to add emails.
To change account settings select
Admin editor or
Domain config
Adding a database
Select Client interface ==> database
First create a database username with a password
Select create
Create your database with username ==> create