Installing Drupaland Common Hurdles to Its Installation

Once your Web server is working, installing Drupal is usually a fairly easy task. You may encounter some small hurdles when setting up the CMS, but these can be overcome quickly. As we walk through the installation process, you will get to know some of them.

1. Download Drupal. Go to and select "Drupal 6" in the download section. Unpack it and copy the contents of the Zip file to your document root (or wherever you want Drupal to be located).

Hurdle 1

When copying the package, make absolutely sure that you also copy the .htac-cess file located in the Drupal root folder. It is required by Drupal, especially for clean URLs. Most operating systems tend to hide this file by default because it begins with a dot. To make sure you copy the file, you can either turn on the display of files of that type, move the entire folder that contains the Drupal root, or move the files from the command line.

2. Create a database. Drupal needs a database in which to store its data. Databases can be created via the command line, but it is easier to use graphical user interfaces such as phpMyAdmin for that purpose. XAMPP and MAMP already ship with phpMyAdmin preinstalled, and almost every shared hosting provider has it installed as well.

If you're prompted with a "collation," select something with UTF-8, as this is Drupal's default character set (it contains almost all known characters on earth). If you can't select a charset, Drupal will take care of that task later. You should note the username, password, and database name for Drupal's installation process.

3. Install Drupal. Once you have downloaded and extracted the Drupal files and created a database, you are ready to run Drupal's installer. This piece of software automatically creates all required database tables and sets some default settings. To launch the installer, navigate to the URL where your Drupal installation is reachable over your Web server (e.g., http://localhost, http:// localhost/drupal, or whatever you have chosen).

You'll be automatically redirected to the installer, which guides you through the whole installation process. If you prefer, you can install Drupal in another language, but that requires additional effort, as there are no translations supplied with the Drupal core package.

Hurdle 2

On most systems, you will see a warning message saying that you don't have enough permissions to write to a configuration file. The automatic installer requires you to copy the settings.default.php file in the /sites/default/ folder and to give PHP write permissions to that folder. The installer needs this permission because it writes the database configuration data to that file.

If you're on Windows, you will likely not see this warning. Windows uses a different rights management system.

On Mac OS X, navigate in the Finder to that folder, duplicate the file, and rename it to settings.php. Then select the "Get Info" item in the file's context menu (right-click or Ctrl-click). In the "Permissions" section of the info window, set all access permissions to "Read & Write." If the access permissions drop-down options are disabled, click on the lock icon to authenticate first.

On a Linux shell, navigate to your Drupal installation's root folder and type in the shell command chmod 777 sites/default/settings.php (this technique also works on Mac OS X).

When you're done installing Drupal, make absolutely sure to set the access rights to "read-only" to prevent attackers from being able to compromise your system. In Mac OS X, just set the drop-down option back to "read only"; on Linux systems, execute the same command, but with 644 instead of 777.

4. Perform site setup. After the Drupal installer managed to write the settings file to the disk and successfully set up the database, you will be presented with a page containing settings for the most important configuration options for your site, such as the site's name and the email address. You are also required to set up an administrator's account here. This account will always have all access rights. It is vital to keep the account data safe.

5. Perform the initial configuration. Once you're done setting up Drupal, you'll be automatically logged in to Drupal. When you are on the "Administer" main page (see Figure A.1), you will most likely see a little warning message at the top telling you that there are problems requiring your attention.

On the "Status report" page as shown in Figure A.2, you will see an overview of most of Drupal's dependencies and an indication as to whether they're met.

If you receive a "Configuration file" error message, you must change the access permissions. See the "Hurdle 2," which explains how to change these permissions.

The next thing that will most likely appear as problematic is the "Cron maintenance tasks" page. Cron is a piece of software that is well known from

FIGURE A.1 Administration home screen showing warning messages.

UNIX-based systems (Linux, Mac OS X); it allows scheduling of repeating tasks. (In Windows, the corresponding feature is the "Task Planner," which works differently). Drupal requires a task setup that calls the page http:// (where is the URL to your Drupal installation) regularly. This setup is needed for maintenance tasks, such as creating the search index or temp folder cleanups. When you're just running a development site on your local machine, you can skip this step (keep in mind that the search will not work correctly in this case!). Some hosting companies have an interface for creating cron tasks. If your hosting company does not, you can try dropping its help staff a nice email and asking for it.

The last item that is likely to bear a warning sign after installation is "File system." Drupal stores all files uploaded by users in a central files directory. To create this directory, create a folder named files in your Drupal installation's folder and set access permissions to read and write (see "Hurdle 2" for further instructions). Alternatively, you can create a folder with an arbitrary name, set


Home » Administer » Reports


Status report

o My account i' Create content v Administer

Here you can find a short overview of your site's parameters as well as any problems detected with your Installation. It may be useful to copy and paste this information into support requests filed on's support forums and project Issue queues.

0 Content management o Site building o Site configuration

Drupal 6.0-dev Access to update.php Protected

l> User management v Reports o Recent log entries o Top 'access denied'

errors o Top 'page not found'

errors o Available updates

¿¡) Configuration file Not protected

The directory sites/default Is not protected from modifications and poses a security risk. You must change the directory's permissions to be non-writable.

a Cron maintenance

Cron has not run. For more information, see the online handbook entry for configuring cron jobs. You can run cron manually.

- Status report o Help o Log out

Database updates Up to date a Drupal core update

/!\ No update data available " status

No information is available about potential new releases for currently installed modules and themes. To check for updates, you may need to run cron or you can check manually. Please note that checking for available updates can take a long time, so please be patient.

system Not writable

The directory sites/default/files does not exist. You may need to set the correct directory at the file system settings page or change the current directory's permissions so that it is writable.

GD library bundled (2.0.34 compatible}

y/ MySQL database 5.0.45

y/ PHP 5.2.5

Unicode library PHP Mbstrlng Extension

Update notifications Enabled

> Apache/2.2.4 (Unix) mod ssl/2.2.4 OpenSSl70.9.8g DAV/2 Web server



FIGURE A.2 Drupal's status report page.

its permissions, and change where Drupal stores its files by going to Administer, Site configuration, File system.

Was this article helpful?

0 0

Post a comment