SlideShare a Scribd company logo
1 of 52
Download to read offline
Configure your own local development environment and some useful tools
Local Development Environments
Luis Rodriguez
luis@iterate.ie
Open Days Dublin 2015
Contents
1. Drupal & Hosting Environments
3. Install & Configure Tools
2. Install & Configure XAMPP
I will cover 4 main topics on this presentation:
4. Virtualisation
1. Drupal & Hosting Environments
What is Drupal
Drupal is a content management system which allows you to create and
maintain many different types of websites without needing to know any coding
languages.
Drupal & Hosting Environments
What do you need to run Drupal
• Drupal is PHP based CMS so you will need a web server to interpret the PHP
language.
• PHP is a server side language, this mean you cannot write PHP and see the
results without a web server.
• HTML or JavaScript for example are browser side languages so you will only
need a browser to see the results.
Drupal & Hosting Environments
Wikipedia: “A web server is an information technology that processes requests
via HTTP, the basic network protocol used to distribute information.”
Drupal & Hosting Environments
Web Servers
Local Web Servers: XAMPP
Application with all the necessary tools for Drupal.
Software package with Apache web server, MySQL
database, PHP and Perl programming languages.



www.apachefriends.org
Local Web Servers: Virtualisation
Recreate in your own computer with a virtual
machine a real hosting environment and install all
the necessary software inside that machine to run
your Drupal
A local server is a server working in your own machine, so you won’t need
internet or any network to do your development.
Drupal & Hosting Environments
Web Servers - Local
With a Remote server you will need connection to internet to do your
development and extra software to upload your code like Git or FTP.
Managed Drupal Servers
There are a couple of Drupal focused managed
servers, so they are specially configured to run
Drupal.
Aberdeen, Acquia, feistilbox, Pantheon.
VPS or Traditional Hosting
Then you can find many Hosting companies and
offers over internet, even free hosting.
Those hosting are non managed so you will have to
manage any extra installation or configuration.
Drupal & Hosting Environments
Web Servers - Remote
Drupal requirements
• Web server: Apache, Nginx, or Microsoft IIS
• Database: MySQL 5.5.3/MariaDB/Percona/equivalent or higher with PDO and
an InnoDB-compatible primary storage engine, PostgreSQL 8.3 or higher with
PDO, SQLite 3.3.7 or higher
• PHP: PHP 5.4.5 or higher
Drupal & Hosting Environments
2. Install & Configure XAMPP
• We are going to install the XAMPP application so we won’t have to deal with
extra configurations.
• To download your XAMPP go to:
https://www.apachefriends.org/download.html
Install & Configure XAMPP
Get XAMPP
Choose and download the correct version depending on your computer and OS
Install & Configure XAMPP
XAMPP - Choose your version
XAMPP - Installation
• Run the application and the installation wizard will launch.
• Follow the on screen steps, there is no need for extra configuration here.
Install & Configure XAMPP
XAMPP - First Look
• Now you’ve installed your local web server.
• The first “Welcome” screen will allow you to “Go To your Application”, visit
some links with configurations steps and “Open Application Folder”
Install & Configure XAMPP
XAMPP - Application Folder
• In your Applications Folder you will find all the configuration files, but we don’t
have to modify anything here, just go to “htdocs” folder.
• You can create an Alias or Link to this folder for an easy access.

