Deploy a Linux VPS Server using Linode
If you’ve already decided to go for a VPS and setup everything, then get ready and follow the step by step instructions available here in this guide to setup a fully functional, high performance and secured web server. This guide will assume you are using linode as the VPS provider. The procedure will be almost similar in other providers too. So lets start:
Goto linode signup and choose your plan
In this case choose the one that best suits your need. If you are confused then choose the most basic plan Linode 512 as you can extend later if you need.
After that fill up the next form with necessary information and after you’ve completed the signup process you’ll receive an email. Most accounts are activated instantly, but some may require manual review prior to activation. If it’s been a while since you ordered but your account isn’t activated yet, please check your email for additional instructions.
After your account is activated then go to https://manager.linode.com/and login using your username and password. You’ll be greeted with a screen asking in which data center your linode should reside:
When deciding on a datacenter, it’s important to know or predict the location of most of your web application users. EU users frequently find the London or Newark datacenters to offer the best ping times, and Asia/Australia users often get Fremont to be the best one. You can use MTR reports for each of the hosts in the linode speed test page to figure out which datacenter provides the best latency from your particular location.
Once you’ve selected the datacenter, then you’ll be prompted to deploy a linux distribution to it:
There are many distributions available, but I prefer ubuntu 10.04 as it is an LTS (Long term support) version and will provide security and feature updates for more long time than other ubuntu distributions and I like ubuntu as it is known to be the most successful linux distribution. So if you are in harmony with my choices then select the “Ubuntu 10.04 LTS”.
If you don’t plan to test other distributions then leave the deployment disk size to maximum value. Then select the swap disk size which is the amount of disk space to be used as virtual memory in addition to the original RAM. For most people 256MB will be fine. Then you need to write a root password with which you’ll login to your remote server. Choose a strong password with a combination of letters and numbers. Because your server might have to face brute-force dictionary attacks by hackers. And a good password is the key to prevent such attacks. You’ll also need automated intrusion detection system to protect your server from malicious attackers to make it a smart and secured server later. For now let’s be strict to the basics.
Now you can Click “Rebuild” and watch the installation progress in your dashboard. After completion of the jobs you can now start your linode server clicking the “Boot” button. Once your server has booted you can login to it using ssh as user root.
To remote login via ssh, you need to know the ip-address of your linode. Click the “Remote Access” tab in the Linode Manager to find your Linode’s IP address:
in the above command change the ip-address to the ip-address of your own. When it prompts for the password, type the root password you set before. If you are in Windows then you may want to use Putty for ssh login.
You can also use filezilla or any ftp client that supports sftp to traverse files and folders in your server. You need to specify the ftp url like this, sftp://220.127.116.11 and root as the user and your root password to connect to the server through your ftp client.
After you’ve successfully logged into the server, the very first thing you’ll do is to install the necessary security updates. To do that type the following commands and execute them.
sudo apt-get upgrade --show-upgraded
Set the HostName:
You’ll need to set your system’s hostname and FQDN (fully qualified domain name). Your hostname should be something unique. Please note that the system’s hostname has no relationship to websites or email services hosted on it, aside from providing a name for the system itself. To set the hostname use the following commands replacing “codinglogs”with the hostname of your choice:
Now, open your /etc/hostsfile for editing by issuing the following command:
Now type the letter “i”to start editing the file. Now add the following lines if not already exists:
18.104.22.168 codinglogs.example.com codinglogs
replace “codinglogs” with your chosen hostname, “example.com” with your primary domain name, and “22.214.171.124″ with your system’s IP address. Now press the “ESC” key and then type : followed by x like this :x and hit enter. This will save the changes to the file you opened with vi editor and return to the terminal. For some reason if you don’t want to save the changes then type :q! and hit enter to exit from vi editor. If you are not familiar with the vi editor then for now just remember to press “i” to start editing and then press “ESC” to end editing and use cursor keys to move the cursor and edit the file and then type either :x or :q! to exit the editor.
Now that’s it, you’ve setup your linux system, now you need to install and configure necessary software to make it a well performing web server. Follow the next articles to do that.
Articles in this Step by Step VPS Setup Guide
Getting Started with VPS – The Beginners Tutorial
Introductory concepts on web servers and virtual private servers. Introducing you to the world wide web from a technical point of view.
Shared Hosting, VPS, Dedicated and Cloud Servers
Comparing the popular server hosting solutions. Basic understanding of shared, dedicated, vps and cloud servers.
Deploy a Linux VPS Server using Linode
Tutorial on deploying your linux distribution in your VPS server and setting up hostname and initial configurations
Setup NginX Web Server (Not Apache!) on Ubuntu 10.04
Analyzing why NginX web server is better for you instead of the mostly used Apache. Demonstration on how to setup and configure NginX on Ubuntu server.
Enable HTTPS (HTTP+SSL) in NginX Web Server
Tutorial on enabling secure http connections for NginX web server. Demonstrating how to self sign your SSL certificate for the VPS server.
NginX Password Protect Web Directory
Helping you to protect specific web directories with passwords for restricting access to administration section or important private files that need to be accessed through the web.
Setup PHP-FPM with APC on Ubuntu 10.04 for Faster Performance
Installing and Configuring PHP5 with Fast CGI Process Manager along with the excellent op-code cache solution APC for faster and optimized PHP backend.
Setup MySQL with PHPMyAdmin on Ubuntu 10.04
Setting up MySQL database server and configuring for better performance in low memory environment. Also setup a web based database management front-end named PHPMyAdmin.
Configure Domains and Subdomains in your VPS Running NginX
Tutorial on DNS setup for adding additional domains and subdomains. Also configuring NginX for handling each domains/subdomains.
Domain Emails for Free Using Google Apps
Setup domain specific email addresses without installing any email server in your VPS. Google Apps seems to be a better solution in this regard.