You are on page 1of 10

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

Global Open Versity IT Enterprise Architecture Hands-on Labs Training Manual

Step-By-Step Install Guide DTC GPLHost Web Hosting Control Panel on Linux CentOS5 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 GPLHOST WEB HOSTING CONTROL PANEL ON LINUX CENTOS5 SERVER 3
Introduction Part 1: Install CentOS 5 Part 2: Post Installation Configurations. Step 1: Perform System Upgrade Step 2: Modify the Hosts file Part 3: Install DNS Server Part 4: Pre-requisite Setup Part 5: Detailed setup of DTC Step 1: Setting up the RPMForge repository Step 2: Setting up the DTC repository Step 3: Installing DTC Step 4: Fully-qualified host name Step 5: SELinux and firewall Step 6: MySQL security Step 7: DTC configuration Step 8: Setup Services & Product List Step 9: Create New Account Step 10: Server Monitoring Part 6: Configure SquirrelMail Webmail Step 1: Install Mail Transport Agent Switcher (MTAS) Step 2: Switch to Postfix from Sendmail Step 3: Configure SquirrelMail to Work with Courier-IMAP Part 7: Configure Mail on DTC Step 1: Set up mail Step 2: Adding Database Step 3: Login to your mailbox Step 4: Changing Account Settings
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

3 4 4 4 4 5 5 6 6 7 7 7 8 8 9 16 17 20 21 22 23 23 26 26 28 29 30 1

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

Part 8: Install Firewall Part 9: Need More Training on Linux: Web Hosting Solutions Administration Training Part 10: Hands-on Lab Assignments

30 31 31 31

A GOV Open Knowledge Access Technical Academic Publications


Enhancing education & empowering people worldwide through eLearning in the 21st Century
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

Global Open Versity IT Enterprise Architecture Hands-on Labs Training Manual

Step-By-Step Install Guide DTC GPLHost Web Hosting Control Panel on Linux CentOS5 Server
By Kefa Rabah, krabah@globalopenversity.org June 27, 2010 GTS Institute

Introduction
Linux CentOS5 is a community-supported, free and open source operating system based on Red Hat Enterprise Linux. It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution. CentOS stands for "Community ENTerprise Operating System". CentOS is the perfect server for people who need an enterprise class operating system stability without the cost of certification and support and pocket burning baggage that comes with proprietary software. And the beauty is CentOS is free. In this Hands-on Labs session, were going to install DTC GPLHost Control Panel on Linux CentOS5 server. 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, 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 CentOS5 and prepare it for the installation of DTC GPLHost Control Panel. Youll also learn how to perform post-installation configuration of CentOS5 e.g., upgrade the system with new patches and bug fixes, configure static IP address from dynamic one, change the computer hostname, modify hosts & resolv.conf files, perform ping test among others. Next,
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

you will learn how to install DTC on Linux CentOS5 server. Upon completion of this lab session you should have gained a capability and expertise level to install and maintain DTC GPLHost Control Panel, which you can use to manage your hosting solutions. The entire lab training was performed on VMware. But you can also use the open source VirtualBox from Oracle etc.

Part 1: Install CentOS 5 Assumptions:


1. Its assumed that you have a good understanding of Linux operating system and its working environment. Its also assumed that you know how to install and configure Linux CentOS5, if not go ahead and pop over to scribd.com and check out or excellent hands-on training manual, entitled Install Configure and Upgrade Linux CentOS5 Server v1.1 to get you started. 2. Its also assumed that you have a good understanding of MySQL database. 3. In the next section, were 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, its 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 "yum install update y". This enables the system to get the latest patches and bug fixes. 3. Youre now down with system update. In the next section were going to learn how to change NIC adapter configuration from dynamic IP address to static IP address. Step 2: Modify the Hosts file 1. Its assumed that you know how to install CentOS5 using static IP address, very important for DNS server. Once youre done with the installation then verify that your hosts file is set correctly. 2. In this step we want to modify the hosts file to reflect our new "Fully Qualified Hostname" and IP address. 3. To do this, from the Terminal window issue the command: [root@mx ~]# gedit /etc/hosts 4

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

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

4.

While here also note our hostname and IP address:

server03.govholabs.com 192.168.1.10 5. Check out /etc/hosts to ensure that you have a correct setup, in our case, its as follows: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 192.168.1.10 server03.govholabs.com server03 192.168.1.10 dtc.govholabs.com
::1 localhost6.localdomain6 localhost6

6. For the final test, issue the ping command, to see if our hostname can return its own IP address: [root@mx ~]# ping server03.govholabs.com [root@mx ~]# ping dtc.govholabs.com 7. Were done with this section.

Part 3: Install DNS Server


In this section its assumed that you know how to install and configure 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 were going to use Webmin and Bind9 to deploy DNS Server. However, its important to note that DTC will configure DNS and all the hosting requirements for you!

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 "server03.govholabs.com", as follows: # hostname server03.govholabs.com Note: change hostname to suit your needs. 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 mx server that should be something like "mx.example.com" (this is best option). 3. Similarly, check that 5

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

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

cat /etc/hosts returns something like: 192.168.1.10 server03.govholabs.com server03

Note: You make thins easier by installing DNS server. 4. Now check your hostname, e.g., hostname -d gives only govholabs.com hostname -s gives only server03 hostname -f gives the server03.govholabs.com

