Step-By-Step Install Guide DTC GPL Control Panel on Linux Ubuntu 10.04 LTS Server

Document Sample
Step-By-Step Install Guide DTC GPL Control Panel on Linux Ubuntu 10.04 LTS Server
Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







Global Open Versity

Systems Integration Hands-on Labs Training Manual



Step-By-Step Install Guide DTC GPL Control Panel on

Ubuntu Linux Server

Kefa Rabah

Global Open Versity, Vancouver Canada

krabah@globalopenversity.org www.globalopenversity.org



Table of Contents Page No.



STEP-BY-STEP INSTALL GUIDE DTC GPL CONTROL PANEL ON UBUNTU LINUX

SERVER 2

Introduction 2



Part 1: Install Ubuntu 10.04 LTS 3



Part 2: Post Installation Configurations. 3

Step 1: Perform System Upgrade 3

Step 2: Modify the Hosts file 3



Part 3: Install DNS Server 5



Part 4: Pre-requisite Setup 5



Part 5: Debian Express Setup 6

Step 1: Prerequisites 6

Step 2: GPLHost Debian repository 6



Part 6: DTC Detailed Setup 8

Step 1: Run “dpkg-reconfigure debconf” 8

Step 2: Run “dpkg-reconfigure debconf” 10



Part 7-A: Installing dtc-toaster 10



Part 7-B: Alternatively, Installing dtc-core 11

Important answers to debconf 11



Part 8: Post install 30

Step 1: Run Install 30

Step 2: SquirrelMail Web Mail Access 33

Step 3: Setup our Product Lists 33

Step 4: Create New Account 34

Step 5: Server Monitoring 38



Part 9: Need More Training on Linux: 39

Ubuntu Server Administration Training 40



Part 10: Hands-on Lab Assignments 40

1

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1









Global Open Versity

Enterprise Architecture Hands-on Labs Training Manual



Step-By-Step Install Guide DTC GPL Control Panel

on Ubuntu Linux Server

By Kefa Rabah, krabah@globalopenversity.org Nov 15, 2010 GTS Institute





Introduction

In this Hands-on Labs session, we’re going to lean how to install & configure the Linux Ubuntu 10.04 LTS

(Lucid Lynx) server edition which we then use to install Domain Technologie Control Panel hosting

solution. Canonical has high hopes that Ubuntu 10.04, Lucid Lynx, will easily become the platform of

choice for anybody who intends to build and deploy large-scale infrastructure, whether you're trying to

build the next Facebook, or the next Google, or the next eBay. If you want to start on [Amazon's cloud-

platform] EC2 and migrate to your own managed private cloud, Ubuntu 10.04 is going to be the platform

for you. Lucid Lynx will be the third long-term support (LTS) release by Ubuntu. LTS releases arrive bi-

annually and are supported for three years on desktops and five years for servers of free security and

maintenance updates.



Ubuntu 10.04 LTS Server Edition: Lean, fast and powerful – Ubuntu Server delivers services reliably,

predictably and economically - and easily integrates with your existing infrastructure. It has almost 100

open-source and proprietary application providers certifying their programs on Ubuntu Server Edition.

Ubuntu 10.04 includes Alfresco, Ingres, IBM, VMware, Yahoo and Zimbra. It also includes improved

installation and management tools for Ubuntu Enterprise Cloud (UEC) and Amazon EC2.



Domain Technologie Control (DTC) is a web-based control panel aimed at providing a graphics-oriented

layout for managing commercial hosting of web servers, intended for shared web hosting servers, virtual

private servers (VPSes), and dedicated servers. Domain Technologie Control is free software released

under the GNU LGPL v2.1 license. It is fully skinnable and translated into several languages. DTC is fully

open source (LGPL). DTC is also the first web hosting control panel that has reached inclusion in major

distributions like Debian (since Lenny in 2009), Ubuntu (since 2008) and FreeBSD



Using a web GUI for the administration and accounting all hosting services, DTC can delegate the task of

creating subdomains, email, ssh, database, mailing lists, and FTP accounts to users for the domain

names they own.



Moreover, Domain Technologie Control allows the administrator to create web hosting plans that provide

e-mail and FTP accounts, domain purchasing, subdomains, SSH, and MySQL databases to the end users

under controllable quota for the web sites that these users own. DTC also maintains the automation of

billing, generates backup scripts, and monitors traffic (per user and per service) using a single system,

UID or GID. Also integrated into DTC are the support ticket system and customizable HTTP error pages.



DTC itself manages its own MySQL database to store its setup configuration, web hosting plans, and

