Drupal is a free and robust content-management system which runs on LAMP(Linux, Apache, MySQL and PHP) server. PostgreSQL and MariaDB are also compatible with with Drupal.
Before start Drupal 7.0 installation, we have to install following packages related to LAMP. Here, I’m imagine that Ubuntu 10.04 is already installed 🙂
– A web server. Apache (version 2.0 or greater) is recommended.
i.e sudo apt-get install apache2
After installing apache2, go to your browser, put this link in address bar http://127.0.0.1 and check. If you see the message “it works” on the web page that means Apache is up and running.
– PHP 5.2.4 (or greater) (http://www.php.net/).
i.e sudo apt-get install php5
sudo apt-get install php5-mysql (MySQL Module for PHP)
– MySQL 5.0.15 (or greater) (http://www.mysql.com/).
i.e sudo apt-get install mysql-server-5.1
After installing MySQL 5.1, you must need to set password of root user and secure MySQL. For that you can run following utility for mysql.
After that create user and database for drupal.
shell>mysql -uroot -p
mysql>create database drupal;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupal.* TO ‘drupal_user’@’localhost’ IDENTIFIED BY ‘password’;
Initial packages are installed now so download drupal-7.0 version and extract the files.
tar -zxvf drupal-7.0.tar.gz
This will create a new directory drupal-7.0/ containing all Drupal files and directories. Then, to move the contents of that directory into a directory within your web server’s document directory. For ubuntu, it will be /var/www.
i.e mv drupal-7.0/ drupal-7.0/.htaccess /var/www/
Now, run the install script through browser. In browser, paste below link and it will start installation.
There are 6 steps to finish the installation.
1. Choose profile – select “standard “
2. Choose language – select “English”
3. Verify requirements
where it will check all requirements which are needed to install drupal-7.0. Most probably you will get following errors.
-> PHP extension (Disabled
) Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information):
For this install php5-gd package. (i.e apt-get install php5-gd)
-> missing files directory
For this create files directory under sites/default/ and give it required permissions.
i.e mkdir sites/default/files
chmod a+w sites/default/files
-> missing settings file
For this create settings.php file from the template and give it to required permissions.
i.e cp sites/default/default.settings.php sites/default/settings.php
chmod a+w sites/default/settings.php
****Don’t forget to change permission after installation from 666 to 744 for /files dir and settings.php
4. Set up database
Here, give the db name, user name and password for accessing drupal mysql DB. Also check advance options if needed.
5. Install Profile
where it will install the profile and setup all configurations.
6. Configure site
where we need to give the details of our website which we are going to deploy.
After this you will get the dashboard of drupal from where you will able to manage all the contents, appearance, configurations, users etc.