Drupal 6.14, Introduction and Installation | WebReference

Drupal 6.14, Introduction and Installation

By Scott Clark


With all the great Open Source CMSes out there, it's getting hard to make a choice as to which one to use for your site. After looking into many such CMSes, I decided to make Drupal the primary CMS for developing websites for my clients. Drupal is open-source software that is distributed under the GPL ("GNU General Public License") and has a developer community comprised of thousands of users and developers.

Drupal provides developers with a database-driven CMS that comes "out-of-the-box" with many often-requested features. The community provides thousands of modules, which can be installed to provide additional functionality, along with thousands of free themes to make your site stand out. Third party paid themes are also available, as well as custom themes designed specifically for your site. With all this in mind, I decided to use Drupal for a site I am building for one of my clients. This article will walk you through the installation process and showcase some of the out-of-the-box features that make Drupal so popular.

The Drupal Pre-Installation Process

To begin the installation procedure, you will need to set up a MySQL database on your web host or development server. This is usually accomplished through the CPanel of your web host. It's a point-and-click process that only takes a couple minutes, and once it's set up, you will be provided with the information you'll need to install Drupal, including:

  • Database name
  • Host name
  • Port (usually 3306)
  • User name
  • Database password

Now it's time to get started with the Drupal installation process! You'll need to download the installation package from the Drupal News and Announcement page. Currently the latest fully-supported release is version 6.14 (there are two versions that are supported at this time: version 6.14 and version 5.20), and v 6.14 is the version that I am installing in this tutorial.

Once you've downloaded the installation package, you'll need to decompress it from the tar file (compressed file, similar to a zip file) into a directory on your local computer. You'll also need an FTP (File Transfer Protocol) program such as WS_FTP to move the files from your local computer to your web host. The uncompressed folder will contain seven subdirectories and quite a few files in the main directory. You'll move those files and subdirectories over to your site's main directory (assuming you want your entire site to use the Drupal CMS, rather than having a sub-section of your site using it). That process will take about 10-20 minutes, depending on your connection speed.

Once all the files have been moved over, you will need to edit a file that is located in the /sites/default/ directory, specifically a file named default.settings.php. In this file, you will find a line where the database information will need to be added, right around line 92. It looks like this:

You'll substitute the information you saved when you created your MySQL database as mentioned above. When it is edited, it will look something like this:

You will save the file as settings.php, and upload it to the /sites/default/ directory on your web host's server. Before we go any further, there are a few things that you will need to have on your server before you can begin. You will need a web server, obviously, and Drupal supports the use of Apache as well as Microsoft IIS. You will also need to have PHP installed on your server--PHP 5.2.x is recommended, but Drupal supports the use of PHP version 4.3.5 or higher. Now let's move on...

In order to begin the installation procedure, the settings file will need to be writable on your web server. You can either do this via a telnet or SSH command line by using the following command:

chmod 666 sites/default/settings.php

Or you can use your FTP client to select the file and change the file's permissions. It will need to be changed so that the site is writable by the Owner, Group and World (most FTP clients let you just put the permission code in and it automatically sets the permissions. The permission code you'll need is 666. Once the installation process has been completed, the Drupal installation process will change the permissions back automatically.

Getting the Drupal Ball Rolling

Now you will start the installation process through the Drupal browser-based wizard. You'll begin this process by visiting your site's main URL, such as"

https://www.yoursite.com/ 

It will ask you the language you wish to use for the installation process, and verify that your server is correctly set up for the installation to begin.

Figure 1

If you already made the changes to the settings.php file yourself as mentioned above, it will begin by setting up the database (in which it will set up the tables and data), and if you didn't, it will prompt you to enter the database information that we mentioned above (this saves you the process of manually editing the file yourself).

Once the database has been configured, it will prompt you to configure the site, as shown below:

Figure 2

This will allow you to enter basic information, such as the name of the site, the administrator's login name, password and email address, etc. This process will only take a couple of minutes and you will then be presented with the page shown below, which lets you know that the Drupal installation is complete. You will see a link where you can begin the meat of the process, which begins by visiting your new Drupal web site.

