NOTE: We are currently revising this article. Please bear with us as we modify the content below for improvement.
Content Management Systems (CMS’s) are all the rage these days because of their unique ability to manage and deliver so many different types of media. The ability to create community-based websites with permission-based access and the ability to dynamically deliver different media formats and content can allow users to easily develop websites, online communities or internal intranets in a matter of minutes. Drupal, winner of dozens of open-source application awards, is one of the best and most popular Content Management Systems available today. The basic installation allows users to create online blogs, forums, wikis, books and newsletters, all of which can be privately managed by individuals or groups depending on how you set up the available permissions levels.
Of course, Drupal installs are fully supported on GoGrid. So, before you jump in and install Drupal, be sure that you have a GoGrid account set up. If you simply want to give Drupal a try within a Cloud Hosting environment, then with a new GoGrid account, you could create a GoGrid server in a few minutes and then spend the rest of your time (after the 15 minutes of setup) getting to know Drupal. Once you get your Drupal install dialed in, you might want to keep it so GoGrid makes it easy with pay-as-you-go billing and volume pricing as well. If you just wanted to test out your install skills and simply play around with Drupal on GoGrid, you can delete your cloud server(s) and use GoGrid for something else. It’s your call.
To start, simply deploy a GoGrid server through the http://my.gogrid.com customer portal. In this example, we’ll use a RHEL 4.5-based LAMP stack since it has all the software packages needed for a Drupal installation already installed.
- Click on the “+” button once you’ve logged in, then select “Web/App Server”. Enter a friendly name for your server, such as “Drupal” or the domain name you’ll use once your server is configured. Enter a quick description of the server and select an IP address (our new IP suggest function will suggest one automatically for you). If you already have a GoGrid server instance that runs your website and you want to install Drupal in a sub-directory or sub-domain, skip down to the second half of this article.
- Next, select the operating system to run your Drupal installation on. Drupal can run on either Windows or Linux machines, but in this example we’ll use a Linux-based RHEL 4.5 server image. Please note that Drupal will not run on MSSQL, so using a Linux-based distribution is easier to manage out of the box. If you wish to run Drupal on a Windows server, you will have to manually install PHP 4 or 5 with MySQL or PostgreSQL to run alongside IIS.
- Select the amount of RAM dedicated to your server. Depending on the amount of traffic you’re expecting, you may want to allocate a good amount of RAM to your server. I’m choosing to go with a 1GB server.
- Select the server image you want to deploy. In this case, I’ll be using a LAMP stack. (For Windows servers, you may want to select a Windows 2003-based operating systems with IIS and MSSQL Express installed on the server image, then install PHP and MySQL or PostgreSQL.)
- Click on “Save” and your server will be deployed within a matter of minutes.
- Once your server’s light turns green, click on the new Drupal server and then select the “Passwords” button at the left. This will take you to the login information for your server.
Now that a server has been deployed, you can go ahead and connect to it remotely via SSH. If you work on a Windows machine, you can download the PuTTY client to connect to a Linux Server. If you’re on a Mac or a Linux machine, you can open your terminal and SSH directly to the IP address of the new GoGrid server.
- SSH to the new server and log in using the username and password credentials located on the “Passwords” page in the GoGrid portal. In my examples, I will use the IP address 188.8.131.52. Replace this IP address throughout this document with the IP of the server you just deployed:
Enter your username and password to log in.
- Navigate to the folder where you want the Drupal installation to live. In a Linux server, this is usually in /var/www/html. If you want to install this as a subdirectory of your website, create the directory and change directories to that folder (/var/www/html/your.subdirectory).
- Now you need to download the Drupal package from drupal.org:
- Once the package has finished installing, you’ll need to un-archive it:
tar -xzf drupal-6.3.tar.gz
- A new directory called “drupal-6.3” should appear when you enter the command ls to show the contents of your current directory. Now we’ll need to create the MySQL database associated with Drupal. Enter the MySQL prompt and create a new database and user for the Drupal installation. Note that you should create more securely named username, password and databases than I have below. These are just examples:
mysql -u drupaladmin -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 Server version: 5.0.58 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE drupal; Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON drupal.* TO "drupaladmin"@"localhost" -> IDENTIFIED BY "abcd1234"; Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec)
mysql> EXIT Bye
- You will need to modify a few files on the standard Drupal installation before proceeding with the installation. Change directories to the /sites/default directory from the root Drupal installation:
Now create a copy of the default.settings.php file to settings.php:
cp default.settings.php settings.php
Modify the file so that it is writeable from the Drupal installation:
chmod 766 settings.php
Create a directory called files and modify it so that it is writeable by the Drupal installation:
mkdir files chmod 766 files/
- Now, the rest is quite simple. Open a web browser and navigate to the directory where you installed Drupal. In this example, the directory is in the root web directory, so all I have to do is navigate to my IP address (or host name if DNS records have been properly set up), and presto! The install page should appear. If it does not appear, append the URL with /install.php.
- Follow the on-screen instructions by selecting your language and entering your database credentials. After clicking on “Save and Continue”, you should see a progress bar for only a few moments before being brought to the following screen:
- At this point, you will need to change the permissions on the files directory and on settings.php so that they are not writeable any more. You may also want to delete the file default.settings.php or move it out of your web directory entirely for security reasons:
chmod 644 settings.php chmod 644 files/ rm –rf default.settings.php
Also make sure to move or rename the install.php file in the root Drupal installation directory. Refresh the page and all the red warning box will turn to green.
- Click “Save and Continue” and you will be brought to the site configuration screen. Here you can enter the name of your website and create your admin user account. Be sure to pick a secure password with at least one number, one upper-case letter and at least 7 characters long. Random passwords are always the most secure and there are several random password generators all over the web. Configure you time and date settings and follow the remainder of the on-screen instructions before hitting “Save and Continue”. It may take a few minutes for the installation to complete, so be sure not to refresh during the installation process.
That’s it! You should be brought to the welcome page where you can click on links to the admin page or online docs. You can login and start posting content immediately. Download, modify and design your own skins (Drupal even has a skin API!), add extensions and plugins from http://drupal.org and setup users and permissions. There are literally hundreds of extensions and plugins you can install to host MP3’s, Flash movies or anything else imaginable.
Drupal is one of the best community portals available and is a great PHP-based option for beginners to get their hands dirty in PHP. The user-interface is intuitive and robust, allowing admins to set up user-roles and permissions for nearly every function that can be performed by the software. This is especially useful as a company intranet or as a community page for your customers to access support materials. And installing on a GoGrid Cloud server allows you to simply delete your server if you make a mistake and start over within minutes or just give Drupal a test run.
Also be sure to check out our “How to Install WordPress on a GoGrid Server in Less Than 10 Minutes” and “How to Install phpBB on a GoGrid Cloud Server in Less Than 10 Minutes“. You could have a Drupal CMS, a WordPress Blog and a phpBB forum up and running in less than an hour!