Monday, November 25, 2013

zPanel Installation on Ubuntu

In this Tutorial, I'm trying to Setup and Run a powerful web hosting server using Zpanel and Ubuntu Linux Server plus a way to setup your main domain address and its name servers.

For requirements, we need a fresh install of Ubuntu 12.04 LTS.

Logon to your server using terminal or SSH if you're managing your server remotely and enter following commands:
taher@hosting:~# sudo -i

root@hosting:~# apt-get update

root@hosting:~# apt-get upgrade

root@hosting:~# apt-get install curl

It's recommended to disable IPv6 on your server, if you're not going to use that:
root@hosting:~# echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf

root@hosting:~# echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf

root@hosting:~# echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf

root@hosting:~# echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf

root@hosting:~# reboot

After reboot, run the following command to make sure IPv6 is fully disabled:
root@hosting:~# cat /proc/sys/net/ipv6/conf/all/disable_ipv6

0 means it's enabled and 1 means disabled.

Find a download link of an appropriate version of Zpanel on their official download page: http://www.zpanelcp.com/download/
root@hosting:~# wget https://github.com/bobsta63/zpanelx/releases/download/10.1.0/installer-10-1-0-ubuntu-64.sh.x

root@hosting:~# chmod 777 installer-10-1-0-ubuntu-64.sh.x

root@hosting:~# ./installer-10-1-0-ubuntu-64.sh.x

Accept software License and continue installation. For FQDN, enter an address that will point to your control panel configuration page. For example: zpanel.myhosting.com

Remember, choosing a correct FQDN is important, because it is the only way to manage your hosting.

Installation will automatically proceed and run. Give it a few seconds to complete. The process will follow with an automatic server reboot. A second server reboot is recommended, to finish all installation and update procedures.
root@hosting:~# reboot

During installation, Zpanel automatically generates secure password for each element of our hosting server. To find those credentials, simply enter the following command:
root@hosting:~#  less /root/passwords.txt

zadmin Password :: HqxWgERUXcCpucXN
MySQL Root Password :: hpNmPHlInekX7880
MySQL Postfix Password : YzcCLClovWUzDFh1
Ip Address :: xxx.xxx.xxx.xxx
Panel Domain :: zpanel.myhosting.com

Now, Logon to your Zpanel by entering the IP address of your Ubuntu server in a browser:
http://IP_address

Use following information to login:
Username: zadmin

Password: password_from_last_step

That's all! Welcome to your Zpanel control page :-)

Now extend Domain Management section and click on Domains. Just simply create your main domain.

Image

Now click on DNS Manager and choose your domain from the list and click on Edit. The next step would be defining an A record for Zpanel control page as we already entered during installation process:

Image

Now we are finished with our server. Let's make sure our registrar is correctly configured to point to our server. In this example I'm using Name.com registrar, because I keep lots of domains there. The procedure would be same for all other registrars. Logon to your Name.com account, choose your mydomain.com domain name and click on NS Registration (commonly Child DNS or Glue Records in other registrars). Now create two entries with ns1 and ns2 as host names and your server IP address as IP address:

Image

Comeback to your domain and click on Nameservers. Enter ns1.mydomain.com & ns2.mydomain.com as your domain name servers:

Image

Hurry!! We just finished the configuration of a professional web hosting using Zpanel on Ubuntu. From now on, you can register many domains and simply use ns1.mydomaincom & ns2.mydomain.com as their name servers. Just don't forget to create a Domain with a same name in your Zpanel too.

Your Zpanel configuration page could always be accessible from: http://zpanel.mydomain.com