How to set up a VPS:
Immediately after payment, your VPS is instantly set up and you will receive an email with details of your IP address, the url to the control panel, your login id and the password. Login to check that you have been allotted what you have been promised. You can change the “root” password into something easier to remember. Also check what the operating system is. Most hosts prefer to offer Centos 5.4 32 bit as the default OS. Avoid selecting the absolute latest version as there may be compatibility problems. Also, choose 32 bit instead of the 64 bit to save on memory usage.
Pointing your domain to the VPS server (At the domain Registrar):
Its’ best to do this first because it takes time for the domain to propagate and this can happen in the background while you are setting up your VPS.
Log into your domain registrar such as namecheap.com or godaddy.com.
Click on the domain name and select the option “Nameserver Registration”. Against ns1.domain.com and ns2.domain.com, enter the IP address(s) provided by the VPS host (see image)
Now wait for the propagation of the domain to take place.
Note that the domain will not point to your VPS server till you program the VPS (shown below).
Download Putty:
To communicate with the server, you need a “Secure Shell” (SSH). “Putty” is a well know SSH implementation and you can download it from here.
Start Putty, login as “root” with the password provided to you and you are ready to communicate with the server.
Download & Install a Control Panel For the VPS:
You need a Control Panel to do a number of important tasks such as defining the DNS of the VPS, creating multiple sites etc. Virpus & SemoWeb do not offer any control panel (except SolusVM). Burst.net offers one which is very basic (VePortal).
There are two free Control Panels available and both are excellent.
Kloxo & Webmin. Both are "Hosts-in-a-box"
. A third choice is ISPConfig 3.
Install & Configure Kloxo:
There is an excellent copy-paste tutorial available at Kloxo’s official site. For your convenience, that is reproduced below:
Prerequisites
1) A dedicated or virtual server running CentOS or Red Hat EL 5.x. CentOS 6.x is not currently supported.2) At least 256 MB of RAM (enough to run Yum).3) At least 2 GB of free disk space for Kloxo and related services.4) If you partitioned your disks manually, make sure you have a large /tmp. Kloxo uses /tmp to create and store backups temporarily and the process will fail if there is not enough space.Before we begin…You have to disable SELinux by editing /etc/sysconfig/selinux and changing the line to selinux=disabled. This will keep SELinux from being enabled on your server next boot.
Then you must run the following command as root to disable SELinux for the current session:
su - rootsetenforce 0If you are unsure this procedure worked, you can run/usr/sbin/sestatus to check its status. Failure to correctly disable SELinux will render your Kloxo install useless and an OS reload may be required to properly reinstall it.Also, make sure the ports 7778/tcp and 7777/tcp are open in your server firewall or you won’t be able to connect to Kloxo web panel when the install completes.Installing KloxoKloxo installation consists of downloading kloxo-installer.sh from download.lxcenter.org and executing it as root. The script will present you with a few questions and sometimes ask for a password (enter your root password).
If you don’t have MySQL server already installed, you must run:
# su - root# yum install -y wget
# wget http://download.lxcenter.org/download/kloxo/production/kloxo-installer.shTo install as Master (Default Single Server):
# sh ./kloxo-installer.sh --type=masterTo install as Slave:
# sh ./kloxo-installer.sh --type=slave
If you already have MySQL installed and set a root password, you must run:
# su - root# yum install -y wget# wget http://download.lxcenter.org/download/kloxo/production/kloxo-installer.sh# sh ./kloxo-installer.sh --type=<master/slave> --db-rootpassword=PASSWORD
After installation, enter your_IP_address:7778 in the browser, enter “admin” for the username and password and you are in. You will be required to change the password as soon as you log in.
Configure Domain(s) In Kloxo:
Click on the Domains Tab. You will be asked to add a DNS Template. Add the name and the nameserver details as shown in the image. Then click on the Domains tab again and click "Click Here to Add Domain for admin (Show/Hide)".
You will also see a message saying "The identification name for your mail server is not set. This means that many public mail servers like hotmail will reject mails from your server". Just enter the name of the domain and leave the rest to their default values.
Now Rebbot Your VPS from the host’s control panel. When you access your website url (if propagated already) or the IP address, you will see the default Kloxo index page (see image). This indicates that your site is now alive!
Click on the file manager and you will see that Kloxo has created a folder with the name of your domain. This folder will be the "root" of the particular site.
You can add many more domains in the same way. Just ensure that all domain point to the same IP address at the domain registrar.
Default Domain: You can configure the IP address to show any of your domain. Click on Home (admin), select ‘default domain‘ and choose your domain to be the default.
Check Whether PHP is Working:
To check whether PHP is working on your website and what are its parameters, go to file manager, select the folder of your website, and create a file called "phpinfo.php". Edit that file and enter the following code:
php// Show all information, defaults to INFO_ALLphpinfo();// Show just the module information.// phpinfo(8) yields identical results.phpinfo(INFO_MODULES);?>
Now when you access your website_url/phpinfo.php, you should see a page giving the PHP information.
Add WordPress With SSH & Kloxo:
Adding WordPress with SSH involves 6 simple steps:
(i) Download WordPress tar file onto your webserver:
wget http://wordpress.org/latest.tar.gz
(ii) Unzip the WordPress tar file. It will itself unload the files onto a directory called "wordpress":
tar xzf latest.tar.gz
(iii) Go to the wordpress directory:
cd wordpress
(iv) Copy all the files from the wordpress directory to the folder created by Kloxo (see image)
cp -R * /home/admin/vps2.me
Make sure you have the correct directory information. Kloxo’s file manager will show you the directory path.
If you click the relevant folder, all the relevant wordpress files will be seen.
(v) Create a database with Kloxo
In Kloxo, click on the ‘home’ button and select the "PHPMyadmin" tab. In that create a database called "wordpress" or whatever name you fancy.
(vi) Begin WordPress Installation:
Now when you open your website url you will be greeted by a wordpress page prompting for information on your mysql database, password etc. Just fill in the information and your website will be ready to go.
Occasionally, the installer will be unable to create a configuration file. If that happens, just copy the code that wordpress shows you, create a file called wp-config.php and paste the code in it.
You can add wordpress to your other sites on the same server following the same procedure.
Change WordPress Permalinks:
For SEO purposes, you must change the permalinks to show the title of the post in the url. This is usually done through Settings > Permalinks.
However, this requires mod_rewrite rules to be inserted in the .htaccess file. So, just create a .htaccess file and add the following code in it.
mod_rewrite.c> RewriteEngine OnRewriteBase /ndex\.php$ - [L] RewriteCond %RewriteRule ^
i{REQUEST_FILENAME} !-fLENAME} !-d RewriteRule . /index.phRewriteCond %{REQUEST_F
Ip [L]
Now your permalinks will work.
If for some reason, you cannot create a .htaccess file, then simply enter the following under ‘custom structure’ in the permalinks settings:
/index.php/%year%/%monthnum%/%day%/%postname%/
With this your WordPress Blog on your own VPS running Centos is online.