How to Install drupal in localhost

Drupal is one of the best content management software for web site development. But you can install drupal in your local machines and test its working. To see how it works, follow the steps given below.

  • You must have mysql,php and apache installed in your machine.
  • Create a database for drupal usage in mysql
  • Download drupal.
  • If it is a drupal-x.x.tar.gz file, run the following command (Note that x.x corresponds to the version number)
    $ tar -xzf drupal-x.x.tar.gz
  • Rename drupal-x.x to drupal
    $ mv drupal-x.x drupal
  • Now find out the root directory of your Apache. The value will be present in httpd.conf
     DocumentRoot "/usr/local/apache2/htdocs" 
  • Now copy the drupal directory to the Document Root directory
    $ sudo cp -r drupal /usr/local/apache2/htdocs 
  • Now start apache
    $ sudo apachectl start 
  • Enter in your browser the following address “http://localhost/drupal”
  • If everything is fine, you will see a guided menu to install drupal in your machine.
  • Enter the database name, username and password for the database created.

You may have to change certain file permissions during the installation. Installing drupal locally is very useful for experimenting with drupal features

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s