Dashboard > CiviCRM Documentation > ... > 2. Install > Install 2.0 for Drupal
Install 2.0 for Drupal Log In | Sign Up   View a printable version of the current page.

 Contents
  Documentation Home
Automated Installer for CiviCRM 2.0 on Drupal
This page provides instructions for using the web-based Automated Installer. This is the recommended installation method.
Before beginning the install process, please verify that your server meets the requirements for CiviCRM 2.0.

If you are upgrading from v1.9 to v2.0 - use these instructions.

1. Server Requirements

CiviCRM for Drupal has been developed and tested by our team on the following 'recommended' platforms:

  • Linux
  • Apache 2.0
  • PHP 5.2.x
  • MySQL 5.x with INNODB enabled
  • Drupal 5.x
    Caution: Under Linux, the optional CiviMail component requires PHP 5.X with SOAP and DOM extensions, Postfix 2.2 (a mailer), and Perl 5.8.X. (more info...)

2. Drupal Installed

The automated installer requires Drupal 5.x.. If you do not have the required version of Drupal installed, refer to:

  • Drupal Installation Guide
    Path for Drupal
    The rest of these instructions assume that you have Drupal installed in /var/www/drupal. Adjust paths as needed.

Verify Drupal Database Settings

You will need to know the database settings for your Drupal installation prior to running the CiviCRM installer:

You can look up these values in your Drupal settings.php file (located by default in your <drupal_root>/sites/default directory)

$db_url = 'mysql://dbuser:dbpassword@localhost/drupal';

In the above example:

Setting Value
Database Server localhost
Drupal Database Name drupal
Database User Name dbuser
Database User Password dbpassword

3. Download and Un-tar CiviCRM Code

All CiviCRM code and packages used by CiviCRM (such as PEAR libraries) are included in the compressed CiviCRM distribution files ('tarballs'). Follow these steps to download and install the codebase:

  • Download the appropriate tarball file from here with your browser. Tarball file-names include the CiviCRM version. For example, civicrm-2.0.xxx-drupal.tar.gz.
  • Copy or ftp the tarball file to your Drupal installation's /sites/all/modules directory.
    Downloading Directly to Your Server with wget
    If you have command-line access, you may prefer to download the tarball file directly to you server using wget:
    // Move into Drupal's modules directory
    cd /var/www/drupal/sites/all/modules
    
    // wget the file (modify this line to use the current tarball file name for the version you want)
    wget http://downloads.sourceforge.net/civicrm/civicrm-2.0.xxx-drupal.tar.gz
  • Un-tar (unpack) the codebase into the drupal/sites/all/modules directory.
    // Move to the drupal/sites/all/modules directory (if not already there)
    cd /var/www/drupal/sites/all/modules
    
    // Un-tar the file (modify this line with the actual downloaded filename)
    tar -xzf civicrm_download_file.tgz
  • You should now have a drupal/sites/all/modules/civicrm directory with a number of directories below it (including bin, CRM, sql and templates).

4. Run the Installer

The installer will verify that you've downloaded the correct version of CiviCRM, and will check your server environment to make sure it meets CiviCRM requirements. It will then create and populate a database for CiviCRM as well as create your CiviCRM settings file (civicrm.settings.php).

  • Login to your Drupal site with Administrator level permissions.
  • Point your web browser to the following URL:

http://<your_drupal_home>/sites/all/modules/civicrm/drupal/install/index.php

  • You should see the CiviCRM Installer screen.
    • Initially, you will see a red bar with the message "These database details don't appear to be correct." This is expected as you haven't entered your database settings yet.
    • If you see other errors, check the Requirements details at the bottom of the page for more information. You will need to correct any issues before continuing.
  • Fill in the CiviCRM Database Settings.
    Where Should I Store CiviCRM Data?

    CiviCRM may be configured to use your existing Drupal database, or a separate (new) database. Using a separate database is generally preferred - as it makes backups and upgrades easier. The installer will create a new database for CiviCRM automatically if you enter a database name that doesn't already exist on your database server AND the database user you enter has permission to create databases.

  • Fill in the Drupal Database Settings for your existing Drupal database (as noted in step 2 above).
    Loading Sample Data

    The Installer includes an option to load a set of sample contact, group, and relationship data by default. Sample data can provide a useful head-start in learning to use CiviCRM. However, if you do NOT want the sample data to be loaded, just uncheck Load sample data under Other Settings.

  • Click the Check Requirements and Install CiviCRM button.
    • The installer will configure your databases, create the settings file and redirect you to your Drupal Home page.
    • If you still see a red bar with the message "These database details don't appear to be correct." - check the Database Details section below your settings for specific errors and problems. Once you correct these problems, click "Recheck requirements" to verify your settings before continuing.
    • Once you see the green "You're ready to install!" message - you can click Check Requirements and Install CiviCRM

