{"id":2606,"date":"2013-11-26T16:52:48","date_gmt":"2013-11-26T21:52:48","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/?p=2606"},"modified":"2013-11-26T18:16:21","modified_gmt":"2013-11-26T23:16:21","slug":"setting-up-a-local-drupal-development-environment-on-ubuntu-12-10","status":"publish","type":"post","link":"http:\/\/blogs.terrorware.com\/geoff\/2013\/11\/26\/setting-up-a-local-drupal-development-environment-on-ubuntu-12-10\/","title":{"rendered":"Setting up a local Drupal development environment on Ubuntu 12.10"},"content":{"rendered":"<p>I&#8217;ve recently started developing with the Drupal content management framework. \u00a0I did a lot of work with Drupal in the past, but haven&#8217;t done much work with the platform since Drupal 6. \u00a0While it still feels a bit strange coming from MVC frameworks and more expressive languages, it seems like Drupal and PHP have come a long way in offering a fluid development experience in the last few years. \u00a0This is how I set up my development environment in Ubuntu 12.10, though it probably works for newer releases of Ubuntu or other Debian-based Linuxes.<\/p>\n<pre># Add the PHP5 PPA\r\nsudo add-apt-repository ppa:ondrej\/php5\u00a0\r\nsudo apt-get update\r\n\r\n# Install PHP5. \u00a0This will also install a recent version of Apache\r\nsudo apt-get install php5\r\n\r\n# Install PEAR, this will make it easier to install drush\r\nsudo apt-get install php-pear\r\n\r\n# Install drush via PEAR\r\npear channel-discover pear.drush.org\r\nsudo pear channel-discover pear.drush.org\r\nsudo pear install drush\/drush\r\n\r\n# HACK: The first time I ran drush it needed to install some dependencies via PEAR, \r\n# but I ran drush as my user so I didn't have permissions to write to the global PEAR\r\n# directory. \u00a0Work around this by running drush with sudo and then chmoding your\r\n# ~\/.drush directory back to your own user. \u00a0You can probably just install the\r\n# dependencies using PEAR.\r\nsudo drush\r\nsudo chown yourusername:yourgroupname -R ~\/.drush\r\n\r\n# For local development, I like using SQLite\r\nsudo apt-get install php5-sqlite<\/pre>\n<p># drush dl\/en needs crul<br \/>\nsudo apt-get install php5-curl<\/p>\n<pre># Drupal needs GD\r\nsudo apt-get install php5-gd<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve recently started developing with the Drupal content management framework. \u00a0I did a lot of work with Drupal in the past, but haven&#8217;t done much work with the platform since Drupal 6. \u00a0While it still feels a bit strange coming from MVC frameworks and more expressive languages, it seems like Drupal and PHP have come&hellip; <a class=\"more-link\" href=\"http:\/\/blogs.terrorware.com\/geoff\/2013\/11\/26\/setting-up-a-local-drupal-development-environment-on-ubuntu-12-10\/\">Continue reading <span class=\"screen-reader-text\">Setting up a local Drupal development environment on Ubuntu 12.10<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[129,263,63,285,378],"class_list":["post-2606","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-development","tag-drupal","tag-php","tag-recipes","tag-ubuntu","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-G2","_links":{"self":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=2606"}],"version-history":[{"count":2,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2606\/revisions"}],"predecessor-version":[{"id":2610,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2606\/revisions\/2610"}],"wp:attachment":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=2606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=2606"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=2606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}