Installing Drupal 7 in Debian Environment

26
Drupal 7 Installation 101 For Linux/Ubuntu user By: Eleison Cruz Source: A comprehensive guide to Drupal installation in Debian Environment By Rovic Honrado

description

Installing Drupal 7 in Linux/Unbuntu OS

Transcript of Installing Drupal 7 in Debian Environment

Page 1: Installing Drupal 7 in Debian Environment

Drupal 7 Installation 101

For Linux/Ubuntu user

By: Eleison Cruz

Source: A comprehensive guide to Drupal installation in Debian Environment

By Rovic Honrado

Page 2: Installing Drupal 7 in Debian Environment

About MeAbout Me

Drupal Apprentice graduate batch 3

● Received Best Project award● 10 years veteran in branch

banking industry as Jr. Assistant Manager in BDO.

● Travel and Photography hobbyist.

Page 3: Installing Drupal 7 in Debian Environment

Why Linux/Ubuntu?

● Debian OS is “developer friendly” for any software development.

● Ubuntu softwares are all Open Source● Very minimal in system requirements● Highly secured computing. (viruses, access

privileges, etc..)● You look more geeky...

Page 4: Installing Drupal 7 in Debian Environment

Introducing the “Terminal”

Page 5: Installing Drupal 7 in Debian Environment

Introducing the “Terminal”For easy understanding, the terminal is the same

purpose with Windows command prompt.

But in Linux/Ubuntu terminal, is much more things you can do.

• Download softwares in pure command lines• Update your OS

• Process applications• Changing user's access

• … and many more

Page 6: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

● Download the latest Drupal 7 version. Up to this day, the version is 7.31.

● Always choose the recommended releases.● For Mac/Linux users choose .tar.gz, for Windows users

please choose .zip

Page 7: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

● Use your favorite arhival software such as 7-zip. Usually, the default Archival Manager is suffice for any compressed files.

Page 8: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Open now the Terminal.Type the following command (exclude the ~$)

~$ sudo apt-get update

Page 9: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

● For more secured computing, we will transfer the Drupal 7 installer to /var/www. Type the following command in the terminal:

~$ sudo mv /Downloads/drupal7 /var/www/

Page 10: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Now, download the latest PhP, Apache2, and MySQL Server:

~$ sudo apt-get install mysql-server-5.5 php5 php5-mysql php5-gd apache2 -y

For MySQL server access let us use:Username: root

Password: arellano

Page 11: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Configure virtual host to create fake domain for local machine web development. Type this again in your Terminal:

● ~$ sudo a2enmod rewrite

You can check to see if this worked by running:● ~$ sudo apache2ctl -M

Page 12: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Create dynamic virtual host in Apache HTTP with vhost_alias .

● ~$ sudo a2enmod vhost_alias

● To activate new configuration, run:

~$ sudo service apache2 restart

Page 13: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

● You will now setup the virtual host by creating the below configuration:

~$ sudo geany /etc/apache2/sites-available/drupal7.conf

*assuming your drupal installer was named “drupal 7”

Page 14: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

This will open to Geany IDE. Type the following:

<Virtualhost *:80>

ServerName dev.drupal7.com

DocumentRoot /var/www/drupal7

</Virtualhost>

Page 15: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Configure your localhost 127.0.1.1 to include your fake domain to listing, type in the Terminal:

● ~$ sudo geany /etc/hosts

This will open hosts file configuration. Add the following:

● 127.0.1.1 dev.drupal7.com

Page 16: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Enable now the Virtual Host configuration. Type it now once again in your Terminal:

~$ sudo a2ensite drupal7.conf

To activate now the new configuation:

~$ sudo service apache2 reload

Page 17: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Setting up MySQL Server

To access the MySQL server, type the following command:

~$ sudo mysql -u root -p

You will ask for your root password. If properly encoded, you should see the mysql>

Page 18: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Creating site database

mysql> create database drupal7;

mysql> show databases;

You should see now your newly created database name

mysql> exit

Page 19: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Preparing subfolders and settings.php

Shift to /var/www folder

~$ cd /var/www

● Create 'files' folder to drupal7/sites/default/

~$ sudo mkdir drupal7/sites/default/files

● Change 'files' directory permission to make it writable:

~$ sudo chmod 777 drupal7/sites/default/files

Page 20: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Preparing subfolders and settings.php● Copy and rename default.settings.php to settings.php

● ~$ cd drupal7/sites/default

● ~$ cp default.settings.php settings.php

● Change settings.php permission to make it writable:

~$ sudo chmod 777 settings.php

Page 21: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Setting up your first Drupal 7 site

Open up your browser and type it in URL locator your fake domain

dev.drupal7.com

Then follow step by step installation.

Page 22: Installing Drupal 7 in Debian Environment

Installing Drupal 7 in Ubuntu 14.04

Page 23: Installing Drupal 7 in Debian Environment

Recommended sources

Books

Using Drupal 7

By Angel Byron, Oreilly Media

Page 24: Installing Drupal 7 in Debian Environment

Recommended sources

Books

The Definitive Guide to Drupal 7

By Apress Media

Page 25: Installing Drupal 7 in Debian Environment

Recommended sources

Internet Sites

Drupal.org

Page 26: Installing Drupal 7 in Debian Environment

Thank You!!!

Next: Live Demo of Drupal 7 installation