Thursday, March 15, 2012

How to Install zpanel


This is a two-part post continuing along a hosting theme, today looking at ZPanel, why you should use it and how to install it on an AWS EC2 instance with linked Route53 DNS management.
We've previously looked at EHCP, discussed it's DNS inclusive feature set and highlighted its intuitive interface and ease of install, however if you're looking for complete resolution resilience, and even more polish, I think we might have just the thing. Read on....

We'll skip the basics of AWS and dive straight in to the install, which is easy enough but does require a couple of tweaks to get it functioning on an EC2 instance. The installation listed here covers a 64 bit Ubuntu Linux 10.04LTS 'Micro'.

After launch allocate an elastic IP (EIP), update & upgrade your instance and set both hostname and hosts file to match the AWS public DNS name as per the attached EIP, once done log on as root (su) and install ZPanel as follows..

wget http://sourceforge.net/projects/zpanelcp/files/releases/6.1.1/zpanel-6.1.1.tar.gz
mkdir /etc/zpanel

tar -zxvf zpanel-6.1.1.tar.gz -C /etc/zpanel/

chmod +x /etc/zpanel/lib/dev/zpinstall_ubuntu.sh
/etc/zpanel/lib/dev/zpinstall_ubuntu.sh

You'll be asked various bits and bobs during install, the usual stuff, internet site for postfix, hostname etc and will have to choose usernames and passwords here and there. The most important entry is what you give when asked for the installation sub-domain. EC2 instances can't handle subdomains, as such you need to list a sub FOLDER, i.e use your EC2 public FQDN but add a forward slash + name of folder (/zpanel). When you're done note down the MySQL and panel access details, reboot the server and log in when it comes back up.

Below is a grab of the ZPanel GUI, which I personally think is the cleanest and most simply coherent of any other hosting panel.

Tweaks :  

On checking Service Status you'll notice that both MySQL and SMTP aren't started, getting them fired up is an easy fix and just requires editing a couple of config files. 

SSH into your instance and we'll sort SMTP (Postfix) first..

nano /etc/postfix/main.cf

Simply locate the two hostname entries (they're near the top of the file) and remove the trailing folder  from the FQDN as listed (i.e /zpanel), save the file and start Postfix..

service postfix start

All good, now MySQL..

nano /etc/mysql/my.cnf

Comment out the following lines (with the #)..

socket = /var/run/mysqld/mysqld.sock
bind-address = 127.0.0.1

Save the file and restart MySQL..

service mysql restart

With everything running you'll probably now move on to create a domain, and on doing so you may wonder why it shows 'Pending' once created. This is because by default ZPanel runs an hourly Cron job to update the Daemon, it's a simple file edit to alter this to something a bit more dynamic..

nano /etc/cron.d/zdaemon

..and change to 0 to */10 to run every 10 minutes.

The rest of the admin utilities are quite self explanatory to those familiar with hosting, and there's no more behind the scenes tweaking required to get things running smoothly. You will, of course, require some form of DNS management to get your newly created website (and eMail) live and in the next post I'll show you how to do so via Amazons superb Route53.

No comments:

Post a Comment

Please post on-topic and non abusive comments only. Avoid including website URLs in your comments.