Shared hosting is good as long as you don’t have good amount of traffic, but after sometime when your site grows you have to move to a dedicated server. But dedicated servers are expensive and an overkill for medium traffic blogs. In this case dedicated virtual servers are very good as they are value for money services.
I have migrated long back to Mediatemple dv server, never had major problems but for some reason my site is loading slow. One of the reason may be I have installed some perl and python modules to support another site. So finally I have decided to move this blog to a different server. I found Linode a good alternative to mediatemple and provides dedicated VPS in my budget. So went ahead with Linode 512 plan and setup my server with Ubuntu 10.04, Apache, MySQL, PHP. Installed APC and Varnish for performance gains, more on that later.
This guide will help me to serve as a reference in the future, and may be it is useful for you people also.
Linode offers flexible plans, decide which is best for you depending on your blog or site visitors and page views per day. I went with Linode 512 which is enough if you get few thousand visitors a day. While signing up you can select on which Linode data center you want to host your site. Select a data center that is closest to your visitors.
You have to select a Linux distribution for your server, there are several distributions available from which you can choose one. I have selected Ubuntu 10.04 LTS. Swap size of 256 MB would be good for most people. Enter a strong root password, this you will use to login to your server via ssh. Now rebuild the system, it takes not more than few minutes. After completing that click boot button to start the server.
Now you can login to your server using root password you setup in the process. You can find the IP address of your server in the Remote Access tab of Linode Manager. You can use PuTTY to login to your server from Windows system.
Set Host Name
Login to your server using Putty, the firs thing you should do is set the hostname for your server. The hostname has to be unique and you can choose whatever you want to name it, it doesn’t have any relation to your domains.
To set the hostname enter these commands in shell. Replace teknobites with the hostname of your choice.
echo “teknobites” > /etc/hostname hostname –F /etc/hostname
update /etc/hosts file to reflect the changes. Open /etc/hosts with a text editor like vi or nano.
Change 18.104.22.168 with your server IP address and “teknobites” with your host name and doamin name with your domain name.
127.0.0.1 localhost.localdomain localhost 22.214.171.124 teknobites.domain.com teknobites
Check your server needs any software updates, use these commands to update
apt-get update apt-get upgrade --show-upgraded
The next step is to secure your server by generating ssh keys, adding iptables, optionally disabling root login etc.