Work in progress!
Don't use this script! It's not ready yet. Instead, use the dtc_autodeploy script found in the gplhost debian repository.
Debian Lenny quick install script
This user-contributed script aims to quickly create a DTC environment on a fresh install of Debian Lenny, keeping user configuration to a minimum.
#! /bin/bash
### Edit this section ###
export FQDN="example.com"
export MYIP=`ifconfig | cut -d : -f 2 | sed '1d; 3,100d' | cut -d ' ' -f 1`
### Don't edit this section ###
# set up hostname
echo mx.$FQDN > /etc/hostname
/etc/init.d/hostname.sh start
# set up hosts file
echo "
127.0.0.1 localhost
$MYIP mx.$FQDN mx
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
" > /etc/hosts
# don't auto-install recommended packages
echo "
APT
{
Install-Recommends \"false\";
}
" > /etc/apt/apt.conf.d/20norecommends
# set some default options
echo "
debconf debconf/priority select medium
postfix postfix/mailname select mx.$FQDN
postfix postfix/main_mailer_type select Internet Site
postfix postfix/chattr select false
postfix postfix/root_address select root
postfix postfix/destinations select mx.$FQDN, localhost.$FQDN, localhost
phpmyadmin phpmyadmin/reconfigure-webserver select apache2
mysql-server-5.0 mysql-server-5.0/need_sarge_compat select false
dtc-core dtc/conf_mysqlautoconfig select true
dtc-core dtc/conf_ipaddr select $MYIP
dtc-core dtc/main_domainname select $FQDN
dtc-core dtc/conf_use_cyrus select false
dtc-core dtc/conf_use_nated_vhosts select false
dtc-core dtc/conf_mysqldb select dtc
sbox-dtc sbox-dtc/conf_use_dtc_dtcgrp select true
pure-ftpd-common pure-ftpd/ftpwho-setuid select false
pure-ftpd-common pure-ftpd/standalone-or-inetd select standalone
pure-ftpd-common pure-ftpd/virtualchroot select false
openssh-server ssh/use_old_init_script select true
webalizer webalizer/directory select /var/www/webalizer
webalizer webalizer/dnscache select true
webalizer webalizer/doc_title select Usage statistics for $FQDN
webalizer webalizer/logfile select /var/log/apache2/access.log.1
" | debconf-set-selections
# add gplhost repo
echo deb ftp://ftp.gplhost.com/debian/ lenny main >> /etc/apt/sources.list
wget -q ftp://ftp.gplhost.com/debian/repository_key.asc -O - | apt-key add -
apt-get update
# install stuff we need
apt-get install apache2 postfix phpmyadmin spamassassin -y
# install dtc
#apt-get install dtc-postfix-courier
apt-get install dtc-core postfix-mysql mysql-server-5.0 -y
# dtc post-install
/usr/share/dtc/admin/install/install
Editing this page means accepting its license.