This blog post will guide you through how to setup your own web server, with a lovely fresh copy of Drupal on it. The first thing you will need is somewhere to host your web server, I have chosen VPS.net. Their servers start from as little as £15.
Step one - purchasing and provisioning a server
Purchase a dedicated or virtual server (vps). As I said I use VPS.net, they offer their servers in a series of ‘nodes’ (which is a little confusing when working with Drupal). A single ‘node’, which is 0.4Ghz CPU, 256MB RAM, 10GB storage and 250GB bandwidth, is more than enough for the average Drupal site.
When you go to setup your VPS with VPS.net you’ll need to choose where you want your server hosted, UK or USA. Then which operating you want, in this tutorial I will be using VPS.net’s cloud optimized Debian image.
Once you have setup your server you will be given the IP address and root password.
Step two - logging in and setting up server
Open up Terminal (or Cygwin on Windows) and login with the following command.
ssh [email protected]
(replace 22.214.171.124 with the IP address of your server.)
You will then be asked to enter your password, which would’ve been given to you on the VPS.net control panel.
Once logged in you can start installing Apache, PHP and MySQL.
apt-get install apache2
apt-get install php5 php5-cli php5-mysql
Install MySQL (and create root login)
apt-get install mysql-server
You will also need to allow your server to send email, to do this we’ll install postfix.
apt-get install postfix
The server is now ready for Drupal. If you navigate in your web browser you will see the words ‘it works!’. This shows that apache is running.
Step three - installing Drupal
There are many ways to download Drupal but for this tutorial I am going for the easy option.
Navigate to the web directory.
tar xvf drupal-6.14.tar.gz
mysql -u root -p
Create database drupal;
Create settings file.
cp default.settings.php settings.php
chmod 777 settings.php
chmod 777 files
Navigate to your IP address and follow the install instructions.
Use the code "DRUP25" to get 25% off at VPS.net.