Hi, I'm Tim Millwood. I am a Web Developer from Abergavenny, UK, and work for Mark Boulton Design, specializing in Drupal. This is my blog!
How to setup a server and install Drupal
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 root@123.123.123.123
(replace 123.123.123.123 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.
Install Apache2
apt-get install apache2
Install PHP5
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.
cd /var/www
Download Drupal.
wget http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz
Extract.
tar xvf drupal-6.14.tar.gz
Create database.
mysql -u root -p
Create database drupal;
exit;
Create settings file.
cd /var/www/sites/default
cp default.settings.php settings.php
chmod 777 settings.php
mkdir files
chmod 777 files
Navigate to your IP address and follow the install instructions.
Use the code "DRUP25" to get 25% off at VPS.net.











