SlideShare a Scribd company logo
1 of 22
Download to read offline
How to setup the perfect
development environment
Roel De Meester
How to setup the perfect
                   development environment


    Towards some drupal
    development environment




07/02/10   Fosdem 2010 : Drupal Dev Machine
Poll

●   Want to see installation process ?
●   Want to discuss the result ?




07/02/10         Fosdem 2010 : Drupal Dev Machine
LAMP Server

●   Start from a freshly installed UBUNTU
●   Needs
       ●   xAMP Stack
       ●   Ready for drupal
       ●   Ready for drush
       ●   Ready to code




07/02/10           Fosdem 2010 : Drupal Dev Machine
LAMP Server – the script 1/2

#PREPARE ubuntu dev machine
sudo apt-get update
#sudo apt-get upgrade
sudo tasksel install lamp-server
sudo apt-get install phpmyadmin
sudo apt-get install php5-cli
sudo apt-get install curl php5-curl
sudo apt-get install php5-xdebug
sudo apt-get install subversion
sudo apt-get install php5-dev php-pear

 07/02/10      Fosdem 2010 : Drupal Dev Machine
LAMP Server – the script 2/2


sudo sed -i 's/memory_limit = .*/memory_limit = 128M/' /etc/php5/apache2/php.ini

sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 128M/'
/etc/php5/apache2/php.ini
sudo sed -i 's/post_max_size = .*/post_max_size = 256M/' /etc/php5/apache2/php.ini

#better uploadprogress bar
sudo pecl install uploadprogress
sudo sed -i '/; extension_dir directive above/ a
extension=uploadprogress.so' /etc/php5/apache2/php.ini

#cleanurl
sudo sed -i 's/AllowOverride (None)/AllowOverride All/' /etc/apache2/sites-available/default
sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart




   07/02/10                  Fosdem 2010 : Drupal Dev Machine
LAMP Server – Automated


 mkdir ~/bin
 cd ~/bin
 rm setup_ubuntu.sh
 wget http://krimson.be/sites/default/files/setup_ubuntu.sh &&
 chmod +x *.sh && ./setup_ubuntu.sh




07/02/10           Fosdem 2010 : Drupal Dev Machine
Drush

●   Control Drupal from Terminal
●   Needs
        ●   php-cli
        ●   curl
        ●   drush




07/02/10              Fosdem 2010 : Drupal Dev Machine
Drush – the script 1/3
#default directory structure
DEFAULT_WORKSPACE=$HOME/workspace
if [ ! -d "$DEFAULT_WORKSPACE" ];then
   echo "create workspace folder"
   mkdir $DEFAULT_WORKSPACE
fi
cd $DEFAULT_WORKSPACE

#install drush
#NOTE : WHEN changing the drush folder, also update the
$PROFILE_PATH
DRUSH_ROOT=$DEFAULT_WORKSPACE/drush
PROFILE_PATH='n # set PATH so it includes drush if it exists n
if [ -d "$HOME/workspace/drush" ] ; then n
t PATH="$HOME/workspace/drush:$PATH" n
fi n'

  07/02/10           Fosdem 2010 : Drupal Dev Machine
DRUSH – the script 2/3

DRUSH_VERSION=2.1
DRUSH_TGZ=drush-All-Versions-$DRUSH_VERSION.tar.gz
if [ ! -d "$DRUSH_ROOT" ];then
   echo "grabbing drush"
   wget http://ftp.drupal.org/files/projects/$DRUSH_TGZ
   if [ -a "$DRUSH_TGZ" ];then
      tar -zxvf $DRUSH_TGZ
      rm $DRUSH_TGZ
   else
      echo "ERROR : unable to download $DRUSH_TGZ"
   fi
fi

#add drush to path


  07/02/10           Fosdem 2010 : Drupal Dev Machine
DRUSH – the script 3/3
if grep -q drush ~/.profile
   then echo 'DRUSH already in path'
   else echo -e $PROFILE_PATH >> ~/.profile
   source ~/.profile
   echo '
----------------------------------------------------------------------
| Please update your path by reloading your .profile.                    |
| Just run the command at the bottom from your terminal.                   |
| Note : this will only work in current shell. if you want a decent |
| DEV environment, you should logout/login.                            |
|                                                         |
| the command to run :                                               |
|                                                         |
| . ~/.profile                                               |
----------------------------------------------------------------------
'
fi
  07/02/10               Fosdem 2010 : Drupal Dev Machine
