Install VestaCP on Google Cloud in 5 steps

This article will provide you with 5 quick steps to get up and running with VestaCP and finish with adding your first domain to the portal.

VestaCP is an Open Source control panel that helps you manage your web server and simplifies a lot of things!

  1. Within the Google Cloud Console, navigate to Networking > Firewall Rules.
    • Add a new firewall rule for VestaCP
    • Name = vestacp-panel
    • Source Filter = “allow from any source (
    • Allowed protocols and ports = 8083/tcp
    • Target Tags = vestacp-panel
  2. Deploy a new Compute Engine VM Instance
    • Define Name and Zone based on your preference
    • Choose Machine Type (I have used “micro”)
    • Boot Disk = 10gb and CentOS 7
    • Firewall = allow HTTP and HTTPS (so your websites can get through when setup)
    • Expand “ Management, disk, networking, SSH keys”
      • Under Management, in the Tags section, add “vestacp-panel”
      • Under Networking, assign a New Static External IP (or re-use an old one if you have any) – take note of the External IP assigned, you’ll need this later.
    • Create the instance
  3. Wait for the new VM to finish deploying, connect to it via SSH and install VestaCP
    • cd /tmp/
    • curl -O
    • sudo bash
    • Follow the on screen steps
    • When it asks for an FQDN, provide the full URL that you will use to access the portal (e.g. – you will also need to add this as an A record for your domain.
    • Take note of password presented to you at the end of the install
  4. Login to your new VestaCP Control Panel
    • https://<your_server_ip>:8083 or https://<your_server_URL>:8083
    • Username = admin
    • Password = provided at the end of Step 3
    • If you can’t reach the portal, check your Firewall Rules from Step 1 and ensure your VM has the correct tags, as per Step 2
  5. Configure your VestaCP server
    • Edit the Admin user and change the password to something secure
    • Edit the VestaCP firewall and modify any existing rules to drop traffic you don’t want/need (POP3, DB, PING etc)
    • Add your domain
      • After this you’ll need to point your website to your new VestaCP web server

There are plenty more things to set up within VestaCP, such as setting Private Nameservers, creating Packages etc but the above will get you up and running.

Elasticsearch Cluster Install on CentOS 7

This post wont go in to any detail around setting up CentOS itself, but it will cover getting a simple 3 node Elasticsearch cluster up and running, with a couple of helpful plugins.

Install Java and check the install

yum install java-1.8.0-openjdk.x86_64 -y
java -version

Download Elasticsearch (check the site here for the latest versions)

cd /tmp

Install Elasticsearch

cd /tmp
sudo rpm -ivh elasticsearch-2.2.1.rpm

This results in Elasticsearch being installed in /usr/share/elasticsearch/ with its configuration files placed in /etc/elasticsearch and its init script added in /etc/init.d/elasticsearch

Enable Elasticsearch on Boot

sudo systemctl enable elasticsearch.service

Configure Elasticsearch

vi /etc/elasticsearch/elasticsearch.yml

Add near the top, and replace anything in < > with your details <name of the cluster>
#below line dynamically sets the node name based on the server hostname ${HOSTNAME}
#below binds elasticsearch to the local ( and site ip address (e.g. [_site_, _local_]
http.port: 9200
bootstrap.mlockall: true
#below sets the nodes the cluster should find ["<node1_ip_or_fqdn>", "<node2_ip_or_fqdn>", "<node3_ip_or_fqdn>"]

Restart and Verify Elasticsearch status

sudo systemctl restart elasticsearch.service
sudo systemctl status elasticsearch.service

You should be able to access the node now, on: http://<node-ip>:9200

Optional: Install Elastic-HQ and Head Plugins

cd /usr/share/elasticsearch/
bin/plugin install mobz/elasticsearch-head
sudo bin/plugin install royrusso/elasticsearch-HQ
sudo systemctl restart elasticsearch.service
sudo systemctl status elasticsearch.service

Once installed, you can access these plugins via:
Head = http://<node-ip>:9200/_plugin/head
HQ = http://<node-ip>:9200/_plugin/hq

Additional Nodes:

Repeat the same process on your other servers, you can add more than 3 nodes to the cluster, but if you do make sure you update in your Elasticsearch config to include those additional nodes.


CentOS 7 – Installing pymssql with pip, error

When trying to install pymssql with pip you may get a requirements error for

To fix this error I took the following steps:

For the below you may need the EPEL repo, install this with the below command

yum install epel-release

Install gcc

yum install gcc

Install python-devel

yum install python-devel

Download freetds-devel and freetds for CentOS 7 and store in /tmp/ (or somewhere else, but remember where you stored it for later)

Install both of them

yum install /tmp/freetds-0.95.19-1.el7.x86_64.rpm
yum install /tmp/freetds-devel-0.95.19-1.el7.x86_64.rpm

Run pip install pymssql again, it should hopefully succeed this time.