Thursday, 26 May 2011

How to install DRUPAL 7 in ubuntu-steps


Drupal how to install guideThis guide describes all steps on how to install Drupal 7 on Ubuntu Linux using Apache web server and MySQL database. This guide assumes default installation of Apache web server and MySQL database.
These instructions can be also used by users using Debian or any other Debian based Linux systems.
All commands in below are executed with root privileges. If you are sudo user prefix all commands below with sudo.
Step 1: Prerequisites installation
# apt-get install php5-mysql apache2 \
mysql-server php5-gd

1. Step 2: Download and decompress Drupal install files

Download and extract all drupal files into /var/www/drupal directory:
# cd /var/www
Download and decompress Drupal 7 install files:
# wget http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz
# tar xvf drupal-7.0.tar.gz
# mv drupal-7.0/ drupal
Change owner of all Drupal 7 installation files to www-data ( apache webserver ):
# chown -R www-data.www-data /var/www/drupal/

2. Step 3: Configuring apache for Drupal

Create apache config file for a drupal website:
# cd /etc/apache2/sites-available
# sed 's/www/www\/drupal/g' default > drupal
Enable drupal site, disable default site and restart apache webserver:
# a2ensite drupal
# a2dissite default
# /etc/init.d/apache2 restart

3. Step 4: Create MySQL database for Drupal installation

In this step we will create a MySQL database to be used by our Drupal 7 website. By now you should have a MySQL server installed on your system as well as you should have a root password to access MySQL command line interface. Let's create:
  • Database: drupal7
  • User: drupal7
  • Password: drupal7-pass
# mysql -p
Enter password: 
mysql> create database drupal7;
Query OK, 1 row affected (0.00 sec)
 
mysql> CREATE USER 'drupal7'@'localhost' IDENTIFIED BY 'drupal7-pass';
Query OK, 0 rows affected (0.00 sec)
 
mysql> grant all privileges on drupal7.* to drupal7@localhost;
Query OK, 0 rows affected (0.00 sec)
 
mysql> quit
Bye

4. Step 5: Drupal 7 install

Everything should now be ready for actual Drupal 7 installation. From now on the installation using drupal7 installer is rather self explanatory. Navigate your browser to Apache's hostname or IP address and follow drupal 7 installer to complete drupal installation.

1 comment:

  1. i have an error in last step... is configuring the database..... what can i do?... i tried rightly...but wont able to install this... pls help me

    ReplyDelete