5. Enable CiviCRM Module and Blocks

Now you are ready to enable the CiviCRM module and blocks in Drupal.

  • Login to your Drupal site with and Administrator level login (if not already logged in).
  • Go to Administer » Site Building » Modules.
  • Make sure CiviCRM is enabled (CiviCRM is listed under "Other").
  • Click Save configuration at the bottom of this form.
    Note that Drupal tries to create the /files/ directory (and make it writeable), but only when saving admin/settings. Same holds for /temp directory, and a /uploads/ directory in the CiviCRM module root. On a brand-new Drupal install, this directory may be missing. Even on an existing installation, if file permissions are not set properly, the directory may be missing. If enabling the civicrm module generates errors regarding the files directory, you must create it (writeable) manually. Refer to Step 2 for instructions on directories to create and permissions to set.
  • Go to *Administer » Site Building » Blocks* and enable CiviCRM blocks by assigning them to a Region (typically the left sidebar - but this depends on your theme and desired layout). Blocks to consider enabling are "CiviCRM Menu", "CiviCRM Quick Add", "CiviCRM Search" and "CiviCRM Shortcuts". In order to get a handy layout of left-hand menu items, you could also assign weights to the blocks as follows:
    • Menu Weight: -4
    • Search Weight: -3
    • Shortcuts Weight: -2
    • Quick Add Weight: -1
  • Go to Administer » User management » Access control
    • Verify that the Roles that you want to have access to CiviCRM have the appropriate permissions checked. CiviCRM is installed with a number of fixed permissions (such as "edit contacts" and "administer CiviCRM").
      Permissions for the Anonymous Role
      Many sites want anonymous visitors to have access to certain CiviCRM functionality. Consider enabling these permissions to the Anonymous role - depending on your requirements:
      • profile listings and forms : If you plan on collecting name and address or other information from visitors, enable this permission for the "anonymous" role.
      • make online contributions : If you plan on soliciting online contributions from visitors, enable this permission for the "anonymous" role.
      • register for events : If you plan to use CiviEvent and want to allow un-authenticated visitors to register for events online - enable this permission for the "anonymous" role.
      • access all custom data : If you plan on collecting "custom" data from visitors in standalone forms or as they make a contribution - enable this permission.

6. Create CiviCRM Contacts for Existing Drupal Users

Once installed, CiviCRM keeps your Drupal Users synchronized with corresponding CiviCRM contact records. The 'rule' is that there will be a matched contact record for each Drupal user record. Conversely, only contacts who are authenticated users of your site will have corresponding Drupal user records.

When CiviCRM is installed on top of an existing Drupal site, a special CiviCRM Administrative feature allows you to automatically create CiviCRM contacts for all existing Drupal users:

  • Login to your Drupal site with an administrator-level login
  • Click the CiviCRM link in the main navigation block
  • Click Administer CiviCRM
  • Click Synchronize Users-to-Contacts in the top group of icons

7. Test-drive CiviCRM

There should now be a CiviCRM link in your Drupal menu. Click that link and the CiviCRM Menu, Shortcuts, Search and New Individual Blocks should appear.

You can now explore CiviCRM end-user features and begin configuring CiviCRM for your site/organization needs. Refer to the Administrator Guide for information on configuration tasks and options.

Trouble-shooting Resources

Review the Installation and Configuration Trouble-shooting section of our wiki for help with problems you may encounter during the installation.

You can often find solutions to your issue by searching the installation support section of the community forum OR the community mailing list archives, and you can check out the Installation section of our FAQs.

If you don't find an answer to your problem in those places, the next step is to post a support request on the forum.


Added by David Greenberg , last edited by David Greenberg on Mar 26, 2008  (view change)
Labels: 
(None)

Recently Updated  |  Documentation Credits

If you are running Drupal and find the theme doesn't display civi's menus or administration pages correctly, try the following at the end of Step 5:

  1. Click the CiviCRM menu item in the navigation block.
  2. Click Administer CiviCRM.
  3. Click Global Settings.
  4. Click Resource URLs.
  5. Change the CiviCRM Resource URL field from http://<your-drupal-path>/modules/civicrm/ to http://<your-drupal-path>/sites/all/modules/civicrm/.

If you want to use ACL's to protect some custom data, do not grant the 'Access All Custom Data' permission as instructed above in step 5. Instead, create ACLs in 'Administer CiviCRM' and assign 'everyone' access to those custom fields groups that you use in public forms.

Powered by a free Atlassian Confluence Open Source Project License granted to CiviCRM . Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators