Fundraising/tech/Installing Drupal and CiviCRM

From Wikitech

Checkout the code

cd /www

git clone --recursive https://git.wikimedia.org/git/wikimedia/fundraising/crm.git  fundraising-crm

Configure httpd

Next, you will want to create a virtual host. For Apache,

vi /etc/apache2/sites-enabled/fundraising-crm.localhost.conf
<VirtualHost *:80>
    ServerName fundraising-crm.localhost
    DocumentRoot "/www/fundraising-crm.localhost/drupal"

    php_value error_reporting "E_ALL"

    <Directory "/www/fundraising-crm.localhost/drupal">
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    
</VirtualHost>

Hosts

Configure your local hosts file to route to your site.

sudo vi /etc/hosts

127.0.0.1               fundraising-crm.localhost

Note: if you're configuring a local Apache host, you can alternatively just point it to the fundraising-crm/drupal folder and run it on any port. Another Note/pain prevention tip: If you've already gone with ports, you can't also have localhost subdomains.

Installing Drupal

Create drupal and civicrm databases and user accounts.

Proceed to your Drupal instance:

 http://fundraising-crm.localhost/ 
 (or whichever localhost port you chose)

This should begin the installation.

You will be prompted to do the following, but if not, do it anyway:

cd sites/default
cp default.settings.php settings.php
chmod a+w !$

Installing CiviCRM

Proceed to the link:

 http://[fundraising-crm.localhost or your local]/sites/all/modules/civicrm/install/

to begin configuration.

You may be prompted to temporarily set permissions:

 chmod a+w sites/default

Configuration

There are a few modules you will need to enable:

drush --root=/www/fundraising-crm/drupal en \
    civicrm \
    contribution_audit \
    contribution_tracking \
    exchange_rates \
    ganglia_reporter \
    globalcollect_audit \
    log_audit \
    offline2civicrm \
    paypal_audit \
    queue2civicrm \
    recurring \
    recurring_globalcollect \
    thank_you \
    wmf_civicrm \
    wmf_common \
    wmf_contribution_search \
    wmf_logging \
    wmf_refund_qc \
    wmf_reports \
    wmf_unsubscribe \
    wmf_unsubscribe_qc \
;

After installing modules, you should confirm that the db schema is stable:

 http://fundraising-crm.localhost/update.php?op=info

or by using the command,

 drush updatedb

Now, go through all of the module config screens.