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) »
  • Discussion (deprecated) »
  • Documentation, Book and Training Resources (Moderator: Michał Mach) »
  • Tips for a successful Drupal + Linux install of CiviCRM
Pages: [1]

Author Topic: Tips for a successful Drupal + Linux install of CiviCRM  (Read 2601 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Tips for a successful Drupal + Linux install of CiviCRM
January 19, 2011, 09:19:37 pm
These are my own personal tips, in addition to what is listed in the install docs themselves.  Of course, the install docs are a must read.  These are the opinions of myself, none other.

1. Get a VPS host.  Shared hosting usually doesn't work well.  If you plan on sending bulk mail, check your VPS hosts sending policies.  Do they allow bulk mail?  If so, how much?   Choose a host that is experienced in CiviCRM.  I recommend www.spiretech.com, personally.

2. Install Drupal first. (this may seem obvious, but to newbies it is not!)

3. Set up a user so that the web root where Drupal and Civi will live is not owned by root, but rather a user of its own.  You could use 'Virtualmin' or some other user-management system for this.  For simplicity's sake I'll call this user "mycivi" - the actual name is irrelevant.

4. Structure the permissions so that the webroot is all owned by "mycivi".

5. Make sure that <webroot>/sites/default/files is ALSO writable by the webserver itself, this is normally called user "apache" or "nobody".  There are a couple of ways, technically, to do this.  The first is to chmod 777 the sites/default/files directory but I don't recommend this.   The second, better way is to chgrp the sites/default/files directory to "apache" and chown 775 the sites/default/files directory.   This gives both the "mycivi" user and "apache" the ability to write to this directory.  An alternative would be to add user "apache" to a group to which "mycivi" belongs.  This works, but it's not as obvious when looking at the directory structure what is going on.   CiviCRM likes to write files to the directory structure, and does so as the webserver, regardless of how you accomplish this - civicrm must be allowed to do its job.

6. Setup the Drupal and CiviCRM as separate databases when you install them.  Some may argue that this is problematic for Views, but if you know how to get Drupal to read a second database, it is not that hard to do.  The advantages of separate databases outweigh the short-term convenience of a single database install.

6. Manage your
   <webroot>/.htaccess
   <webroot>/sites/default/settings.php
   <webroot>/sites/default/civicrm.settings.php
files so that the domain name of your installation is consistent.  For instance, either you should use the "www" in front of your domain or you should not, and this should be the same in each of the above files.  Use the mod-rewrites in the .htaccess file to control the domain you want to use, and make sure it is always used.

Good luck!

If anyone else has tips for Linux/Drupal installs, please post them here.  Do not post support requests on this thread.  Jump on over to the Installation forum instead.
« Last Edit: January 19, 2011, 09:25:13 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Tips for a successful Drupal + Linux install of CiviCRM
October 29, 2011, 07:14:33 am
Quote from: Stoob on January 19, 2011, 09:19:37 pm
6. Manage your
   <webroot>/.htaccess
   <webroot>/sites/default/settings.php
   <webroot>/sites/default/civicrm.settings.php
files so that the domain name of your installation is consistent.  For instance, either you should use the "www" in front of your domain or you should not, and this should be the same in each of the above files.  Use the mod-rewrites in the .htaccess file to control the domain you want to use, and make sure it is always used.

One helpful finding in this area...

Recent builds of Civi have not liked Drupal installations which are not in Multi-Site configuration. That is, running with /sites/default/ only.

This shows up under "Settings - Update Directory Path and URL", the "Site Name" value. Also in running the various cron jobs, some will not succeed without "Site Name" being correct.

This may easily be corrected by placing a symlink in the /sites/ directory as follows:

Code: [Select]
cd /sites
ln -s default domain.org

Where domain.org is what ever the real preferred domain name of the site.
« Last Edit: October 29, 2011, 07:32:35 am by mdlueck »
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Documentation, Book and Training Resources (Moderator: Michał Mach) »
  • Tips for a successful Drupal + Linux install of CiviCRM

This forum was archived on 2017-11-26.