CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Multi-site setup structure
Pages: [1]

Author Topic: Multi-site setup structure  (Read 9312 times)

acrosman

  • Guest
Multi-site setup structure
March 03, 2008, 01:11:11 pm
We're currently running 9 instances of Drupal/CiviCRM.  As best I am able I'd like to minimize the number of copies of the code we keep around.  Ideally I'd like 1 copy of drupal, and 1 copy of CiviCRM; so initially that works fine with drupal's build in functionality and putting civicrm into <drupal_root>/sites/all/modules/civicrm, however when we reach time for upgrades (like moving to CiviCRM 2.0) I'd like to be able to move 1 site, test it and move the next.  Again, I can work out how to do this with Drupal smoothly, by setting up a second Drupal root, and slowly moving each site's root to match that so I do updates.  However, CiviCRM has more a little more concerned.  I have an idea, but I could use some feedback about the feasibility/safety/intelligence of it.

If I put the CiviCRM code base someplace NOT under the drupal root, say /usr/local/civicrm, and within that I could have a copy of each version of CiviCRM currently running on the server (e.g. 1.9 and 2.0) and place links in each of the drupal site's sites/<site_name>/modules folders (so sites/sample.example.com/modules/civicrm -> /usr/local/civicrm/1.9, I could update any one site, but changing the link from one version to the next, and then running the database update scripts.

Can I get away with this?  Just because I can, does that mean I should, or am I missing something terribly important here?  I've tested this a little with my sample site, and it's crashing and burning, but I haven't tried it with a site that's actually used.

Any feedback would be great to have.
Aaron

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multi-site setup structure
March 03, 2008, 01:39:37 pm

It should work as you've described. I do the same thing across drupal/joomla installs to have only one svn repository and i switch links as needed. I assume all your settings files will be site specific, i.e.: sites/sample.example.com/civicrm.settings.php. Also ensure that your 'files' directory is site specific, i.e. sites/sample.example.com/files. this allows you to share the same codebase with different template files etc (since they are cached in different locations)

We might not guess all the directories properly, so you might want to check and ensure that.

Can you give more details about the crash and burn? The error you got with the db (in another forum post) is an upgrade error and not related to the above

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

acrosman

  • Guest
Re: Multi-site setup structure
March 03, 2008, 01:46:43 pm
Thanks for the feedback.

I left an important word out of the first post "not" as in not crashing and burning.   ;)

acrosman

  • Guest
Re: Multi-site setup structure
March 06, 2008, 08:28:01 am
Okay, now I've hit a problem, and I'm wondering if there is a way fix it.  The cronjobs for civi mail return a message:
Code: [Select]
Could not find valid configuration dir, best guess: /usr/local/lib/civicrm/1.9/../../sites
Is there a way to find it's way home? Or am I in trouble with this setup the way it is?

I'm running the cron jobs with the following URL:
Code: [Select]
http://sample.example.org/sites/sample.example.org/modules/civicrm/bin/civimail.cronjob.php?name=username&pass=password

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multi-site setup structure
March 06, 2008, 12:20:28 pm

can u add a file: settings_location.php here

ROOT/sites/sample.example.org/modules/civicrm/ (replace ROOT with the right directory)

in my install it has the following value

Code: [Select]
<?php

define
( 'CIVICRM_CONFDIR', '/Users/lobo/public_html/drupal/sites' );

?>


basically help us find where the settings file is for that combination of multi-site.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

acrosman

  • Guest
Re: Multi-site setup structure
March 06, 2008, 12:26:01 pm
That seems to have done the trick.  Thanks!

acrosman

  • Guest
Re: Multi-site setup structure
March 12, 2008, 12:51:21 pm
On to the next problem with this setup.
Previously I've been migrating existing sites to this structure.  Today, I tried to install a new site.  Drupal is installed and running, but when I went to run the CiviCRM install script, I get the "Oops! Please Correct Your Install Location" message which suggests installing the module at: sites/all/modules.

I'm trying to run the 2.0-BETA 5 installer.  The settings_location.php file is inplace, and several other sites work off this site just fine.  Any thoughts on the detail that I missed this time?

Thanks
Aaron

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Multi-site setup structure
March 12, 2008, 01:13:03 pm

the installer has been designed more for the single site install in the default location (sites/all/modules). This is the vast majority of civicrm users :)

I'd recommend u skip the installer and just copy the settings file and modify and load the sql manually. Will be easier :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

acrosman

  • Guest
Re: Multi-site setup structure
March 12, 2008, 01:13:48 pm
Right, thanks

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Multi-site setup structure
March 12, 2008, 02:48:33 pm
Hi,

just to confirm that I've had, so far without any problem, several sites running on the same drupal and civicrm code base. I have two db per site (drupal+civicrm).

under
drupal/sites/abc.dom
...
drupal/sites/xyz.dom
put the civicrm.settings.php  and settings.php

I do have a symlink below drupal/sites/all/modules and not any config file below all nor default

X+




-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

acrosman

  • Guest
Re: Multi-site setup structure
March 13, 2008, 07:58:42 am
What's different about your setup from mine, is that you've placed the symlink below sites/all/modules instead of sites/sitename/modules.  I want to be able to update 1 site at a time, instead of having to update them all at once.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: Multi-site setup structure
April 23, 2009, 07:43:11 am
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+for+Drupal+-+Configure+Multi-site+Installations

Just so people know, someone put it here to help with this.
It says it is outdated but still helped with this issue.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: Multi-site setup structure
April 24, 2009, 12:21:38 pm
???
Not sure if this was about the wiki?
Not much offered here just a line or two on making the multi site w/ drupal work?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Multi-site setup structure

This forum was archived on 2017-11-26.