How to Setup a VPS to Host Your Website?

Most of us begin with Shared hosting for our websites but as they begin to grow, a mere Shared hosting doesn’t do far justice to them. You begin to see slow server response times and realize that your hosting cannot continue with the increasing traffic. That’s when you decide to choose a VPS Server Hosting. Now, there are two sorts of VPS available in the market:

·         Fully Managed

·         Semi-Managed

The fully managed ones tend to come with Control Panels and all the support you might need to set up your website but Semi-Managed ones lack those fancy features. Not everyone wishes to shell out extra money every month for a totally Managed VPS. This guide will assist you to set up your Semi-Managed VPS to host your website.

Pre-Requisites:

·         VPS with Ubuntu or CentOS Installed

·         Putty on your PC

·         WinSCP on your PC

Setting up VPS:
After buying VPS, you’ll be given an IP address (to access it), its username, and password. At this stage, you can set up your domain name to access your server. All you want to do is point the A Records of your Domain (Through your registrar) to the IP address of your server (VPS).

Installing a Control Panel:
After you’ve access to your VPS, you’ll need to install a Control Panel on it to manage your website. We’ll go with ZPanel, mainly because it’s a free another to cPanel. To get started with that – you’ll need an SSH customer, so Launch PuTTY on your computer.

Just type in your Hostname (Domain) or IP Address and confirm that the post is ‘22’ and the connection type is ‘SSH’.

Now, Press OK.

After you press OK, it’ll offer you a security alert and it’ll ask if you want to continue. Just click ‘Yes’. Now it’ll ask you to log in, just Login with the Username and Password of your VPS provided by your host


To install ZPanel, you’ll need to run the following command on the Terminal:
For CentOS:

Bash < (curl -ss https://raw.Github.Com/zpanel/installers/master/deploy/CentOS-6_4/10_1_1.Sh)

This will take via the installation procedure of Z Panel asking for your server IP address. And in the end, you’ll receive a username (Which is z admin by Default) and a randomly generated password.

Z Panel:
To access the Z Panel, access your server’s IP address using a browser. In case you continue don’t know your password, you’ll get the passwords by launching WinSCP and starting a session with the following settings:

·         File Protocol: SCP

·         Host Name: Your Server’s IP Address

·         Port: 22

·         Username: Username provided by your Host

·         Password: The password provided by your host

And press ‘Yes’ if a popup comes. Then your session will be initiated.
 

Open passwords.txt to get your ZPanel password.

After you’ve logged in to your ZPanel, you’ll get to a page like this in your Browser:

Change your password to something else.

Now you’ll go to ‘Domains’ under ‘Domain Management’ and set up a Domain in the ZPanel to host your website, like ‘www.your-domain.com’. After your status go ‘Live’ from ‘Pending’ (This usually takes around 10 minutes, sometimes up to 1 hour) you’re good to go.

After all, this is done, you’ll create a MySQL Database, Database user, and an FTP user to migrate/create your website. You might use a customer like FileZilla to transfer your files via FTP (Using a user you only created) or install a CMS like WordPress, the method will be the same as what you’d normally do on a Shared Hosting.


I hope this guide was helpful, if want me to write down more guides or write more about setting up a VPS for different purposes like setting up a VPS to host your favorite game (Like Call of Duty or Counter-Strike) then you might request that in the comment section below.