Installing Drupal

Now that you have the underlying server components installed, you are ready to install Drupal. There are five basic steps associated with installing Drupal on your server, regardless of whether you are running your Drupal site on a Windows, OSX, Linux, or shared-hosting-based server.

1. Download the current Drupal installation package from http://drupal.org to your computer.

2. Decompress the Drupal installation package.

3. Copy the files to your web server's root directory.

4. Create the database that you will be using for your new Drupal web site.

5. Launch the Drupal installation script.

Downloading Drupal

Downloading Drupal is a simple matter of visiting www.drupal.org and picking the latest version and language (such as English or French) of Drupal to download from the homepage. Drupal version numbers change over time, but it is safe to pick the latest version listed on the homepage as the version to download, install, and configure.

To download Drupal, simply click on the homepage link for the latest version, which will take you to the main Drupal download page. On the main download page, click on the link associated with the latest version (for example, 7.0). The compressed file (tar.gz) will automatically download to your computer into the folder you have configured for receiving downloads from the Internet.

Decompressing the Drupal Installation Package

The file downloaded from Drupal.org is a compressed file that has all of the directories and files required to set up and run Drupal on your server. You will need to decompress the tar.gz file into its individual elements, either by double-clicking on the file (this works on OSX and Linux) or by opening the file in a decompression utility (for example, on Windows use a free utility like 7zip). Double-clicking on the file will result in a folder being created on your computer with all of the directories and files expanded to their original pre-compressed state.

■ Note Depending on your operating system and your setting for your operating systems file manager, you may or may not see the .htaccess file, as it is classified as a "hidden" file in Linux and OSX. This is a critical file and must be moved in the next step. If you do not see the .htaccess file, please update your file browser's settings to allow you to see hidden files before proceeding to the next step.

Moving the Drupal Distribution to the Root Directory of Your Web Server

The next step is to move the contents of the Drupal folder that you just decompressed in the previous step, to the "root" directory of your web server. If you are using XAMPP, the "root" directory is the folder marked as "htdocs" in the directory where XAMPP is installed. If you are installing Drupal on a hosted platform, the root directory will be that specified by your hosting company (for example, the hosting company that I use names the root directory "public_html"). You should check with your hosting company if you are unsure where to put your Drupal files).

With all of the files in place, you're ready to take the next step of creating the database.

Creating the settings.php File

Drupal uses a file named settings.php to store configuration parameters for your site, such as the name of the database and the userID and password used to access that database. Drupal ships with a default settings.php file that we will use as the starting point for our site's settings.php file. Navigate to the sites/default directory in the location where you copied the Drupal directories and files to in the previous step. In that directory you will find a default.settings.php file. Copy that file and rename the copied version to settings.php.

Next, set the permissions on the settings.php so that anyone can read and update the file. Drupal must have the ability to update this file during the update process. Check your operating systems directions for setting permissions if you're unsure on how to do this.

Creating the Drupal Database

Creating the database is a relatively simple process. If you are using XAMPP or a hosting provider, you should have access to the phpmyadmin administrators tool. To access the admin tool, visit http://localhost/xampp page. In the Tools section, you will see a link to "phpmyadmin." Please click on that link to launch the phpmyadmin administrator's page.

On this page, locate the text box that is right below the "Create new database" label. In this text box, type in a name that is easy for you to remember and is representative of what your web site is about (using this approach makes it easier in the future to figure out which database goes with which web site, especially when you have multiple Drupal sites running on your server). MySQL is extremely flexible, and you can name your databases anything that you wish; however, there are generally accepted standards that you may wish to follow:

• Only use lowercase characters.

• Separate words with underscores.

• Keep the database name shorter than 64 characters (a MySQL restriction).

For demonstration purposes, I have created a new database named "drupal7testsite." After entering the database name, click on the Create button. See Figure A-1.

Was this article helpful?

0 0

Post a comment