DRUSH – Automated


 mkdir ~/bin
 cd ~/bin
 rm setup_drush.sh
 wget http://krimson.be/sites/default/files/setup_drush.sh &&
 chmod +x *.sh && ./setup_drush.sh




07/02/10           Fosdem 2010 : Drupal Dev Machine
An IDE

●   Eclipse – VI – Emacs – Bluefish
    - geany - ..




07/02/10         Fosdem 2010 : Drupal Dev Machine
Install Eclipse – the steps

●   Install JRE – Java Runtime
●   Manual or APT-Get ?
●   Startup script
●   Eclipse has
        ●   Code completion
        ●   Debug support
        ●   Version Control support
●   Eclipse is heavy to launch

07/02/10            Fosdem 2010 : Drupal Dev Machine
Install Eclipse – the script 1/2


 #!/usr/bin/php -q
 <?php
 $ECLIPSE_DOWNLOAD_URL="http://d2u376ub0heus3.cloudfront.net/technolog
 y/epp/downloads/release/galileo/SR1/eclipse-php-galileo-SR1-linux-gtk.tar.gz";
 $ECLIPSE_TAR_NAME=basename($ECLIPSE_DOWNLOAD_URL);
 $ECLIPSE_NEW_FOLDER_NAME="eclipse-pdt-galileo";
 $ECLIPSE_BIN_FILE="eclipse";

 echo "#Install JAVA Runtimen";
 passthru("sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts");

 echo "#Get Eclipse ("+$ECLIPSE_NEW_FOLDER_NAME+") n";
 passthru("mkdir -p ~/bin/packages");

 # ...to be continued




