A Comprehensive Guide to Drupal Installation in Debian-based Systems
By Rovic Honrado
Drupal from Scratch
A Comprehensive Guide to Drupal Installation in Debian-based
Systems
Pre-requisite:
 Pre-installed de...
The Drupal Core…
 To install the latest version of Drupal,
go to drupal.org/project/drupal.
Download Drupal Core recommen...
 3. Download PHP5, Apache2 & MySQL Server to
prepare your local machine for Drupal installation.
a. Open Terminal, type b...
d. After setting up of your local machine, configure
virtual host to create fake domain for local
machine web development:...
e. Create dynamic virtual hosts in Apache HTTP
with vhost_alias.
This module creates dynamically configured virtual
hosts,...
f. You will now setup your Virtual Host by creating
the below configuration:
~$ sudo gedit /etc/apache2/sites-available/de...
g. Configure your localhost 127.0.1.1 to include
your fake domain to listing:
~$ sudo gedit /etc/hosts
Note: select what t...
Congratulations!!!
Your local machine is
now ready for Drupal!
Hmm..What’s Next?
Setting up your MySQL
Server
1. To access MySQL server, run the following command:
~$ sudo mysql -u root -p
You will be as...
3. To check if you have successfully created your
database, run:
mysql> show databases;
+------------------------------+
|...
Congratulations!!!
You have now
successfully setup
your site database!
Hmm..What’s Next?
Caution!
Errors such as PDO, GD, missing
‘files’
directory, no settings.php, sometimes
give us little frustrations on our ...
PREPARING REQUIRED DRUPAL SUB-FOLDER
AND SETTINGS.PHP FOR SMOOTH
INSTALLATION
Drupal installation requires 'files' directo...
2. Copy and rename default.settings.php to settings.php
and save it to /drupal/sites/default directory. Run:
~$ cp drupal/...
SETTING UP YOUR FIRST DRUPAL SITE
1. Open your browser and type your fake domain. ex.
dev.drupaltraining.org
2. You will b...
e. Install profile
- Drupal installation will now start, including 28
core modules
f. Configure site
- Type site informati...
Modules to install:
To install contributed modules, you need to create
'contrib' directory under /drupal/sites/all/modules...
Thank You!!!
Upcoming SlideShare
Loading in …5
×

Drupal from scratch

2,782
-1

Published on

2 Comments
1 Like
Statistics
Notes
No Downloads
Views
Total Views
2,782
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
2
Likes
1
Embeds 0
No embeds

No notes for slide

