edoceo

Installing Drupal 7 (D7); Apache + mod_php

Our preferred method of deploying Drupal 7 is through Linux, Apache, mod_php and PostgreSQL (sometimes sqlite!). This functions as our base system; there are loads of other fancy add-ons that will not be mentioned here, for the sake of focus.

Installing Drupal

This process couldn't be easier; because we're installing this direct from source and working out-side the distributions package manager the installation goes into /opt

~ # cd /opt
~ # curl -qs 'http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz' | tar -zx
~ # chown apache:apache ./drupal-7.12/sites/default/files

Configuring Apache

We're not keen on using the .htaccess files, so we configure Drupal settings in the Apache config. Here is an example Directory and VirtualHost configuration.

#
# Configure Drupal Directory Settings
<Directory /opt/drupal-7.12>

    AllowOverride None
#    php_flag set('allow_call_time_pass_reference',false); // perdir
#    php_flag ('display_errors',true);
#    php_flag ('display_startup_errors',true);
#    php_flag set('error_append_string',null);
#    php_flag ('error_log',dirname(__FILE__).'/var/log/error.log');
#    php_flag set('error_prepend_string',null);
#    php_flag set('error_reporting');
#    php_flag ('html_errors', php_sapi_name()=='CLI' ? false : true );
    php_flag ignore_repeated_errors true
    php_flag ignore_repeated_source true
#    php_flag ('implicit_flush',false);
    php_value date.timezone America/Los_Angeles

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* /index.php

</Directory>

Installing Modules

Manualling installing modules requires shell access; also the Drupal method requires that we have FTP access and FTP is teh sux. The list below is just some of our favourites.

~ # cd /opt/drupal-7.12/sites/all/modules
~ # curl http://ftp.drupal.org/files/projects/rules-7.x-2.0.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/arthemia-7.x-1.x-dev.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/token-7.x-1.0-rc1.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/memcache-7.x-1.0.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/commerce-7.x-1.2.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/ctools-7.x-1.0-rc1.tar.gz | tar -zx 
~ # curl http://ftp.drupal.org/files/projects/relation-7.x-1.0-beta3.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/token-7.x-1.0-rc1.tar.gz |tar -zx
~ # curl http://ftp.drupal.org/files/projects/views-7.x-3.1.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/entityreference-7.x-1.0-beta4.tar.gz | tar -zxv
~ # curl http://ftp.drupal.org/files/projects/video-7.x-2.4.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/jquery_update-7.x-2.2.tar.gz | tar -zxv 
~ # curl http://ftp.drupal.org/files/projects/video-7.x-2.4.tar.gz | tar -zx
~ # curl http://ftp.drupal.org/files/projects/jquery_update-7.x-2.2.tar.gz | tar -zxv

Installing Themes

~ # cd /opt/drupal-7.12/sites/all/themes
~ # curl http://ftp.drupal.org/files/projects/adaptivetheme-7.x-2.2.tar.gz | tar -zx

See Also

Loading Comments from Disqus...