07/02/10                  Fosdem 2010 : Drupal Dev Machine
Install Eclipse – the script 2/2

  exec("wget " . $ECLIPSE_DOWNLOAD_URL);
  system("mv " . $ECLIPSE_TAR_NAME . " ~/bin/packages/");
  system("cd ~/bin/packages/ && tar -zxvf $ECLIPSE_TAR_NAME && rm
 $ECLIPSE_TAR_NAME && mv eclipse $ECLIPSE_NEW_FOLDER_NAME");

  if (!file_exists($ECLIPSE_BIN_FILE)){
       $fh = fopen($ECLIPSE_BIN_FILE, 'w') or die("can't open file
 $ECLIPSE_BIN_FILEn");
       $stringData = "#/bin/bashn";
       fwrite($fh, $stringData);
       $stringData = "`~/bin/packages/$ECLIPSE_NEW_FOLDER_NAME/eclipse
 -data ~/eclipse-workspace -vmargs -Xms128M -Xmx512M -XX:PermSize=128M
 -XX:MaxPermSize=512M &> /dev/null` & n";
       fwrite($fh, $stringData);
       fclose($fh);
        system("chmod u+x eclipse && mv eclipse ~/bin/eclipse") ;
   }
 ?>


07/02/10              Fosdem 2010 : Drupal Dev Machine
Eclipse – Automated


cd ~/bin
wget http://krimson.be/sites/default/files/setup_eclipse.php.txt
&& mv setup_eclipse.php.txt setup_eclipse.php && chmod +x *.php
&& ./setup_eclipse.php




 07/02/10          Fosdem 2010 : Drupal Dev Machine
Eclipse – Extra's
●   CSS Editing : Aptana
    http://update.aptana.com/install/studio
●   SVN Version Control : subclipse
    http://subclipse.tigris.org/update_1.6.x
●   Unfuddle : Mylyn Connector
    http://unfuddle.com/downloads/plugins/mylyn/e3.5/update-site/

●   Drupal settings + Drush launcher
    http://xtnd.us/downloads/eclipse


    07/02/10          Fosdem 2010 : Drupal Dev Machine
Eclipse – Configuration
● Mylyn

       ●   Allows you to list tasks from bug tracking sytem
       ●   Allows you to start working on task and keep
             track of all 'touched' files and provides
             context around a bug.
       ●   Allows you to close tasks from within eclipse
       ●   Unfuddle HAS a connector!
●   Xdebug - krimson.be/articles/debugging-
    drupal-6-using-xdebug
       ●   Allows you to go through your running code
             step by step
      ●
07/02/10           Fosdem 2010 : Drupal Dev Machine
Your company standards

●   How we do it @ Krimson
●   svn_new_project.sh spellen
       ●   Checkout, virtualhost, database, multidomain,
            load db dump, done
       ●   Internal commands + conventions keeps us up
             to speed




07/02/10           Fosdem 2010 : Drupal Dev Machine
Drupal – Extra's
●   devel module
         ●   print functions - dsm
         ●   theme developer
●   switch users
         ●   http://drupal.org/project/masquerade
●   Prevent test mails to prime ministers
         ●   http://drupal.org/project/reroute_email
●   http://drupal.org/project/schema
●   http://drupal.org/project/coder
    07/02/10          Fosdem 2010 : Drupal Dev Machine
Firefox – Extra's
●   Firebug
●   Webdeveloper toolbar




    07/02/10    Fosdem 2010 : Drupal Dev Machine

More Related Content

What's hot

Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with dockerGiacomo Bagnoli
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAJesus Manuel Olivas
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drushkbasarab
 
Docker command
Docker commandDocker command
Docker commandEric Ahn
 
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Jake Borr
 
Edup wifi for raspberry zero
Edup wifi  for raspberry zeroEdup wifi  for raspberry zero
Edup wifi for raspberry zeroSoheilSabzevari2
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupalDay
 
Contribuir a Drupal - Entorno
Contribuir a Drupal - EntornoContribuir a Drupal - Entorno
Contribuir a Drupal - EntornoKeopx
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHDavid Stockton
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeSoshi Nemoto
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK SeminarMartin Scharm
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonChris Charlton
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)zerok
 

What's hot (20)

Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
 
Putting some "logic" in LVM.
Putting some "logic" in LVM.Putting some "logic" in LVM.
Putting some "logic" in LVM.
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
 
Docker command
Docker commandDocker command
Docker command
 
Dev ops
Dev opsDev ops
Dev ops
 
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
 
Edup wifi for raspberry zero
Edup wifi  for raspberry zeroEdup wifi  for raspberry zero
Edup wifi for raspberry zero
 
Docker
DockerDocker
Docker
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
Contribuir a Drupal - Entorno
Contribuir a Drupal - EntornoContribuir a Drupal - Entorno
Contribuir a Drupal - Entorno
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)
 

Viewers also liked

Chinese ceramics
Chinese ceramicsChinese ceramics
Chinese ceramicsslidelarisa
 
DMF10 Krimson : Drupal In Belgium
DMF10 Krimson : Drupal In BelgiumDMF10 Krimson : Drupal In Belgium
DMF10 Krimson : Drupal In BelgiumKrimson
 
Dmf09 Krimson Drupal At Nebus Loyalty
Dmf09 Krimson Drupal At Nebus LoyaltyDmf09 Krimson Drupal At Nebus Loyalty
Dmf09 Krimson Drupal At Nebus LoyaltyKrimson
 
Presentazione cdc inglese
Presentazione cdc inglesePresentazione cdc inglese
Presentazione cdc ingleseTullio Colombo
 
OpenData belgium
OpenData belgiumOpenData belgium
OpenData belgiumKrimson
 
GIT - DUG Antwerp
GIT - DUG AntwerpGIT - DUG Antwerp
GIT - DUG AntwerpKrimson
 

Viewers also liked (7)

Chinese ceramics
Chinese ceramicsChinese ceramics
Chinese ceramics
 
DMF10 Krimson : Drupal In Belgium
DMF10 Krimson : Drupal In BelgiumDMF10 Krimson : Drupal In Belgium
DMF10 Krimson : Drupal In Belgium
 
Dmf09 Krimson Drupal At Nebus Loyalty
Dmf09 Krimson Drupal At Nebus LoyaltyDmf09 Krimson Drupal At Nebus Loyalty
Dmf09 Krimson Drupal At Nebus Loyalty
 
10 anni di attività
10 anni di attività10 anni di attività
10 anni di attività
 
Presentazione cdc inglese
Presentazione cdc inglesePresentazione cdc inglese
Presentazione cdc inglese
 
OpenData belgium
OpenData belgiumOpenData belgium
OpenData belgium
 
GIT - DUG Antwerp
GIT - DUG AntwerpGIT - DUG Antwerp
GIT - DUG Antwerp
 

Similar to Towards the perfect Drupal Dev Machine

[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHPhernanibf
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-TranslatorDashamir Hoxha
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondNuvole
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOpsОмские ИТ-субботники
 
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Jeff Geerling
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from githubAntony Gitomeh
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
Speed up your development environment PHP + Nginx + Fedora + PG
Speed up your development environment PHP + Nginx + Fedora + PGSpeed up your development environment PHP + Nginx + Fedora + PG
Speed up your development environment PHP + Nginx + Fedora + PGMarcus Sá
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient waySylvain Rayé
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetOmar Reygaert
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hypebridgetkromhout
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stackDana Luther
 
Hadoop installation on windows
Hadoop installation on windows Hadoop installation on windows
Hadoop installation on windows habeebulla g
 
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...Didac Oliveira
 
Drush for drupal website builder
Drush for drupal website builderDrush for drupal website builder
Drush for drupal website builderAdolfo Nasol
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 

Similar to Towards the perfect Drupal Dev Machine (20)

[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyond
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
 
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Speed up your development environment PHP + Nginx + Fedora + PG
Speed up your development environment PHP + Nginx + Fedora + PGSpeed up your development environment PHP + Nginx + Fedora + PG
Speed up your development environment PHP + Nginx + Fedora + PG
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
Hadoop installation on windows
Hadoop installation on windows Hadoop installation on windows
Hadoop installation on windows
 
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
 
Drush for drupal website builder
Drush for drupal website builderDrush for drupal website builder
Drush for drupal website builder
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Beginning Drush
Beginning DrushBeginning Drush
Beginning Drush
 

Recently uploaded

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Towards the perfect Drupal Dev Machine

  • 1. How to setup the perfect development environment Roel De Meester
  • 2. How to setup the perfect development environment Towards some drupal development environment 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 3. Poll ● Want to see installation process ? ● Want to discuss the result ? 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 4. LAMP Server ● Start from a freshly installed UBUNTU ● Needs ● xAMP Stack ● Ready for drupal ● Ready for drush ● Ready to code 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 5. LAMP Server – the script 1/2 #PREPARE ubuntu dev machine sudo apt-get update #sudo apt-get upgrade sudo tasksel install lamp-server sudo apt-get install phpmyadmin sudo apt-get install php5-cli sudo apt-get install curl php5-curl sudo apt-get install php5-xdebug sudo apt-get install subversion sudo apt-get install php5-dev php-pear 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 6. LAMP Server – the script 2/2 sudo sed -i 's/memory_limit = .*/memory_limit = 128M/' /etc/php5/apache2/php.ini sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 128M/' /etc/php5/apache2/php.ini sudo sed -i 's/post_max_size = .*/post_max_size = 256M/' /etc/php5/apache2/php.ini #better uploadprogress bar sudo pecl install uploadprogress sudo sed -i '/; extension_dir directive above/ a extension=uploadprogress.so' /etc/php5/apache2/php.ini #cleanurl sudo sed -i 's/AllowOverride (None)/AllowOverride All/' /etc/apache2/sites-available/default sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 7. LAMP Server – Automated mkdir ~/bin cd ~/bin rm setup_ubuntu.sh wget http://krimson.be/sites/default/files/setup_ubuntu.sh && chmod +x *.sh && ./setup_ubuntu.sh 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 8. Drush ● Control Drupal from Terminal ● Needs ● php-cli ● curl ● drush 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 9. Drush – the script 1/3 #default directory structure DEFAULT_WORKSPACE=$HOME/workspace if [ ! -d "$DEFAULT_WORKSPACE" ];then echo "create workspace folder" mkdir $DEFAULT_WORKSPACE fi cd $DEFAULT_WORKSPACE #install drush #NOTE : WHEN changing the drush folder, also update the $PROFILE_PATH DRUSH_ROOT=$DEFAULT_WORKSPACE/drush PROFILE_PATH='n # set PATH so it includes drush if it exists n if [ -d "$HOME/workspace/drush" ] ; then n t PATH="$HOME/workspace/drush:$PATH" n fi n' 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 10. DRUSH – the script 2/3 DRUSH_VERSION=2.1 DRUSH_TGZ=drush-All-Versions-$DRUSH_VERSION.tar.gz if [ ! -d "$DRUSH_ROOT" ];then echo "grabbing drush" wget http://ftp.drupal.org/files/projects/$DRUSH_TGZ if [ -a "$DRUSH_TGZ" ];then tar -zxvf $DRUSH_TGZ rm $DRUSH_TGZ else echo "ERROR : unable to download $DRUSH_TGZ" fi fi #add drush to path 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 11. DRUSH – the script 3/3 if grep -q drush ~/.profile then echo 'DRUSH already in path' else echo -e $PROFILE_PATH >> ~/.profile source ~/.profile echo ' ---------------------------------------------------------------------- | Please update your path by reloading your .profile. | | Just run the command at the bottom from your terminal. | | Note : this will only work in current shell. if you want a decent | | DEV environment, you should logout/login. | | | | the command to run : | | | | . ~/.profile | ---------------------------------------------------------------------- ' fi 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 12. DRUSH – Automated mkdir ~/bin cd ~/bin rm setup_drush.sh wget http://krimson.be/sites/default/files/setup_drush.sh && chmod +x *.sh && ./setup_drush.sh 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 13. An IDE ● Eclipse – VI – Emacs – Bluefish - geany - .. 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 14. Install Eclipse – the steps ● Install JRE – Java Runtime ● Manual or APT-Get ? ● Startup script ● Eclipse has ● Code completion ● Debug support ● Version Control support ● Eclipse is heavy to launch 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 15. Install Eclipse – the script 1/2 #!/usr/bin/php -q <?php $ECLIPSE_DOWNLOAD_URL="http://d2u376ub0heus3.cloudfront.net/technolog y/epp/downloads/release/galileo/SR1/eclipse-php-galileo-SR1-linux-gtk.tar.gz"; $ECLIPSE_TAR_NAME=basename($ECLIPSE_DOWNLOAD_URL); $ECLIPSE_NEW_FOLDER_NAME="eclipse-pdt-galileo"; $ECLIPSE_BIN_FILE="eclipse"; echo "#Install JAVA Runtimen"; passthru("sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts"); echo "#Get Eclipse ("+$ECLIPSE_NEW_FOLDER_NAME+") n"; passthru("mkdir -p ~/bin/packages"); # ...to be continued 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 16. Install Eclipse – the script 2/2 exec("wget " . $ECLIPSE_DOWNLOAD_URL); system("mv " . $ECLIPSE_TAR_NAME . " ~/bin/packages/"); system("cd ~/bin/packages/ && tar -zxvf $ECLIPSE_TAR_NAME && rm $ECLIPSE_TAR_NAME && mv eclipse $ECLIPSE_NEW_FOLDER_NAME"); if (!file_exists($ECLIPSE_BIN_FILE)){ $fh = fopen($ECLIPSE_BIN_FILE, 'w') or die("can't open file $ECLIPSE_BIN_FILEn"); $stringData = "#/bin/bashn"; fwrite($fh, $stringData); $stringData = "`~/bin/packages/$ECLIPSE_NEW_FOLDER_NAME/eclipse -data ~/eclipse-workspace -vmargs -Xms128M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=512M &> /dev/null` & n"; fwrite($fh, $stringData); fclose($fh); system("chmod u+x eclipse && mv eclipse ~/bin/eclipse") ; } ?> 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 17. Eclipse – Automated cd ~/bin wget http://krimson.be/sites/default/files/setup_eclipse.php.txt && mv setup_eclipse.php.txt setup_eclipse.php && chmod +x *.php && ./setup_eclipse.php 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 18. Eclipse – Extra's ● CSS Editing : Aptana http://update.aptana.com/install/studio ● SVN Version Control : subclipse http://subclipse.tigris.org/update_1.6.x ● Unfuddle : Mylyn Connector http://unfuddle.com/downloads/plugins/mylyn/e3.5/update-site/ ● Drupal settings + Drush launcher http://xtnd.us/downloads/eclipse 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 19. Eclipse – Configuration ● Mylyn ● Allows you to list tasks from bug tracking sytem ● Allows you to start working on task and keep track of all 'touched' files and provides context around a bug. ● Allows you to close tasks from within eclipse ● Unfuddle HAS a connector! ● Xdebug - krimson.be/articles/debugging- drupal-6-using-xdebug ● Allows you to go through your running code step by step ● 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 20. Your company standards ● How we do it @ Krimson ● svn_new_project.sh spellen ● Checkout, virtualhost, database, multidomain, load db dump, done ● Internal commands + conventions keeps us up to speed 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 21. Drupal – Extra's ● devel module ● print functions - dsm ● theme developer ● switch users ● http://drupal.org/project/masquerade ● Prevent test mails to prime ministers ● http://drupal.org/project/reroute_email ● http://drupal.org/project/schema ● http://drupal.org/project/coder 07/02/10 Fosdem 2010 : Drupal Dev Machine
  • 22. Firefox – Extra's ● Firebug ● Webdeveloper toolbar 07/02/10 Fosdem 2010 : Drupal Dev Machine