users. It has support for many other free software: MySQL, Apache, PHP, qmail, Postfix, Courier,

2

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







Dovecot, ProFTPd, Webalizer, mod-log-sql, and more. It also connects to dtc-xen to manage and monitor

the usage of Virtual Private Servers (VPS).



Solution

In this Hands-on Labs, you will learn how to install Ubuntu 10.04 LTS server and prepare it for the

installation of DTC. You’ll also learn how to perform post-installation configuration e.g., upgrade the

system with new patches and bug fixes, configure static IP address from dynamic one, change the

computer hostname, modify hosts file, perform ping test among others. Next, you will learn how to install

DTC on Linux Ubuntu 10.04 server .Upon completion of this lab session you should have gained a

capability and expertise to install and maintain DTC which you can use to manage your ISP hosting

solutions. The entire lab training was performed on VMware. But you can also use the open source

VirtualBox from Oracle.





Part 1: Install Ubuntu 10.04 LTS



Assumptions:

1. It’s assumed that you have a good understanding of Linux operating system and its working

environment. It’s also assumed that you know how to install and configure Ubuntu Linux server, if not

go ahead and pop over to scribd.com and check out a good hands-on manual entitled “Step-By-Step

Install Guide Ubuntu 10.04 LTS (Lucid Lynx) Server” to get you started.



2. It’s also assumed that you have a good understanding of MySQL database.



3. In the next section, we’re going to perform other post-installation work like system upgrade and etc.





Part 2: Post Installation Configurations.



Step 1: Perform System Upgrade

For best practices in IT, it’s important to always perform systems upgrade after initial installation is

completed. To do this, perform the following procedures:



1. Click Application -> Accessories and the select Terminal



2. From Terminal window, issue the command "apt-get update –y". This enables the system to

get the latest patches and bug fixes.



3. You’re now down with system update. In the next section we’re going to learn how to change NIC

adapter configuration from dynamic IP address to static IP address.





Step 2: Modify the Hosts file

In this step we want to modify the hosts file to reflect our new "Fully Qualified Hostname" and IP

address.





3

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







1. To do this, from the Terminal window issue the command:



[root@mx ~]# gedit /etc/hosts



2. While here also note our hostname and IP address:



ubuntu.govholabs.com 192.168.83.40





3. Other servers are:



www.govholabs.com

ftp.govholabs.com

dtc.govholabs.com \\ also a mail server



4. It’s assumed that you know how to install Ubuntu server using static IP address, very important for

DNS server. Once you’re done with the installation then verify that your hosts file is set correctly.



5. Check out /etc/hosts to ensure that you have a correct setup, in our case, it’s as shown in Fig.1:









Fig. 1



6. Check out /etc/resolv.conf to ensure that you have a correct setup, in our case, it’s as shown in

Fig.2:









Fig. 2



7. For the final test, issue the ping command, to see if our hostname can return its own IP address:



[root@mx ~]# ping ubuntu.govholabs.com



4

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







8. We’re done with this section.





Part 3: Install DNS Server

In this section it’s assumed that you have some knowledge in installing and configuring a DNS Server on

a Linux machine, if not, then check out our excellent Hands-On Labs training manual, entitled “Using

Webmin and Bind9 to Setup DNS Server on Linux” to get you started. Here we’re going to use Webmin

and Bind9 to deploy DNS Server. However, don’t worry DTC is pretty smart as it will configure everything

that you ever wanted in a web hosting solutions.



1. To check that your DNS server is working correctly, issue the "dig" command.



2. Similarly, issue the NSLOOKUP command, to check & verify your DNS server functionality.



3. We’re done with this section





Part 4: Pre-requisite Setup

1. Ensure that you have set the hostname, correctly, if not you can issue the following command to setup

your hostname for "ubuntu.govholabs.com", as follows:



# hostname ubuntu.govholabs.com



2. Now check to ensure that you have a valid hostname entered, or amavisd-new will complain about

it and refuse to setup. Try this command, as this is the one that amavis will use:



hostname --fqdn



Note: It should return the fully qualified domain name of your "ubuntu" server that should be

something like "ubuntu.govholabs.com" (this is best option).



3. Also check that



cat /etc/hostname



returns "ubuntu.govholabs.com"



4. Now check your hostname ( /etc/hostname ), e.g.,



• hostname -d gives only govholabs.com



• hostname -s gives only Ubuntu

• hostname -f gives the ubuntu.govholabs.com



Note: if not, correct it by editing "/etc/hostname" then run "/etc/init.d/hostname.sh

start"

5

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1









Something like "ubuntu.govholabs.com" in /etc/hostname sounds to be the correct