Here we are going to create our project folder, “drupal-8”.
Install & Configure XAMPP
XAMPP - Download Drupal
Now we will need to download a new Drupal instance to our project folder.
Install & Configure XAMPP
XAMPP - Start MySQL
Now we will need to Start the MySQL server and create a database for our project.
Go to the XAMPP application and “Start” the MySQL Database.
Install & Configure XAMPP
XAMPP - Create Database
In a browser go to: http://localhost/phpmyadmin
And create the database with “drupal_8” name
Install & Configure XAMPP
XAMPP - Drupal Installation
• Now with the Apache and MySQL servers running you are ready to install Drupal.
• In a browser go to http://localhost/drupal-8
• And there you have your Drupal 8 installation wizard.
Install & Configure XAMPP
XAMPP - Drupal Installation
• Follow the screen instruction and you will have a Drupal 8 installation.
• You will need to create a files folder and copy the default configuration files.
• Don’t forget to make these files and folder writable for everyone.
• The database configuration will be:
Install & Configure XAMPP
XAMPP - Demo
Demo Time ??
Install & Configure XAMPP
3. Install & Configure Tools
Git
• Wikipedia: “Git is a distributed revision control system with an emphasis on
speed, data integrity, and support for distributed, non-linear workflows.”
Install & Configure Tools
• In my own words git allows you to work in a team creating code for the same
project at the same time. For local development Git will keep track and a backup
of your code so you could go back and have always a copy of your code if you use
a web repository like gitHub or bitBucket.
Git - Installation
• To install Git go to the download section of the website: 

http://git-scm.com/downloads
• For Windows I would recommend to install https://msysgit.github.io/

It’ll come with extra command line tools and commands and a GUI
Install & Configure Tools
Git - Commands
Install & Configure Tools
git init
With this command you will create a local repository
in your system.
This will create the hidden .git folder with all the
information.
e.g. git init
git add
With this command you add untracked files to the
commit files list so in the next commit they will be
added to the repository.



e.g. git add —all
git commit
With this command you will add to the
repository all the added-to-commit files.
You will be asked to input a commit message,



e.g. git commit
git clone
With this command you will clone an existing
repository into your system.
It will copy all the files from the repository into your
specified folder.
e.g. git clone https://github.com/computerminds/parrot.git parrot
Git - Commands
Install & Configure Tools
git push
If your repository is pointing to a server like github
or bitbucket this command will send the latest
commits to the server.
e.g. git push origin master
git branch
With this command you can create different
branches for different developments.
So you can keep working but have some code not in
production.


e.g. git branch my-branch master
git checkout
With this command you will change the active
branch you are watching.
By default git creates the master branch.


e.g. git checkout my-branch
git pull
If your repository is pointing to a server like github
or bitbucket this command will get the latest
commits from the server.
e.g. git pull origin master
Drush
“Drush is a command line shell and Unix scripting interface for Drupal. Drush core
ships with lots of useful commands for interacting with code like modules/themes/
profiles.”
Install & Configure Tools
Drush allows you to run lots of Drupal configuration
tasks and commands form one place, so you can
download and install a module in 2 simple commands.
Drush - Installation
• For Mac I would recommend a Homebrew install of Drush, so you just need to run:

> brew install drush
Install & Configure Tools
• For Windows I would recommend the prepared packages. 

http://www.drush.org/en/master/install/#windows-zip-package
• For Linux I would recommend the default package manager: 

> apt-get install drush
• In order to user drush on your Drupal installation you need to open a console and
go to your Drupal installation folder or subfolders.
• You will need Drush 7.x to make it work with Drupal 8.
Drush - Commands
Install & Configure Tools
drush status
With this command you will get all the information
of your Drupal installation like the version of your
Drupal, the theme or the path to some directories.
drush en / dis
With this command you will enable or disable an
already download module, it is very useful if the
module has dependencies as it prompts you a
message to download them.
e.g. drush en project
drush updatedb
With this command you will run the update.php
script just from the terminal.
And you will be prompted to accept if there are
database updates.
drush dl
With this command you will download into the
modules folder the desired project.
It will automatically choose the latest stable version
of the project. You could choose your own option
with: > drush dl —option project
sass
• Wikipedia: “Sass is a scripting language that is interpreted into Cascading Style
Sheets (CSS).”
Install & Configure Tools
• sass need to be compiled to produce the final CSS you will use on your website.

But there are a couple of free / open source applications you can use in Windows
and Mac to create your sass projects.
sass allows you to create your CSS in a more reusable
way so you could define variables and parts of code
called mixing you can reuse all over your CSS.
sass - Installation
• I will use an application called scout for this demo, it is available for Mac and
Windows here: http://mhs.github.io/scout-app/
Install & Configure Tools
• You could find more applications to download here: 