Drupal from scratch

  1. 1. A Comprehensive Guide to Drupal Installation in Debian-based Systems By Rovic Honrado
  2. 2. Drupal from Scratch A Comprehensive Guide to Drupal Installation in Debian-based Systems Pre-requisite:  Pre-installed debian-based system such as Linux Mint, Ubuntu  If running with Windows OS, should have VMWare that has debian-based system Training Objectives:  To be able to install the latest Drupal Core into the system using command lines smoothly (Geek Mode )  To be able to install and setup you very own virtual servers, MySQL database and latest PHP programming language  To be able to create fake domains instead of ‘localhost’ on your browser  You will learn how to setup your very own Drupal Site!!!
  3. 3. The Drupal Core…  To install the latest version of Drupal, go to drupal.org/project/drupal. Download Drupal Core recommended release – drupal-7.22.zip - https://drupal.org/project/drupal  Extract to your preferred folder, ex. /home/user/. Rename the extracted folder to any name you like.
  4. 4.  3. Download PHP5, Apache2 & MySQL Server to prepare your local machine for Drupal installation. a. Open Terminal, type below command to update current OS version, this will avoid ‘Failed to fetch’ error: ~$ sudo apt-get update b. Then install the following: ~$ sudo apt-get install mysql-server-5.5 php5 php5-mysql php5-gd apache2 -y - include -y to your command to force decide as yes for installation then press Enter You will be prompt to set your MySQL root password. For training purposes, just set your password to 'root'. Then re-enter set password. Installation will proceed.
  5. 5. d. After setting up of your local machine, configure virtual host to create fake domain for local machine web development: Enable the rewrite module for apache with this command; this will setup Clean URLs with Apache2 on your system: ~$ sudo a2enmod rewrite You can check to see if this worked by running: ~$ sudo apache2ctl -M
  6. 6. e. Create dynamic virtual hosts in Apache HTTP with vhost_alias. This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be used as part of the pathname to determine what files to serve. Exactly what you need. ~$ sudo a2enmod vhost_alias f. To activate new configuration, run: ~$ sudo service apache2 restart
  7. 7. f. You will now setup your Virtual Host by creating the below configuration: ~$ sudo gedit /etc/apache2/sites-available/default Note: select what text editor is installed in your system (gedit, pluma, geany) and replace the above command. You can change 'default' to any virtual host you prefer. ex. drupaltraining. This will open text editor to set virtual host configuration. Type the following: <Virtualhost *:80> ServerName dev.drupaltraining.org DocumentRoot /home/user/drupal </Virtualhost> note: For the DocumentRoot, provide the directory path of your extracted drupal files. Ex.
  8. 8. g. Configure your localhost 127.0.1.1 to include your fake domain to listing: ~$ sudo gedit /etc/hosts Note: select what text editor is installed in your system (gedit, pluma, geany) and replace the above command. This will open hosts file configuration. Include your fake domain in host listing: 127.0.0.1 localhost 127.0.1.1 ubuntu.ubuntu-domain ubuntu 127.0.1.1 dev.drupaltraining.org h. Enable Virtual Host configuration. ~$ sudo a2ensite drupaltraining To activate new configuration, run: ~$ sudo service apache2 reload
  9. 9. Congratulations!!! Your local machine is now ready for Drupal! Hmm..What’s Next?
  10. 10. Setting up your MySQL Server 1. To access MySQL server, run the following command: ~$ sudo mysql -u root -p You will be asked for your root password, type your password that you set during installation, ex. 'root'. When you see mysql>, it means that you have successfully accessed your MySQL server. 2. Create your site database. You can create any database name you want. For training purposes, I created drupaltraining database. Type the below command: mysql> create database drupaltraining;
  11. 11. 3. To check if you have successfully created your database, run: mysql> show databases; +------------------------------+ | Database | +------------------------------+ | information_schema | | d7 | | drupaltraining | | mysql | | performance_schema | +------------------------------+ 5 rows in set (0.37 sec) 4. Type exit to go back to command prompt.
  12. 12. Congratulations!!! You have now successfully setup your site database! Hmm..What’s Next?
  13. 13. Caution! Errors such as PDO, GD, missing ‘files’ directory, no settings.php, sometimes give us little frustrations on our first Installation attempt. To prevent this, we will prepare our system to correct these before Bugging us.
  14. 14. PREPARING REQUIRED DRUPAL SUB-FOLDER AND SETTINGS.PHP FOR SMOOTH INSTALLATION Drupal installation requires 'files' directory under /drupal/sites/default/ 1. To create 'files' directory under /drupal/sites/default/, run: ~$ mkdir ~/drupal/sites/default/files Change 'files' directory permission to make it writable by running below command: ~$ sudo chmod 777 ~/drupal/sites/default/files
  15. 15. 2. Copy and rename default.settings.php to settings.php and save it to /drupal/sites/default directory. Run: ~$ cp drupal/sites/default/default.settings.php drupal/sites/default/settings.php 3. Change settings.php permission to make it writable, run: ~$ sudo chmod 777 drupal/sites/default/settings.php Congratulations! You’re almost there! You already eliminated the errors that will block you from creating awesome websites.
  16. 16. SETTING UP YOUR FIRST DRUPAL SITE 1. Open your browser and type your fake domain. ex. dev.drupaltraining.org 2. You will be redirected to dev.drupaltraining.org/install.php 3. Follow step by step installation. a. Choose profile - Standard b. Choose language - Default c. Verify requirements. With all error-free preparation, this will run smoothly
  17. 17. e. Install profile - Drupal installation will now start, including 28 core modules f. Configure site - Type site information like Site name, site email address, username, user email address, password, server settings - Uncheck 'Check for updates automatically’ - Save and continue Congratulations! You can now view your new site!
  18. 18. Modules to install: To install contributed modules, you need to create 'contrib' directory under /drupal/sites/all/modules/. To create directory using command line, type: ~$ mkdir drupal/sites/all/modules/contrib Download the following modules and extract to contrib directory, not complete but essential: - admin - feeds - pathauto - ckeditor - feeds - token - ctools - features - views - devel - library - views_slideshow - eva - module_filter
  19. 19. Thank You!!!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×