setup (otherwise you need some more customization).



5. Finally, check that "uname -a" is returning the correct FQDN.



4. You’re done with installing and post configuration of Ubuntu server and ready to start installing DTC.





Part 5: Debian Express Setup

1. For those who want to give it a try, here is the best way to have a (fast) setup of the DTC control

panel. But first, to make it very quick for experts, here are the steps:



• Make sure you have locales installed, and at least one configured

• Check that your hostname is ubunutu.govholabs.com (unless you know what you are doing)

• Add GPLHost's Debian repo (see addresses below) and run "apt-get update" (use

"gplhost-archive-keyring" package for our repo. key)

• apt-get install dtc-toaster

• /usr/share/dtc/admin/install/install

• Run: "apache2ctl start"

• Enjoy and browse: http://dtc.govholabs.com/dtcadmin/

or go to admin page: https://dtc.govholabs.com/dtcadmin/



2. Now, the more detailed explanations to make sure every point are 100% clear.





Step 1: Prerequisites

You will need a freshly installed Debian stable with a hard drive partition of at least 1.2 GB, plus all the

space you will need for you hosted files (mail, web and db). The absolute minimum amount of RAM to run

DTC is 128 MB of RAM with 256 MB of swap space, but it's highly recommended to use it with 6 or 700

MB of RAM, so you have enough to do mail content scanning and filtering. DTC doesn't use some

memory by itself (as it's made only of sh and php scripts), but there's a lot of daemon running to run all the

system. To give a rough idea, with about 1000 domains, you will absolutely need something like 2GB as a

start, but with a reasonable traffic, 4 or even 8GB seems a good idea.





Step 2: GPLHost Debian repository

1. If you are using Etch, first of all, add the Debian repository (select the closest to you, the .fr and .sg

mirrors are synchronized hourly). Note that if you are using Lenny, DTC is directly available from your

closest Debian mirror, BUT its version is outdated and you'd better use the GPLHost repositories

bellow, unless you want to use something older than the stable release.









6

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1









Here are the addresses of our mirrors:



Location FTP HTTP

Singapore 1 (Acenix / NME) ftp://ftp.gplhost.sg/ http://ftp.gplhost.sg/

Singapore 2 (Qala): ftp://qala-sg.apt-proxy.gplhost.sg/ http://qala-sg.apt-proxy.gplhost.sg/

Kuala Lumpur (Malaysia): ftp://601.apt-proxy.gplhost.com/ http://601.apt-proxy.gplhost.com/

Seattle (USA, WA state): ftp://seattle.apt-proxy.gplhost.com/ http://seattle.apt-proxy.gplhost.com/

Tampa (USA, Florida): ftp://ftp.gplhost.com/ http://ftparchive.gplhost.com/

London (UK): ftp://ftp.gplhost.co.uk/ http://ftp.gplhost.co.uk/

Paris (France): ftp://ftp.gplhost.fr/ http://ftp.gplhost.fr/

Haifa (Israel): ftp://972.apt-proxy.gplhost.com/ http://972.apt-proxy.gplhost.com/



Note: PLEASE, use FTP as much as possible if you have to do manual install.



2. Let's say you are using our Tampa mirror (if you don't replace ftp.gplhost.com in all what is below by

the mirror you have selected):



sudo echo "deb ftp://ftp.gplhost.com/debian lenny main" >>/etc/apt/sources.list





3. Now add our repository key:



sudo wget -q ftp://ftp.gplhost.com/debian/repository_key.asc -O - | apt-key add -





Note: you should get response OK from your terminal window.



4. Then, run "apt-get update". Alternatively, you can run:



apt-get install gplhost-archive-keyring



5. Here is a full "/etc/apt/sources.list" for lenny (replace CC by your country code, e.g., ca for

Canada):



# Binary repositories:

deb http://ftp.CC.debian.org/debian/ lenny main

deb http://security.debian.org/debian-security lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main

deb ftp://ftp.gplhost.com/debian lenny main





# Source repositories:

#deb-src http://ftp.CC.debian.org/debian/ lenny main

#deb-src http://security.debian.org/debian-security lenny/updates main

#deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

#deb-src ftp://ftp.gplhost.com/debian lenny main







7

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







• If you are still using Etch (which is a bad choice), just replace lenny by etch everywhere above.

Note: that you don't really need the source repositories, or contrib and non-free. DTC and its

dependencies are all fully free, included in "main".



• If you use Lenny, you will notice that DTC pulls really A LOT of dependencies. This is because by

default, Lenny installs all the packages that are in the Recommends: section of each dependency.

If you want to avoid that, simply put this in your "/etc/apt/apt.conf.d/20norecommends":