http://sass-lang.com/install
• The installation is very simple and you just have to follow the screen steps.

Then you will have the application and you are ready to create your first sass
project.
• For this presentation I’m going to create two folders on my themes folder.

One called “scss” for the sass files and the other “css” for the compiled files.
sass - Installation
• We will have to create a new project and select our drupal-8 theme folder as the
base.
• Then we will have to define “scss” as the Input folder and “css” as the output
folder.
Install & Configure Tools
sass - Installation
Once those two folder are created I’ve added a global.css file into my “scss” folder
and now, with scout running, every change on this file will automatically be
compiled into global.css at “css” folder.
Install & Configure Tools
4. Virtualisation
Wikipedia: “In computing, virtualisation refers to the act of creating a virtual
(rather than actual) version of something, including (but not limited to) a virtual
computer hardware platform, operating system (OS), storage device, or computer
network resources.”
Virtualisation
Definition
Virtualisation
• This mean create logical “fake” resources from the real hardware resources.

For us virtualisation will be create a false(Virtual) machine to run inside all the
necessary software for our development, so will include a web server, a database
server, PHP and any extra needed software.
• This is an advantage because you can reproduce 100% what you will have on your
production environment, so you could test locally what would be the behaviour of
your website. Avoiding problems like “It works on my machine”
Definition
Virtualisation
I use VirtualBox as my virtualisation software because it is GNU General Public
License (GPL) version 2 and there are lots of tools to use with it.
https://www.virtualbox.org/
VirtualBox
Virtualisation
I use Vagrant to provision my VirtualBox machine so I don’t have to care about
configuration.
https://www.vagrantup.com/
Vagrant
Virtualisation
Again you can download Vagrant for all the different OS.
https://www.vagrantup.com/downloads.html
Vagrant - Download
Vagrant - Commands
Virtualisation
vagrant up
With this command you will create or switch on a
virtual machine, if it is the first time the machine will
be created with all the configuration provided on the
configuration files.
vagrant provision
With this command you will re-run the configuration
files, so if there is any new change on the files or new
instructions to execute the machine will do it
automatically.
vagrant destroy
With this command you will destroy your virtual
machine and all the contents inside it.
But if you have your files locally you just have to
be careful with the database.
vagrant halt
With this command you will power off your machine.
You could use this or > vagrant suspend to close your
sessions when you finish your work.
Virtualisation
PuPHPet is a provisioner for Vagrant, but it is a web graphic provisioner, so you
could select which software you want to install and after all the configuration
picking you will receive a 2 - 5 Mb configuration file to run with Vagrant.
https://puphpet.com/
PuPHPet
Virtualisation
• To create a new configuration you just have to navigate through the left hand
menu and selecting the configuration on the main screen.
• You could choose the Web server to install the Database server, if you want
different programming languages, the IPs to use, the Virtual Hosts, etc…
PuPHPet - Configuration
Virtualisation
• Parrot is an already created configuration for Vagrant to enhance the machine for
Drupal development.
• I’ve been using this machine for the last 2 years and it includes lots of useful tolls
for Drupal.

https://github.com/computerminds/parrot
Vagrant - Parrot
Virtualisation
There are other already created Vagrant configurations for Drupal.
I haven’t checked all but here you have an example of what you can find.
• Vagrant Drupal Development(VDD):

https://www.drupal.org/project/vdd
• Vagrant:

https://www.drupal.org/project/vagrant
• Drupal - VM:

https://github.com/geerlingguy/drupal-vm
Vagrant - Other
Virtualisation
Demo Time ??
Vagrant - Demo
Q & A
luis@iterate.ie
28 Frederick Street South,
Dublin 2.
(01) 524 1346
Thank you.

More Related Content

What's hot

Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Edureka!
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Chef
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Chef
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceAshok Modi
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkBryan Ollendyke
 
How%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20laffersHow%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20lafferstutorialsruby
 
Drupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappersDrupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappersMarcus Deglos
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)WordCamp Cape Town
 
Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7Chris Tankersley
 
Lamp Introduction 20100419
Lamp Introduction 20100419Lamp Introduction 20100419
Lamp Introduction 20100419Vu Hung Nguyen
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with DockerGeeta Vinnakota
 
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud InfrastructureSCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud InfrastructureMatt Ray
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to ChefKnoldus Inc.
 
Hadoop cluster 安裝
Hadoop cluster 安裝Hadoop cluster 安裝
Hadoop cluster 安裝recast203
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnishschoefmax
 
Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Chris Tankersley
 
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Chef
 

What's hot (20)

Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
 
Varnish bof
Varnish bofVarnish bof
Varnish bof
 
How%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20laffersHow%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20laffers
 
Drupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappersDrupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappers
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
 
Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7
 
Lamp Introduction 20100419
Lamp Introduction 20100419Lamp Introduction 20100419
Lamp Introduction 20100419
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud InfrastructureSCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Hadoop cluster 安裝
Hadoop cluster 安裝Hadoop cluster 安裝
Hadoop cluster 安裝
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnish
 
Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017
 
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
 

Viewers also liked

INTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔI
INTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔIINTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔI
INTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔIiNET
 
Sponsorship & CSR at UBB
Sponsorship & CSR at UBBSponsorship & CSR at UBB
Sponsorship & CSR at UBBlyudo
 
HƯỚNG DẪN SỬ DỤNG MAILCHIMP
HƯỚNG DẪN SỬ DỤNG MAILCHIMPHƯỚNG DẪN SỬ DỤNG MAILCHIMP
HƯỚNG DẪN SỬ DỤNG MAILCHIMPiNET
 

Viewers also liked (6)

Mn319 presentation
Mn319 presentationMn319 presentation
Mn319 presentation
 
Varicella chickenpox
Varicella chickenpoxVaricella chickenpox
Varicella chickenpox
 
Multilingual_in_Drupal_8
Multilingual_in_Drupal_8Multilingual_in_Drupal_8
Multilingual_in_Drupal_8
 
INTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔI
INTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔIINTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔI
INTERNET MARKETING TRONG 1 THẾ GIỚI LUÔN THAY ĐỔI
 
Sponsorship & CSR at UBB
Sponsorship & CSR at UBBSponsorship & CSR at UBB
Sponsorship & CSR at UBB
 
HƯỚNG DẪN SỬ DỤNG MAILCHIMP
HƯỚNG DẪN SỬ DỤNG MAILCHIMPHƯỚNG DẪN SỬ DỤNG MAILCHIMP
HƯỚNG DẪN SỬ DỤNG MAILCHIMP
 

Similar to LuisRodriguezLocalDevEnvironmentsDrupalOpenDays

Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesGerald Villorente
 
Diva23
Diva23Diva23
Diva23diva23
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configurationSubhas Kumar Ghosh
 
Drupal on your laptop
Drupal on your laptopDrupal on your laptop
Drupal on your laptopSam Moore
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Maurício Linhares
 
Anthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationAnthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationTony McKeown
 
APACHE
APACHEAPACHE
APACHEARJUN
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011Alfred Ayache
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLkangaro10a
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web DevelopmentEric Greene
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make filesropsu
 
Week6 office-hours
Week6 office-hoursWeek6 office-hours
Week6 office-hoursRandall Rode
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Michael Dobe, Ph.D.
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPChris Tankersley
 
Professional deployment
Professional deploymentProfessional deployment
Professional deploymentIvelina Dimova
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat OverviewMandi Walls
 

Similar to LuisRodriguezLocalDevEnvironmentsDrupalOpenDays (20)

Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, Terminologies
 
Diva23
Diva23Diva23
Diva23
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
 
Drupal on your laptop
Drupal on your laptopDrupal on your laptop
Drupal on your laptop
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10
 
Anthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationAnthony McKeown Drupal Presentation
Anthony McKeown Drupal Presentation
 