5. Finally, check that "uname -a" is returning the correct FQDN. 8. Youre done with Installing and post configuration of CentOS5.

Part 5: Detailed setup of DTC


So, let's get on with the program. Setting up DTC in Linux CentOS is a rather straightforward procedure which should take thirty minutes tops: 1. 2. 3. 4. 5. 6. 7. Install your operating system (not covered in this HOWTO) but you can check it from here. Set up the RPMForge repository (to pull several DTC dependencies) Set up the DTC repository Install DTC rpm Pre-configuration checklist DTC configuration Post-configuration adjustments

Step 1: Setting up the RPMForge repository 1. First, we need to set up the RPMForge repository on your machine. At the time of writing this HOWTO, the latest RPMForge RPM release for CentOS 5.4 was: 32-bit Intel syystems 64-bit Intel systems

2. You probably want to get the latest release so peruse the right package here. Make sure the name matches your architecture (x86_64 or i386) and base system (fc7, fc8, el4, el5). 3. Once you've installed it, make sure you execute yum update to get your system up to date with all the packages. 6

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

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

Step 2: Setting up the DTC repository 1. Once you've installed the RPMForge repository, put the following file (name it "gplhost.repo") in "/etc/yum.repos.d/":
[gplhost-archspecific] name=GPLHost (architecture-specific) #baseurl=ftp://ftparchive.gplhost.com/yum/centos/$releasever/RPMS/$basearch/ mirrorlist=http://ftparchive.gplhost.com/yum/centos/$releasever/RPMS/$basearch/mirr orlist gpgcheck=1 enabled=1 gpgkey=ftp://ftp.gplhost.com/yum/RPM-GPG-KEY [gplhost-noarch] name=GPLHost (architecture-independent) #baseurl=ftp://ftparchive.gplhost.com/yum/centos/$releasever/RPMS/noarch/ mirrorlist=http://ftparchive.gplhost.com/yum/centos/$releasever/RPMS/noarch/mirrorl ist gpgcheck=1 enabled=1 gpgkey=ftp://ftp.gplhost.com/yum/RPM-GPG-KEY

2. That sets up yum to download DTC from our repository mirrors. Make a note that the URLs have centos in them, but in the future we'll be providing packages for Fedora too.

Step 3: Installing DTC 1. Once you have both rpmforge and GPLHost's repository, simply type: yum install dtc-postfix-courier or yum install dtc-core Note: this depends on how much dependencies you want to be installed. The "dtc-core" aims at installing the least possible dependencies, so that you just have a workable environment: a web server, no serious mail system. However, the "dtc-posfix-courier" is when you want to use all supported packages from DTC, with mail content scanning, etc.; and its the one we have installed.

Step 4: Fully-qualified host name 1. Your machine must have a fully qualified host name. Some Linux distributions happily accept or default to a simple host name (like mx), while several daemons including SpamAssassin need a FQDN in the machine (like "mx.example.com"). Use the setup tools in your machine to ensure this is the case.
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

2. You shall check that "/etc/sysconfig/network" has the correct FQDN. If it doesn't, then set "server03.govholabs.com" there, and reboot. You shall also check that "/etc/hosts" has it. Then check with "uname -a" that your server is currently configured with the correct hostname.

Step 5: SELinux and firewall 1. Use "system-config-securitylevel" to open the requisite ports for the services you'll be using. Then disable SELinux or set it to permissive, otherwise DTC configuration will fail and DTC won't be able to operate even after the configuration. 2. The following will tell you if it's enabled or not: 1. if selinuxenabled; then echo "SELinux is enabled" ; else echo "SELinux is disabled" ; fi

Step 6: MySQL security 1. It's advised to increase the timeout of MySQL as follow (edit "/etc/my.cnf"): connect_timeout=300 wait_timeout=1800 2. Start your MySQL server with: /sbin/service mysqld start Youll be asked to set an initial secure root password for it with: /usr/bin/mysqladmin -u root password 'replace-me-with-a-secure-password' Warning! Write this password down -- you will need it in order to setup DTC. 3. Starts all your daemons after the packages are installed service httpd start service crond start service postfix start service clamd start service amavisd start service syslog start service mysqld start service courier-authlib start service courier-imap start service dkimproxy start service pure-ftpd start service spamassassin start service saslauthd start
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs

Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0

Note: you may need to separately install some of the service using yum utility. 4. Were done with this section.

Step 7: DTC configuration 1. After the installation and daemon setup is complete, set the safe mode to off in "/etc/php.ini" so that the cron job can do what it needs, 2. Before running DTC installation command, do ensure first that your NIC is set correctly, like in Fig. 1.

Fig. 1

1. Follow the link below to access the full document.

The full document has moved to Docstoc.com. You can access and download it from here:
OR http://www.docstoc.com/docs/50345601/Step-By-Step-Install-Guide-DTC-GPLHost-Web-Hosting-ControlPanel-on-Linux
-----------------------------------------------

Step-By-Step Install Guide DTC GPLHost Web Hosting Control Panel on Linux v1.1

Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is knowledgeable in several fields of Science & Technology, Information Security Compliance and Project Management, and Renewable Energy Systems. He is also the founder of Global Open Versity, a place to enhance your educating and career goals using the latest innovations and technologies.
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org

EBT200 Web Hosting Solutions Administration Training

You might also like