APT

{

Install-Recommends "false";

}



Note: Doing this will pull 100 less packages at least, and save a lot of disk space by pulling only what

is absolutely necessary, which is best in a server environment.



6. We’re done with this section on prerequisites.









Part 6: DTC Detailed Setup

If you are still running a kernel older than 2.6.24 (for example if you run Etch), the capability module has

to be loaded. Another way is to recompile "pure-ftpd-mysql" with the option not to use this kernel

module. You can find how to do this here.





Step 1: Run “dpkg-reconfigure debconf”





1. The default "debconf" is set to high, "dtc" will miss some questions. To resolve this, run:



dpkg-reconfigure debconf



Note: you will be required to respond to several requirements.



2. From Fig. 3, Configuring debconf screen, accept the default "Dialog" selection; and then tab to

OK and hit Enter key to continue.









8

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1









Fig. 3





3. From Fig. 4, Configuring debconf screen, accept the default OK selection; and hit Enter key to

continue.









Fig. 4



9

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1









4. From Fig. 5, Configuring debconf screen, accept the default "medium" selection; and then tab to

OK and hit Enter key to continue.









Fig. 5





5. You’re done with this section.





Step 2: Run “dpkg-reconfigure debconf”

1. Remember that you HAVE to use the Debian volatile repository to have clamav and spamassassin

working. The default one simply does NOT work. So don't forget to add this repository:



deb http://volatile.debian.org/debian-volatile lenny/volatile main



2. Make sure you have at least one locale installed (e.g., supported languages like ru_RU.UTF-8,

fr_FR, en_US, es_ES, pt_PT, it_IT, etc.). To check, do:



dpkg-reconfigure locales



3. You’re done with this section.





Part 7-A: Installing dtc-toaster

4. To do this, first perform update as follows:



apt-get update



and then run:



apt-get install dtc-toaster





10

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







Note 1: Answer the few questions, and that's it, you are DONE!



Note 2: If you have the issue that "exim4" is on the way, you might need to explicitly install

Postfix as well, run:



apt-get install postfix postfix-tls dtc-toaster



5. You’re done with this section.





Part 7-B: Alternatively, Installing dtc-core

1. If you want a server using a lot less memory, then you can use "dtc-core". It has as few

dependencies as possible, to allow you to have a minimal install. It even doesn't have a dependency

on mysql, so you can use a remote MySQL server. It also allows you to choose what kind of package

you want for everything. Here's an example on how to the setup:



apt-get install dtc-core postfix postfix-tls postfix-mysql mysql-server





2. Then the rest is as usual, knowing that you won’t have mail content scanning and such. Note that if

you are running a not-so-busy server, then 256 MB of RAM is enough with this kind of setup, while

"dtc-toaster" requires quite more RAM.



WARNING!

This is a very common mistake: "dtc-xen" is NOT to be setup under the same server where dtc is

installed. It's to be setup on your dom0, while dtc itself would be typically installed in a domU. If you

don't know what dom0 is, read the Xen documentation. You can also learn how to install and configure

Xen virtualization from our excellent hands-on lab manual, entitled: "Step-By-Step Install Guide Xen

Hypervisor on Linux Server" to get you started.





Important answers to debconf





3. Here are some side notes about what to answer to debconf when doing the setup.



- Create directories for web-based administration ? yes.



- Postfix general type of configuration? -> Internet Site.

Answer ubuntu.govholabs.com when it asks for the mail name as this is the default in DTC.

- Run pure-ftpd from inetd or as a standalone server? standalone.



Note: you will need the capability kernel module to run pure-ftpd (can be found under the

security screen in the make menuconfig).



4. Later, you will need to activate spamassassin and saslauthd in "/etc/default", as Debian

leaves it not activated at boot time (See Post Install section).





11

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1







Note: The other options don't matter a lot, select what you feel is good for you.



6. From Fig. 6, Configuring webalizer screen, accept the default selection or change as desired; and

hit Enter key to continue.









Fig. 6





7. From Fig. 7, Configuring webalizer screen, accept the default selection or change as desired; and

hit Enter key to continue.









Fig. 7





8. From Fig. 8, Configuring webalizer screen, accept the default selection or change as desired; and

hit Enter key to continue.









12

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada



www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

Global Open Versity, ICT Labs Install Guide DTC on Linux Ubuntu 10.04 LTS Server v1.1









Fig. 8





9. From Fig. 9, Configuring webalizer screen, accept the default selection or change

by registering with docstoc.com you agree to our
privacy policy

Successfully added document to cart!

Successfully added document to cart!