VestaCP install on Ubuntu 13.04

VestaCP install on Ubuntu 13.04

What is Vesta? Vesta is a open source hosting control panel. Currently it supports both RHEL flavoured Linux releases (Red Hat, CentOS) and Ubuntu LT

How to Install zPanel on Ubuntu 12.04
How To Install zPanel on CentOS 6
How to Install CentOS Web Panel

What is Vesta?

Vesta is a open source hosting control panel. Currently it supports both RHEL flavoured Linux releases (Red Hat, CentOS) and Ubuntu LTS 12.04 and Ubuntu 13.04. What I love about Vesta is that it’s fast and easy to use. Under the hood, it utilizes NGINX as a reverse proxy server for Apache/PHP. I’ll get more into that later on. All you need to know, is that Vesta gives you a really fast web server out of the box.

Installing Ubuntu

Well here’s the thing: You don’t have to install Ubuntu if you’re using DigitalOcean, they’ll take care of it for you! How great is that?

Just sign up or login (if you already have an account), click on the “Create Droplet” button, and follow this screenshot!

do_create_ubuntu_droplet

Now I already have a SSH key setup, so I can just use that to SSH into the server. If you do not have a SSH key setup, follow this tutorial here.

Note: Now Vesta currently works only on Ubuntu LTS 12.04 and Ubuntu 13.04. If you need the latest software packages, go with Ubuntu 13.04. If you need something a bit more “stable” (Personally, I don’t think there’s much difference), then perhaps go with Ubuntu LTS 12.04. For more information on LTS or Long Term Support, go here.

So within a minute or so of initiating the droplet creation process, your droplet should be up by now. If you did not add a SSH key during the process, an email would be emailed to you with the root password of your new server.

Now time to SSH into the server!

Note: I’m going to assume that you are comfortable with working in shell. If you’re not, you probably don’t want to be setting up your own server. Get a managed host service provider like HOST1PLUS.com .

Are you in? Yes? Good. Let’s install Vesta now.

First we need the Vesta install script for Ubuntu. Let’s download it from Vesta’s github repository and run it!

Edit: With the new version of Vesta, they have released a unified installer for the different supported platforms. Updated the code snippet to reflect the change.

curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh

Now all you need to do is follow the instructions! The script will prompt you for a valid email address, so remember to fill in an actual working email! That email address will be where they send you your Vesta admin user credentials.

The installation does take a while, and often times the shell becomes unresponsive, but fret not. I’ve done the same process a few times on different servers, it works flawlessly.

When the installation is done, the script will display the URL for Vesta’s web UI, and your admin user credentials. The same information will also be emailed to you!

vestacp_complete_screen

Great success!

Configuring Vesta

When the installation is complete, we can now log in into the Vesta’s web UI. Open up your browser and go to:

https://<server-url-or-IP-address>:8083

You should have received the email with the admin credentials. Use that to log in. If however, you did not receive the email (or if you’ve forgotten your admin password), we would need to reset the admin password through the shell.

/usr/local/vesta/bin/v-change-user-password admin YourNewPassword

Viola! You can now use your new password to log in to the web UI.

Note: Essentially, when you perform an action in Vesta’s web UI, the web UI actually runs the respective shell scripts located in usr/local/vesta/bin/. If you are more comfortable with working in shell, feel free to check out usr/local/vesta/bin and work your magic there!

Now that you’ve logged in to the web UI, it should be easy going from here.

vestacp_screen

  • Go to User to create new users.
  • Go to Web to create virtual hosts for Apache.
  • Go to DNS to create DNS zones for your URL.
  • Go to Mail to create new email addresses.
  • Go to DB to create new MySQL database.
  • Go to Cron to set up cron jobs.
  • Go to Backup to restore or download a backup archive.
    • Backups are generated everyday at 5am (by one of the cron jobs).
    • Maximum number of backups is dependent on the package configuration for the specific user.
      • You can change this figure under Packages.

Now what’s really interesting about Vesta is that, out of the box, it uses NGINX as a reverse proxy server for Apache. What this means is that NGINX will listen in on port 80, filters out the different HTTP requests and pass them along to Apache if neccessary. Static assets (JavaScripts, CSS stylesheets, images) are served directly by NGINX without ever touching Apache. The performance bonus is substantial, but that’s just the tip of the iceberg.

If you are as obsessive as I am about server performance, you should have heard about Varnish Cache. Varnish cache is a web application accelerator also known as a caching HTTP reverse proxy. Instead of only caching static assets, Varnish cache can be configured to cache dynamic content. So how do you deploy Varnish to work with your Vesta setup?

Well, you don’t have to. Vesta comes with a few NGINX template that you can use, one of them is caching. Go to Web, click on edit for the domain you wish to configure, and under Nginx Template, select caching.

vestacp_screen_cache

Vesta will take care of the configuration for you. Now isn’t that wonderful?

Edit: Take note that you will still need to configure Apache to set the cache headers.

Configuring Exim 4

By default, Vesta does not install Exim 4 with SMTP TLS support. That means that emails are sent in clear text to the server, and that’s not optimal. We’ll need to reconfigure Exim with SMTP TLS support. How do we do that?

nano /etc/exim4/exim4.conf.template

You’ll notice that the following lines are commented out.

# tls_advertise_hosts = *
# tls_certificate = /usr/local/vesta/ssl/certificate.crt
# tls_privatekey = /usr/local/vesta/ssl/certificate.key

Simply uncomment them!

tls_advertise_hosts = *
tls_certificate = /usr/local/vesta/ssl/certificate.crt
tls_privatekey = /usr/local/vesta/ssl/certificate.key

Now save the file and restart Exim.

service exim4 restart

So why are we doing this, you ask? Essentially, we’re telling Exim to advertise to all incoming clients that we accept TLS connections (using the STARTTLS extension).

If you have a SSL/TLS certificate from VeriSign or DigiCert, upload them to the server and update tls_certificate and tls_privatekey with the path to the uploaded files. You need to make sure that the files are readable by Exim!

Optional Software Packages

CSF + LFD

  • ConfigServer Security & Firewall with Login Firewall Daemon
  • Essentially it blocks ports that are not in used and
  • Bans the IP addresses of intruders
  • For a more detailed list of features, go here

Note: I know I left this as optional, but it’s really important that you install this.

To install CSF + LFD

wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
ufw disable
cd csf
sh install.sh

Now to check if it works.

perl /usr/local/csf/bin/csftest.pl

If no fatal errors are reported, you’re good to go!

Now you need to prevent CSF from blocking the port used by Vesta. Let’s open up CSF’s configuration file.

nano /etc/csf/csf.conf

VestaCP UI is accessed through TCP port 8083, so we need to make sure CSF allows traffic through the port.

# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,8083"

# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,8083"

For a more detailed guide on Ubuntu CSF installation, check out this guide!

htop

  • Interactive Process Viewer
  • Good for keeping track of
    • Server Load
    • Memory Usage

To Install htop

apt-get install htop

To run htop

htop

Simple!


COMMENTS

WORDPRESS: 1
  • comment-avatar
    dedicated server hosting windows 3 years

    Excellent blog right here! Additionally your website so much up fast! What web host are you using? Can I am getting your associate hyperlink to your host? I want my website loaded up as quickly as yours lol

  • DISQUS: 0