Sunday, November 13, 2011

How to Install Drupal 7.9 on Ubuntu 11.10/11.04

Drupal is an open source CMS used by millions of applications and webmasters. This attraction to this script is due to the many features it has including thousands of add-on modules, designs, etc.

In this tutorial we will help you install the latest version of Drupal (currently 7.9) on a system running Ubuntu 11.10/11.04. Before starting, make sure your system has an Apache web server installed along with PHP and MySQL, you can find here a step-by-step tutorial explaining how to install LAMP on Ubuntu 11.10/11.04.

Drupal 7.9 Installation

1. Let's first install php5-gd required by Drupal with this command:

sudo apt-get install php5-gd

2. Download Drupal 7.9 and extract it to the /var/www/ folder with these commands:

sudo tar -xzvf drupal-7.9.tar.gz -C /var/www/
mv /var/www/drupal-7.9 /var/www/drupal

3. Assign ownership of Drupal files to the www-data user with this command:

sudo chown -R www-data.www-data /var/www/drupal/

4. You can create a config file of Apache for Drupal with these commands:

sudo su
cd /etc/apache2/sites-available
sed 's/www/www\/drupal/g' default > drupal

5. Enable now the Drupal website with these commands:

a2ensite drupal
sudo /etc/init.d/apache2 restart

6. Create now a MySQL database for drupal:

mysql -p
create database drupal;

7. Create a user with a password for this database with this command:

CREATE USER 'drupal'@'localhost' IDENTIFIED BY '123';

Replace 123 with any password of your choice.

8. Grant this user all privileges with this command:

grant all privileges on drupal.* to drupal@localhost;

9. You can now start the installation of Drupal via one of these two links:

10. Select Standard and click Save and continue:

11. English is selected by default, click Save and continue:

12. Submit now your MySQL details you have already created and click Save and continue:

13. Enter now your site information and click Save and continue:

14. Drupal is now installed on Ubuntu:

That's it!