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
Go to your Drupal /sites/default directory by using cd (change directory) commands in Linux Terminal:
root@codex-m-desktop:/home/codex-m# cd /
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):
Finally, exit as root in terminal:
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:
You will be asked for your XAMPP password (you have not yet reached your phpMyAdmin login credentials). In most cases, you can use:
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:
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
blog comments powered by Disqus