Installing Drupal

Drupal is one of the best open source CMS for developing websites. This tutorial will guide you through the details of developing your first Drupal website in an Ubuntu local web server environment using XAMPP.

Drupal’s requirements state that it works best with Apache server using PHP 5.2.x and MySQL. XAMPP offers a local web server environment using PHP and a MySQL database. If you do not have an XAMPP installation on your Ubuntu computer, it is suggested that you read this tutorial: http://www.devshed.com/c/a/Administration/How-to-Install-XAMPP-on-Ubuntu-Linux/

Download Drupal and Prepare the Installation Files

The latest Drupal installation files can be downloaded at the link. Look for the download link for the latest release. As of the time this tutorial was written, the latest release was Drupal 6.19.

What you will download is an archived tar file (e.g drupal-6.19.tar.gz). You will download this file to your Ubuntu Download folder.

Once you have downloaded the installation’s archived files, right click on it and “Extract here.” The folder will then be extracted. The folder should contain the following files (screen shot):

For simplicity, rename this folder to just drupal.

Copy and paste this folder to your XAMPP htdocs directory. Once drupal has been placed in your XAMPP htdocs directory, you will need to prepare the installation files.

Find the file named default.settings.php in the /sites/default folder. Open this script with your favorite PHP editor.

When it is open, do not do any code editing; just save it as settings.php. After this, go to your Ubuntu Terminal (Applications ==> Accessories ==> Terminal) and log in as root:

codex-m@codex-m-desktop:~$ sudo -s -H
[sudo] password for codex-m:
root@codex-m-desktop:/home/codex-m#

Go to your Drupal /sites/default directory by using cd (change directory) commands in Linux Terminal:

root@codex-m-desktop:/home/codex-m# cd /
root@codex-m-desktop:/# cd opt
root@codex-m-desktop:/opt# cd lampp
root@codex-m-desktop:/opt/lampp# cd htdocs
root@codex-m-desktop:/opt/lampp/htdocs# cd drupal
root@codex-m-desktop:/opt/lampp/htdocs/drupal# cd sites
root@codex-m-desktop:/opt/lampp/htdocs/drupal/sites# cd default
root@codex-m-desktop:/opt/lampp/htdocs/drupal/sites/default#

You need to change the permission of settings.php to 666:

root@codex-m-desktop:/opt/lampp/htdocs/drupal/sites/default# chmod 666 settings.php

And then when you view the files inside the /sites/default folder (using Linux ls command), you will now see two files in it (default.settings.php and settings.php):

root@codex-m-desktop:/opt/lampp/htdocs/drupal/sites/default# ls
default.settings.php  settings.php

Finally, exit as root in terminal:
root@codex-m-desktop:/opt/lampp/htdocs/drupal/sites/default# exit
exit

And then close the terminal window.

Create a MySQL Database for Your Drupal Installation

This time, you need to use your XAMPP phpMyAdmin to create a MySQL database for the Drupal installation. Go to the following URL using your web browser:

http://localhost/phpmyadmin

You will be asked for your XAMPP password (you have not yet reached your phpMyAdmin login credentials). In most cases, you can use:

username: lampp
password: [your own password created during XAMPP installation]

After a successful authentication, you will then see the phpMyAdmin login page. Enter your root MySQL/phpMyAdmin username and password. In most cases, this will be:

username: root
password: [your MySQL root password]

Under “MySQL localhost,” enter a name you like for your drupal database, for example:

The name of the database will be drupaldatabase. Click “Create” to create this database, and do not yet create a table. Drupal will automatically create this during installation.

So what you should do is log out from phpMyAdmin. Note your Drupal database details, for example (you will need this later on in the installation stage):

Database name: drupaldatabase
Database username: root
Database password: [your root MySQL password]
Database hostname: localhost

{mospagebreak title=Install Drupal in Your XAMPP Local Host Environment}

Now that all of the preparation has been completed, you are ready to install the Drupal files onto your XAMPP localhost. To do this, follow the steps below.

  1. Using web browser, go to this URL: http://localhost/drupal/

  2. You are then required to select a language (clicking “Install Drupal in English” will work in most cases).

  3. Drupal will then ask you for the database configuration details. Use the information you prepared earlier and select mysqli for the database type if you are using MySQL. When this is done, click “Save and Continue.”

  4. Drupal will then ask you to configure your site.

This is an important step, and it is recommended that you take note and write down the username and password you have used, because you will be using this when logging in to your Drupal website after installation.

Change the site name from “localhost” to something you are going to use for your Drupal website. The site name in our example will be CodexM Travel Agency and Tours.

Another important thing that you should enable is the “Clean URLs:.” They will make your website SEO- and user-friendly, because they let you use keywords in the URL, which makes it easy for visitors and search engines to understand what the content is all about just by looking at the URLs.

Note that in order for this to work, your web server should support mod rewrite, which is done in Apache. This is not a problem with XAMPP, as it uses Apache by default. If you consider uploading your website to an IIS web server, however, make sure the web server has the correct modules for rewriting the URLs.

It is important to check the “Check for updates automatically.” When everything is done, click “Save and Continue.”

Since you are installing Drupal in the local host environment, Drupal will be unable to send an email. This is normal and you can ignore this error. If you can see the message: “Congratulations, Drupal has been successfully installed,” then you are ready to edit and customize your Drupal website according to your design.

To get started, click the “your new site” link.

What you will see is the front page of your Drupal website, which should look like the screen shot below:

Note that this looks different if you log out from your website. Try clicking the log out link at the bottom of your website; the sidebar navigation will be replaced with a login menu.

Administering Your Drupal Website

Now that you have logged out from your Drupal website, try logging in again using the username and password you created during the Drupal installation process.

Two of the most important administration skills you should have are working with templates and adding new content. Under the sidebar navigation of your new Drupal website, you should see a link named “Administer” and “Create Content.”

“Administer” will be used to change the templates and perform detailed administration tasks. “Create Content” will be used to add new content to your Drupal website.

Drupal content is categorized into two types. They are Page and Story. The distinction between the two is very simple. “Page” will not allow comments from your users, whereas “story” allows user-related comments. You can use “story” if you are adding a blog entry, and use “page” if you are adding a static page in your website such as “Contact,” “About Us” or “Frequently Asked Questions.”

In the second part of this tutorial, you will learn how to work with Drupal themes and templates as well as start customizing your Drupal content according to some development/design related criteria.

[gp-comments width="770" linklove="off" ]

chat sex hikayeleri Ensest hikaye