APACHE
APACHEAPACHE
APACHE
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQL
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make files
 
Exp-3.pptx
Exp-3.pptxExp-3.pptx
Exp-3.pptx
 
Week6 office-hours
Week6 office-hoursWeek6 office-hours
Week6 office-hours
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHP
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 

LuisRodriguezLocalDevEnvironmentsDrupalOpenDays

  • 1. Configure your own local development environment and some useful tools Local Development Environments Luis Rodriguez luis@iterate.ie Open Days Dublin 2015
  • 2. Contents 1. Drupal & Hosting Environments 3. Install & Configure Tools 2. Install & Configure XAMPP I will cover 4 main topics on this presentation: 4. Virtualisation
  • 3.
  • 4. 1. Drupal & Hosting Environments
  • 5. What is Drupal Drupal is a content management system which allows you to create and maintain many different types of websites without needing to know any coding languages. Drupal & Hosting Environments
  • 6. What do you need to run Drupal • Drupal is PHP based CMS so you will need a web server to interpret the PHP language. • PHP is a server side language, this mean you cannot write PHP and see the results without a web server. • HTML or JavaScript for example are browser side languages so you will only need a browser to see the results. Drupal & Hosting Environments
  • 7. Wikipedia: “A web server is an information technology that processes requests via HTTP, the basic network protocol used to distribute information.” Drupal & Hosting Environments Web Servers
  • 8. Local Web Servers: XAMPP Application with all the necessary tools for Drupal. Software package with Apache web server, MySQL database, PHP and Perl programming languages.
 
 www.apachefriends.org Local Web Servers: Virtualisation Recreate in your own computer with a virtual machine a real hosting environment and install all the necessary software inside that machine to run your Drupal A local server is a server working in your own machine, so you won’t need internet or any network to do your development. Drupal & Hosting Environments Web Servers - Local
  • 9. With a Remote server you will need connection to internet to do your development and extra software to upload your code like Git or FTP. Managed Drupal Servers There are a couple of Drupal focused managed servers, so they are specially configured to run Drupal. Aberdeen, Acquia, feistilbox, Pantheon. VPS or Traditional Hosting Then you can find many Hosting companies and offers over internet, even free hosting. Those hosting are non managed so you will have to manage any extra installation or configuration. Drupal & Hosting Environments Web Servers - Remote
  • 10. Drupal requirements • Web server: Apache, Nginx, or Microsoft IIS • Database: MySQL 5.5.3/MariaDB/Percona/equivalent or higher with PDO and an InnoDB-compatible primary storage engine, PostgreSQL 8.3 or higher with PDO, SQLite 3.3.7 or higher • PHP: PHP 5.4.5 or higher Drupal & Hosting Environments
  • 11.
  • 12. 2. Install & Configure XAMPP
  • 13. • We are going to install the XAMPP application so we won’t have to deal with extra configurations. • To download your XAMPP go to: https://www.apachefriends.org/download.html Install & Configure XAMPP Get XAMPP
  • 14. Choose and download the correct version depending on your computer and OS Install & Configure XAMPP XAMPP - Choose your version
  • 15. XAMPP - Installation • Run the application and the installation wizard will launch. • Follow the on screen steps, there is no need for extra configuration here. Install & Configure XAMPP
  • 16. XAMPP - First Look • Now you’ve installed your local web server. • The first “Welcome” screen will allow you to “Go To your Application”, visit some links with configurations steps and “Open Application Folder” Install & Configure XAMPP
  • 17. XAMPP - Application Folder • In your Applications Folder you will find all the configuration files, but we don’t have to modify anything here, just go to “htdocs” folder. • You can create an Alias or Link to this folder for an easy access.
 Here we are going to create our project folder, “drupal-8”. Install & Configure XAMPP
  • 18. XAMPP - Download Drupal Now we will need to download a new Drupal instance to our project folder. Install & Configure XAMPP
  • 19. XAMPP - Start MySQL Now we will need to Start the MySQL server and create a database for our project. Go to the XAMPP application and “Start” the MySQL Database. Install & Configure XAMPP
  • 20. XAMPP - Create Database In a browser go to: http://localhost/phpmyadmin And create the database with “drupal_8” name Install & Configure XAMPP
  • 21. XAMPP - Drupal Installation • Now with the Apache and MySQL servers running you are ready to install Drupal. • In a browser go to http://localhost/drupal-8 • And there you have your Drupal 8 installation wizard. Install & Configure XAMPP
  • 22. XAMPP - Drupal Installation • Follow the screen instruction and you will have a Drupal 8 installation. • You will need to create a files folder and copy the default configuration files. • Don’t forget to make these files and folder writable for everyone. • The database configuration will be: Install & Configure XAMPP
  • 23. XAMPP - Demo Demo Time ?? Install & Configure XAMPP
  • 24.
  • 25. 3. Install & Configure Tools
  • 26. Git • Wikipedia: “Git is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows.” Install & Configure Tools • In my own words git allows you to work in a team creating code for the same project at the same time. For local development Git will keep track and a backup of your code so you could go back and have always a copy of your code if you use a web repository like gitHub or bitBucket.
  • 27. Git - Installation • To install Git go to the download section of the website: 
 http://git-scm.com/downloads • For Windows I would recommend to install https://msysgit.github.io/
 It’ll come with extra command line tools and commands and a GUI Install & Configure Tools
  • 28. Git - Commands Install & Configure Tools git init With this command you will create a local repository in your system. This will create the hidden .git folder with all the information. e.g. git init git add With this command you add untracked files to the commit files list so in the next commit they will be added to the repository.
 
 e.g. git add —all git commit With this command you will add to the repository all the added-to-commit files. You will be asked to input a commit message,
 
 e.g. git commit git clone With this command you will clone an existing repository into your system. It will copy all the files from the repository into your specified folder. e.g. git clone https://github.com/computerminds/parrot.git parrot
  • 29. Git - Commands Install & Configure Tools git push If your repository is pointing to a server like github or bitbucket this command will send the latest commits to the server. e.g. git push origin master git branch With this command you can create different branches for different developments. So you can keep working but have some code not in production. 
 e.g. git branch my-branch master git checkout With this command you will change the active branch you are watching. By default git creates the master branch. 
 e.g. git checkout my-branch git pull If your repository is pointing to a server like github or bitbucket this command will get the latest commits from the server. e.g. git pull origin master
  • 30. Drush “Drush is a command line shell and Unix scripting interface for Drupal. Drush core ships with lots of useful commands for interacting with code like modules/themes/ profiles.” Install & Configure Tools Drush allows you to run lots of Drupal configuration tasks and commands form one place, so you can download and install a module in 2 simple commands.
  • 31. Drush - Installation • For Mac I would recommend a Homebrew install of Drush, so you just need to run:
 > brew install drush Install & Configure Tools • For Windows I would recommend the prepared packages. 
 http://www.drush.org/en/master/install/#windows-zip-package • For Linux I would recommend the default package manager: 
 > apt-get install drush • In order to user drush on your Drupal installation you need to open a console and go to your Drupal installation folder or subfolders. • You will need Drush 7.x to make it work with Drupal 8.
  • 32. Drush - Commands Install & Configure Tools drush status With this command you will get all the information of your Drupal installation like the version of your Drupal, the theme or the path to some directories. drush en / dis With this command you will enable or disable an already download module, it is very useful if the module has dependencies as it prompts you a message to download them. e.g. drush en project drush updatedb With this command you will run the update.php script just from the terminal. And you will be prompted to accept if there are database updates. drush dl With this command you will download into the modules folder the desired project. It will automatically choose the latest stable version of the project. You could choose your own option with: > drush dl —option project
  • 33. sass • Wikipedia: “Sass is a scripting language that is interpreted into Cascading Style Sheets (CSS).” Install & Configure Tools • sass need to be compiled to produce the final CSS you will use on your website.
 But there are a couple of free / open source applications you can use in Windows and Mac to create your sass projects. sass allows you to create your CSS in a more reusable way so you could define variables and parts of code called mixing you can reuse all over your CSS.
  • 34. sass - Installation • I will use an application called scout for this demo, it is available for Mac and Windows here: http://mhs.github.io/scout-app/ Install & Configure Tools • You could find more applications to download here: 
 http://sass-lang.com/install • The installation is very simple and you just have to follow the screen steps.
 Then you will have the application and you are ready to create your first sass project. • For this presentation I’m going to create two folders on my themes folder.
 One called “scss” for the sass files and the other “css” for the compiled files.
  • 35. sass - Installation • We will have to create a new project and select our drupal-8 theme folder as the base. • Then we will have to define “scss” as the Input folder and “css” as the output folder. Install & Configure Tools
  • 36. sass - Installation Once those two folder are created I’ve added a global.css file into my “scss” folder and now, with scout running, every change on this file will automatically be compiled into global.css at “css” folder. Install & Configure Tools
  • 37.
  • 39. Wikipedia: “In computing, virtualisation refers to the act of creating a virtual (rather than actual) version of something, including (but not limited to) a virtual computer hardware platform, operating system (OS), storage device, or computer network resources.” Virtualisation Definition
  • 40. Virtualisation • This mean create logical “fake” resources from the real hardware resources.
 For us virtualisation will be create a false(Virtual) machine to run inside all the necessary software for our development, so will include a web server, a database server, PHP and any extra needed software. • This is an advantage because you can reproduce 100% what you will have on your production environment, so you could test locally what would be the behaviour of your website. Avoiding problems like “It works on my machine” Definition
  • 41. Virtualisation I use VirtualBox as my virtualisation software because it is GNU General Public License (GPL) version 2 and there are lots of tools to use with it. https://www.virtualbox.org/ VirtualBox
  • 42. Virtualisation I use Vagrant to provision my VirtualBox machine so I don’t have to care about configuration. https://www.vagrantup.com/ Vagrant
  • 43. Virtualisation Again you can download Vagrant for all the different OS. https://www.vagrantup.com/downloads.html Vagrant - Download
  • 44. Vagrant - Commands Virtualisation vagrant up With this command you will create or switch on a virtual machine, if it is the first time the machine will be created with all the configuration provided on the configuration files. vagrant provision With this command you will re-run the configuration files, so if there is any new change on the files or new instructions to execute the machine will do it automatically. vagrant destroy With this command you will destroy your virtual machine and all the contents inside it. But if you have your files locally you just have to be careful with the database. vagrant halt With this command you will power off your machine. You could use this or > vagrant suspend to close your sessions when you finish your work.
  • 45. Virtualisation PuPHPet is a provisioner for Vagrant, but it is a web graphic provisioner, so you could select which software you want to install and after all the configuration picking you will receive a 2 - 5 Mb configuration file to run with Vagrant. https://puphpet.com/ PuPHPet
  • 46. Virtualisation • To create a new configuration you just have to navigate through the left hand menu and selecting the configuration on the main screen. • You could choose the Web server to install the Database server, if you want different programming languages, the IPs to use, the Virtual Hosts, etc… PuPHPet - Configuration
  • 47. Virtualisation • Parrot is an already created configuration for Vagrant to enhance the machine for Drupal development. • I’ve been using this machine for the last 2 years and it includes lots of useful tolls for Drupal.
 https://github.com/computerminds/parrot Vagrant - Parrot
  • 48. Virtualisation There are other already created Vagrant configurations for Drupal. I haven’t checked all but here you have an example of what you can find. • Vagrant Drupal Development(VDD):
 https://www.drupal.org/project/vdd • Vagrant:
 https://www.drupal.org/project/vagrant • Drupal - VM:
 https://github.com/geerlingguy/drupal-vm Vagrant - Other
  • 50.
  • 51. Q & A
  • 52. luis@iterate.ie 28 Frederick Street South, Dublin 2. (01) 524 1346 Thank you.