Wednesday, July 3, 2013

Installing Drupal - On Lamp

Here we will see how to install Drupal on a LAMP environment. We can do it using two ways, one is downloading it manulay and other is install it using DRUSH.(We will see how to install drush in next sections.)

Downloading and Extracting Drupal 

You can download latest Drupal by going to are by using any utility. Here we will be using wget in shell.


You can replace x.x with the version you want to download. For example..

Now time to exteact the file you just downloaded.

tar -zxvf drupal-7.22.tar.gz

After extracting you can move files in drupal-7.22.tar.gz directory one level "up" into the web server's document root or your public HTML directory.

mv drupal-7.22/* /var/www/

NOTE: In your web server's configuration file the base URL for your Drupal installation will be set.

Creating Database and User 

You need to create an empty database and database user before running the installation script. You can do it using command line or using PHPMyAdmin user interface. You can use the following commands to create database and a user.

mysql -u root -proot

After logging in create database

create database database_name;

Then create a user for this database..

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

By now, newuser has no permissions to do anything with the databases. So to grant him permissions for a database we just created.

GRANT ALL ON database_name.* TO 'newuser'@'localhost';

And there you go.

No comments:

Post a Comment