Jaye Tan's Octopress Blog

Just Blogs

Installing Drupal Locally

Installing Drupal on Localhost

In order to run Drupal locally we must have a Server that runs Apache, Php and MySQL, for windows you can install software bundle called wamp for mac you can use mamp and for linux you can install lamp, but I recommend to install it individually, in my experience as a linux user installing a bundle package will cause you a lot of errors rather than installing it individually.

Installing Apache, PHP MySQL and PHPmyadmin for LINUX

Open terminal and type in these commands:

APACHE

sudo apt-get update sudo apt-get install apache2 to test if the apache is working browse http://localhost

MySQL sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql sudo mysql_install_db sudo /usr/bin/mysql_secure_installation prompt will appear asking for current password for root

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

for testing purposes I would recommend to not put password for root, a bunch of promt questions will follow along installation just type y to all.

PHP

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

PHPmyadmin

sudo apt-get install phpmyadmin

after you installed the Apache MySQL PHP and PHPmyadmin

download the drupal at https://drupal.org/download choose the .zip format and unzipped it after download to see the drupal folder use the terminal to move the drupal folder to var/www by typing sudo mv Downloads/Drupal-7.27 /var/www

Note: You may need to grant access to your /var/www folder to do this simply type the following:

sudo chmod -R 777 /var/www
sudo chown -R **yourusername** /var/www

Next thing you must do is to setup the database for your drupal, browse http://localhost/phpmyadmin and create a database for your drupal.

then browse http://localhost/drupal folder name ex. http://localhost/drupal-7.27 this will take you to the installation, just follow the instruction and you wil be able to install drupal.