User login

Setting up a fresh Drupal installation from the Agaric repository.

For a new version of Drupal

From a computer with a local checkout of the subversion repository:

cd ~/workspace/repos/agaric/drupal-core/
wget http://ftp.drupal.org/files/projects/drupal-5.5.tar.gz
tar -xzf drupal-5.5.tar.gz
rm drupal-5.5.tar.gz
svn add drupal-5.5
svn commit -m "latest and greatest Drupal"

Checkout Drupal core

(Alternative approach for upgrading an exising core: create a diff between old and new and apply the patch.)

On your server, navigate to your chosen web root and checkout your copy of Drupal:

cd
sudo svn co https://66.135.37.243/srv/svn/agaric/drupal-core/drupal-5.5 .
sudo chown -R www-data:www-data sites/default/*

Note: the method of setting permissions above is probably non-standard (read: wrong).

Checkout contributed modules

Still from the same directory, /var/www/agaricroot/ in this example.

Dual spots for contributed modules, legacy of our repository, we hope to have it all in sites/all/modules soon:

ben@agaric:/var/www/agaricroot$ sudo svn co https://66.135.37.243/srv/svn/agaric/drupal-contrib/5/modules modules/contributed

ben@agaric:/var/www/agaricroot$ sudo svn co https://66.135.37.243/srv/svn/agaric/drupal-contrib/5/modules-all sites/all/modules

Checkout your site's directory, if building on an existing site

Again, these commands are run after a command like cd /var/www/agaricroot has put you at your preferred web root.

sudo svn co https://66.135.37.243/srv/svn/agaric/agaric-sites/5/wsf/trunk/agaricexample.net/ sites/agaricexample.net

Checkout custom modules, if any.

OK, so this isn't a fresh install, of course. This is reproducing an existing complex site, WSF2008 in this case..

The modules in use, from looking at the old site:

ls -la /var/www/d53/sites/wsf2008.net/modules/

drwxr-xr-x 3 root root 4096 2007-11-07 01:12 edit_term
drwxr-xr-x 3 root root 4096 2007-12-12 17:35 form_tweak
drwxr-xr-x 7 root root 4096 2007-11-06 23:03 place

Check out Agaric's modules that aren't yet in CVS (well edit term is, and place, but the latter in particular is in development).

sudo svn co https://66.135.37.243/srv/svn/agaric/agaric-modules/edit_term/5/edit_term sites/wsf2008.net/modules/edit_term
sudo svn co https://66.135.37.243/srv/svn/agaric/agaric-modules/place/5/place sites/wsf2008.net/modules/place
sudo svn co https://66.135.37.243/srv/svn/agaric/agaric-modules/form_tweak/5/form_tweak sites/wsf2008.net/modules/form_tweak

Resolution

Searched words: 
Subversion checkout repository structure site recreating making new copy

Comments

Correction to chown command

You suggested this for setting up file ownership of a Drupal install fresh out of the repository.

sudo chown -R www-data:www-data sites/default/*

Note: the method of setting permissions above is probably non-standard (read: wrong).

This is a potentially dangerous security hole, since it could leave the settings.php file (containing DB passwords, et al) readable to everyone.

I am playing around with subversion to implement revision control on a multi-site Drupal install that I manage, and am using the following to restore Drupal-friendly file ownership after checking out from SVN:

#run these commands in the base drupal directory, whether manually or within a script
chown www-data .htaccess
chown www-data sites/all/modules/contrib/tinymce/tinymce/jscripts/tiny_mce #needed if you use TinyMCE module

#if your Drupal install is multi-site
chown -R www-data sites/site1.com/files
chown -R www-data sites/site2.com/files
...
chown root sites/site1.com/settings.php
chown root sites/site2.com/settings.php
...

#of, if your Drupal is not multi-site
chown -R www-data sites/default/files
chown root sites/default/settings.php

You will need to tailor these commands to match the domain names of your multi-sites, the location of TinyMCE (if you are using it), and the username used by Apache.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.