Figure 3

When you click the link entitled "your new site" you will be presented with a page which provides you links to the administration console, module list, themes section (and Drupal free themes download page), and a link that enables you to begin creating content for your site. That page looks like this:

Figure 4

Drupal Modules

Drupal comes with many essential modules preinstalled. Not all of them are enabled by default, so you will want to visit the module list initially to ensure that the most important modules are enabled. Those modules include a bunch of optional modules (modules that are not required for Drupal to function):

  • Aggregator - Aggregates syndicated content (RSS, RDF, and Atom feeds).
  • Blog - Enables keeping easily and regularly updated user web pages or blogs.
  • Blog API - Allows users to post content using applications that support XML-RPC blog APIs.
  • Book - Allows users to structure site pages in a hierarchy or outline.
  • Color - Allows the user to change the color scheme of certain themes.
  • Comment - Allows users to comment on and discuss published content.
  • Contact - Enables the use of both personal and site-wide contact forms.
  • Content translation - Allows content to be translated into different languages.
  • Database logging - Logs and records system events to the database.
  • Forum - Enables threaded discussions about general topics.
  • Help - Manages the display of online help.
  • Locale - Adds language-handling functionality and enables the translation of the user interface to languages other than English.
  • Menu - Allows administrators to customize the site navigation menu.
  • OpenID - Allows users to log into your site using OpenID.
  • Path - Allows users to rename URLs.
  • PHP filter - Allows embedded PHP code/snippets to be evaluated.
  • Ping - Alerts other sites when your site has been updated.
  • Poll - Allows your site to capture votes on different topics in the form of multiple-choice questions.
  • Profile - Supports configurable user profiles.
  • Search - Enables site-wide keyword searching.
  • Statistics - Logs access statistics for your site.
  • Syslog - Logs and records system events to syslog.
  • Taxonomy - Enables the categorization of content.
  • Throttle - Handles the auto-throttling mechanism, to control site congestion.
  • Tracker - Enables tracking of recent posts for users.
  • Trigger - Enables actions to be fired on certain system events, such as when new content is created.
  • Update status - Checks the status of available updates for Drupal and your installed modules and themes.
  • Upload - Allows users to upload and attach files to content.
  • Block - Controls the boxes that are displayed around the main content.
  • Filter - Handles the filtering of content in preparation for display.
  • Node - Allows content to be submitted to the site and displayed on pages.
  • System - Handles general site configuration for administrators.
  • User - Manages the user registration and login system.

Drupal Themes

Drupal also comes with six Themes out-of-the-box, which enables you to select a theme (which is the design and layout of your site) as the default theme. You can also enable several of those themes, so your site's members can select a different theme so the site looks different when they view it (this is something you can allow or deny your site's members the ability to choose). Here is what it looks like with the default Drupal theme selected:

Figure 5

You can also download many different themes free of charge from the Drupal Themes Download page. They have thousands of themes to choose from there, and there are many third party sites, which offer free Drupal themes as well. For my client's site, I selected a military theme, and installed it by downloading it, uncompressing it, and moving the theme files over to my web server into the theme directory. Then I went to the Drupal Administration panel, into the Themes section, enabled the Military theme, and selected it as the default theme. This is what it looked like after I did that:

Figure 6

Conclusion

Once your basic site is installed and set up, you can download additional modules and themes from the Drupal Download page, and can add content to your site including Polls, Blogs, Articles, Books and more. You can create User Roles so that some members have specific features or themes available to them, create actions that occur when members perform specific functions (such as registering, commenting on blogs or articles, etc.), and basically customize your site to your heart's content.

Drupal has so many features, and so many additional modules and themes available, that the possibilities are virtually limitless. The Drupal developer community is constantly adding new modules and themes, new functionality that enhances your website, that you can make your site function like a small business site, social networking site, personal site, blog site, corporate site or just about any type of site you can imagine.

In our next article we will discuss some of the additional modules you can't live without, how to assign user roles, and how to further customize your Drupal site. Until then, see you on the web!