Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
Global Open Versity
IT System Integration Hands-on Labs Training Manual
Build your Own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server
Kefa Rabah
Global Open Versity, Vancouver Canada
krabah@globalopenversity.org
www.globalopenversity.org
Table of Contents Page No.
BUILD YOUR OWN ISP HOSTING USING EHCP ON UBUNTU 10.04 LTS SERVER 2
1.0 Introduction 2
Part 1: Install & Configure Ubuntu 10.04 LTS Server 3
Step 1: Getting Started & Hardware Pre-requisites 3
Step 2: Update Ubuntu 10.04 Operating Systems 3
Step 3: Install Webmin 3
Part 2: Installing Additional Infrastructure Packages 5
Step 1: Install OpenSSH Package 6
Step 2: Install Apache (HTTP) Web Server 6
Part 3: Optional Configuration Tasks 7
Step 1: Configure Network Interface 7
Part 4: Install DNS Server 9
Part 5: Install Easy Hosting Control Panel (EHCP) 13
Step 1: Install & Configure EHCP 13
Step 2: Web Hosting – Adding a New Domain 21
Step 3: Adding Email Users’ 24
Step 4: Access Webmail (SquirrelMail) 25
Step 5: Adding Bulk Email Users’ 27
Step 6: Adding FTP Users’ 29
Step 7: User’s who exceed their allocated quota receive errors 29
Part 6: Need More Training on Linux: 31
Ubuntu Server Administration Training 32
Part 7: Hands-on Labs Assignments 32
Linux Administration Training 32
A GOV Open Access Technical Academic Publications
Enhancing education & empowering people worldwide through eLearning in the 21st Century
1
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.org ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
Global Open Versity
IT Systems Integration Hands-on Labs Training Manual
Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server
By Kefa Rabah, krabah@globalopenversity.org May 9, 2010 GTI Institute
1.0 Introduction
In this Hands-on Labs session, we’re going to learn how to install and configure the Linux Ubuntu 10.04
LTS (Lucid Lynx) server option when we then use to install Easy Hosting Control Panel (EHCP) server.
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. 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.
Easy Hosting Control Panel (EHCP) is relatively new and it currently works only on Debian/Ubuntu
servers. It’s open source software, so it may be used by anyone wanting to host multiple domains in his
dedicated/vps server. It comes with an install script where everything is done automatically. Right out of
the box magic. That is, you can have everything working in minutes, so long as your OS install is done
from clean OS. You really don’t need to have any form of Linux knowledge to get this up and running. I
have to say, it lives up to its name.
Solution:
In this Hands-on Lab session, you’ll learn how to setup virtual network on VMware (you may also use any
other virtual machines like MS VirtualPC, Linux Xen, or VirtualBox from Sun). In this lab session, we’ll
concentrate on installing EHCP on a clean install Linux Ubuntu 10.04 LTS Server. You will learn how to
install and configure Webmin to help with configuring DNS server. I’ll also show you how set static IP
address which is required for deploying a DNS server. Finally, we’ll go through a step-by-step process to
install EHCP using the install script. You’ll also have opportunity to do some assignment at the end of the
lab session. Upon completion of the hands-on lab you have gained a competency level and a capability to
be able to plan design implement and deploy a hosting solution using EHCP.
Assumptions
It’s assumed that you have a good knowledge of Linux Ubuntu OS. If not then you can check this article
which discuses how to install Ubuntu 10.04 LTS server:
• Step-By-Step Install Guide Ubuntu 10.04 LTS (Lucid Lynx) Server
2
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.org ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
Part 1: Install & Configure Ubuntu 10.04 LTS Server
Step 1: Getting Started & Hardware Pre-requisites
Ubuntu runs on inexpensive, commodity hardware. To support a small practice like OSCAR, web-server
etc., we recommend a minimum configuration of 200Gb Disk, 2Gb RAM, and a 2GHz Intel Dual Core
CPU. For maximum subsystem compatibility, we suggest that you install the 32bit version of Ubuntu. If
you are purchasing a computer to run OSCAR, one option is to order the machine with Ubuntu pre-
installed.
In this Hands-on Labs, it’s assumed that your target computer is connected to the internet. After installing
the operating system, log into your machine and ensure you perform software updates to bring your
systems up-to-date.
Step 2: Update Ubuntu 10.04 Operating Systems
It is useful to update your system with the latest components and system patches. The first command
below asks Ubuntu to update its database of available packages, and the second command installs the
latest packages based on your current configuration. We run the upgrade command twice to ensure that
any packages that may have post-upgrade dependencies also have an opportunity to be upgraded.
1. From the command line, enter the following commands, one at a time.
$ sudo apt-get update
$ sudo apt-get -u upgrade
Note 1: The sudo command is used to run privileged operations on the Ubuntu platform. The first
time you run the command, it will ask for your password. Subsequently, it will not ask for your
password again for a short period of time (typically 15 minutes).
Note 2: apt-get is the program Ubuntu uses for managing the system’s packages. When used to
manipulate the core packages of the operating system, it needs to be run in conjunction with the sudo
command.
2. We’re done with this section
3. You’re now ready to begin any other application installation as desired!
Step 3: Install Webmin
Webmin is a web-based interface for system administration for UNIX. Using any modern web browser,
you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to
manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console
or remotely.Currently There is no Webmin package in the Ubuntu repositories. This tutorial will
explain how to install Webmin in Ubuntu Intrepid Ibex
3
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.org ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
You can install Webmin for your server web interface to configure Apache2, MySQL, FTP, DNS servers
and many more. Now we will see how to install Webmin on Ubuntu 10.04 LTS.
Preparing your system
1. First you need to install the following packages
sudo aptitude install perl libnet-ssleay-perl openssl libauthen-pam-perl
libpam-runtime libio-pty-perl libmd5-perl apt-show-versions
2. Next, get "libmd5-perl" (this is deprecated and not in 10.04 repositories – more on that can be
read here)
wget http://ftp.debian.org/pool/main/libm/libmd5-perl/libmd5-perl_2.03-1_all.deb
then install
sudo dpkg -i libmd5-perl_2.03-1_all.deb
3. Now download the latest Webmin using the following command or from here
sudo wget http://garr.dl.sourceforge.net/sourceforge/webadmin/webmin_1.441_all.deb
4. Now we have webmin_1.441_all.deb package install this package using the following command
sudo dpkg -i webmin_1.441_all.deb
5. This will complete the installation.
Note: Ubuntu in particular don’t allow logins by the root user by default. However, the user created at
system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo
capability to login with full root privileges.
6. Now you need to open your web browser and enter the following
https://your-server-ip:10000/ or https://your-server-name:10000/
Note: Accept the security warnings and alerts. Now you should see similar to the following screen,
see Fig. 41. Enter your credentials used earlier when you installed the system and then click login.
4
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.org ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
Fig. 1
7. After login if you want to configure Apache2, DNS server etc. you need to click on Servers on your
left-hand side you should see many servers that are ready to configure, as shown in Fig. 2.
Fig. 2: Webmin admin page
8. Click Logout link to exit Webmin
9. We’re done with this section
Part 2: Installing Additional Infrastructure Packages
These instructions are written for an audience comfortable with invoking instructions from the command
line and GUI option. If you are capable of installing the user friendly Ubuntu GNU/Linux operating system
or any other Linux distros, then you should be able to follow along with ease.
5
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.org ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
Step 1: Install OpenSSH Package
In order to support secure remote connections to your server, you will need to install the OpenSSH
package. This package will come in handy in the future to support administrative tasks on the system. By
default this package is already installed in the Ubuntu server option.
1. To install OpenSSH, issue the following command:
$ sudo apt-get install openssh-server -y
2. To log into a remote computer that is running OpenSSH, you use the ssh username@hostname
command, replacing username with a valid user name on the computer you are trying to log into, and
replacing hostname with either the fully qualified host name (e.g. example.com) of your server, or
it’s IP address (e.g. 192.168.83.250).
Note: For example, if your everyday computer is a Mac, and your OSCAR server user account is
krabah, and your OSCAR server IP address is 192.168.83.225, then you can now log into your
su apt-getserver from your Mac, by opening a terminal window on your Mac and running the
command ssh krabah@192.168.83.250. You can use ifconfig command to find out your IP
address.
Step 2: Install Apache (HTTP) Web Server
1. To install Apache2 (HTTP) Web server, perform the following procedures:
$ sudo apt-cache search apache2
2. Get the Apache package name, and issue the apt-get install command. You need sudo
privileged to install it.
$ sudo apt-get install apache2 -y
3. When done installing Apche2, open your favorite internet browser, and type http://localhost, and
should be rendered as shown in Fig. 3.
6
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.org ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server v1.1
Fig. 3
4. To start/stop/restart Apache2 server, issue the following commands:
$ sudo /etc/init.d/apache2 start
$ sudo /etc/init.d/apache2 stop
$ sudo /etc/init.d/apache2 restart
5. We’re done with this section.
Part 3: Optional Configuration Tasks
Step 1: Configure Network Interface
In this section, we are going to check and modify the network interface to change it from dhcp to static IP
address on eth0 interface. If your Ubuntu System is set to use DHCP, you will want to change it to a
static IP address here is how to
To do this, perform the following procedure:
4. Fire up your favorite Text editor and open and modify /etc/network/interfaces file, with the
result shown in Fig. 4.
$ sudo nano /etc/network/interfaces
Note: If you are using DHCP for your primary network card which is usually eth0, you will see the
following lines, see Fig. 4
auto eth0