Set Up Ubuntu Server With EHCP (LAMP, DNS, FTP, Mail) February 28, 2010Posted by yanadie in Linux.
Tags: DNS, FTP, Mail), Set Up Ubuntu Server With EHCP (LAMP
This tutorial will help you setup a web server to host multiple domains. We will use EHCP, a free control panel, to manage the server. The tutorial should be easy to follow even for beginners and you’ll probably need about an hour to have your server up & running. You will need a unique static ip address for your server. This can be behind your nat router as long as you set up port forwarding. You will need to know the ip address you want to assign to the server, it’s subnet mask, the default gateway and the ip for the dns server.
I used Ubuntu Server 8.04, but this should work on any Ubuntu or Debian version.
3. Install EHCP
After your system reboots, you’ll see the login prompt. Enter the username and password you selected earlier.
Next you’ll have to become root (you’ll have to type your password again):
Because this is a server, we’ll need a static ip address. Edit /etc/network/interfaces. Yor file should look like this (use your own ip addresses):
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet static
I replaced allow-hotplug eth0 with auto eth0; otherwise restarting the network doesn’t work, and we’d have to reboot the whole system. I have to thank Falko for this great tip!
Enter your dns in /etc/resolv.conf:
You have to restart networking to apply the changes:
Now we’ll update our linux system
Now we download ehcp:
Extract and install ehcp:
tar -zxvf ehcp_latest.tgz
Please read the information carefully! Ehcp will send some information by email to it’s developer. If you don’t want this to happen, read this forum post.
You’ll be required to press enter a few times, then you’ll have to choose a MySQL root password (this can and should be different from your user password).
The setup script will ask you a few questions:
Next you’ll have to choose your mail server configuration. Choose “Internet site” and type your domain name.
Press ok to generate an SSL certificate (please read the notice before pressing ok):
In the phpmyadmin configuration screen select apache 2, then press ok.