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 https://drupal.org/project/drupal are by using any utility. Here we will be using wget in shell.
wget http://ftp.drupal.org/files/projects/drupal-x.x.tar.gz
You can replace x.x with the version you want to download. For example..
wget http://ftp.drupal.org/files/projects/drupal-7.22.tar.gzNow 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/local.mysite.com/docroot
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.
Comments
Post a Comment