Skip to main content

How to install and configure Drupal 7

Drupal 7 is an open source content management system platform to build websites.

System requirement
To install and run Drupal 7 application your system must have following things to be installed:

  • Web serverApache, Nginx, or Microsoft IIS.
  • PHPPHP 5.2.5 or higher (5.3 recommended).
  • Database: MySQL 5.0.15 or higher with PDO, PostgreSQL 8.3 or higher with PDO, SQLite 3.3.7 or higher.


Step 1: Download and extract Drupal
Download the latest version of Drupal 7 from there official website https://www.drupal.org/project/drupal

Extract the compressed file and paste that folder in your web root directory (for apache /var/www/).
Rename the folder with any name that would be your website name.

Step 2: Create the database
You must create an empty database before running the Drupal installation script.
You can create database by either PHPMyAdmin or MySql command line.
For PHPMyAdmin, it is very simple.

  • Login to your PHPMyAdmin as the root user.
  • Create database with some database name.
  • Make sure you select COLLATION utf8_general_ci.
For MySql:
  • use this command mysql -u username -p "CREATE DATABASE databasename CHARACTER SET utf8_general_ci;"

Step 3: Create settings.php
  • Go to your drupal directory and then /sites/default
  • Copy the default.settings.php and paste in the same directory then rename it as settings.php
  • Give permission to settings.php to read and write. Command sudo chmod 666 sites/default/settings.php
  • Give permission to sites/default directory to allow installation script to create files directory. Command  sudo chmod 666 sites/default

Step 4: Run the installation script
To run Drupal install script, go to your browser.
If you are running on your localhost then type in the browser url localhost/drupal_installation_name.

After this installation process will just start.
  • Select installation profile. There is generally two profiles that is standard and minimal. Standard profile comes with default content types enabled and also some useful collection of modules. Minimal profile is for the experienced developers who wish to create there own content types and modules. It has only three modules enabled that are Block, Database logging, and Update Status.
  • Choose language. 
  • Verify requirement. If there is any requirement problem then script will stop here and display errors. After resolving that errors you can continue the installation process.
  • Database configuration. Select database type (MySql, POSTgreSQL, or SQLite). Select databse name, database username and password (username and password could be your MySql credentials).
  • Click Save and Continue. 
  • After the installation completes, enter the site information.
  • In the Site Maintenance Account section, username and password is your site admin credentials. So remember it.
  • Click Save and Continue. 
  • After this step, your site will be ready to visit.

Step 5: Re-setting the permissions
After the Drupal install script has complete, you need to re-set the permission of settings.php and default directory again.
For settings.php, sudo chmod 644 sites/default/settings.php
For default directory, sudo chmod 755 sites/default


Step 6: Setting up cron
Setting up cron is an important step the installation of the website and assists in the maintenance of the site's assets for search results, checking for updates to Drupal core and modules, and removing temporary files.
For Reference: https://www.drupal.org/cron

Step 7: Configure clean URLs
By default, Drupal uses and generates URLs for your site's pages that look like "http://www.example.com/?q=node/83". With so-called clean URLs this would be displayed without the "?q=" as "http://www.example.com/node/83".
For Reference: https://www.drupal.org/getting-started/clean-urls






Comments

Popular posts from this blog

Use Case Diagram for Online Book Store

Occurrences of each letter of alphabet in the text

Program to print a table indicating the no. of occurrences of each letter of alphabet in the text entered as command line arguments. #include<iostream> #include<string> using namespace std; int main(int argc, char *argv[]) { string str=""; static int alphabet[26]; int x; cout<<"\n\n Command-Line Argument\n"; for(int i=0;i<argc;i++) { cout<<"\n "<<argv[i]; str+=argv[i]; } for(int i=0;i<str.length();i++) { if(str[i]>='A' && str[i]<='Z') { x=((int)str[i])-65; alphabet[x]++; } else if(str[i]>='a' && str[i]<='z') { x=((int)str[i])-97; alphabet[x]++; } } //Displaying No. of occurrences of each alphabets in the command line argument cout<<"\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n Alphabet No. of Occurrences\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; for(int i=0;i<26;i++)...

Linear search & Binary search using Template

Write a program to search an element from a list. Give user the option to perform Linear or Binary search. Use Template functions. #include<iostream> using namespace std; template <class T> void Lsearch(T *a, T item, int n) { int z=0; for(int i=0;i<n;i++) { if(a[i]== item) { z=1; cout<<"\n Item found at position = "<<i+1<<"\n\n"; } else if(z!=1) { z=0; } } if(z==0) cout<<"\n Item not found in the list\n\n"; } template <class T> void Bsearch(T *a, T item, int n) { int beg=0,end=n-1; int mid=beg+end/2; while((a[mid]!=item) && (n>0)) { if(item>a[mid]) beg=mid; else end=mid; mid=(beg+end)/2; n--; } if(a[mid]==item) cout<<"\n Item found at position = "<<mid+1<<"\n\n"; else cout<<"\n Item not found in the list\n\n"; } void main() { int iarr[10] = {2,42,56,86,87,99,323,546,767,886};...