Sei sulla pagina 1di 21

Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.

Global Open Versity


Systems Integration Hands-on Labs Training Manual

Step-By-Step Install Guide CiviCRM with Drupal on Linux


Kefa Rabah
Global Open Versity, Vancouver Canada
krabah@globalopenversity.org
www.globalopenversity.org

Table of Contents Page No.

STEP-BY-STEP INSTALL GUIDE CIVICRM WITH DRUPAL ON LINUX 1


Introduction 1

Hands-on Labs 1

Part 1: Install Drupal 6 CMS 1


Step 1: Assumption 1
Step 3: More steps before diving into Drupal 3
Step 4: Now, Go For It! 4
Step 5: A Final Note – Watch Out SELinux! 8

Part 2: Install CiviCRM 8


Step 1: Create CiviCRM Database 8
Step 2: Install Prerequisite Packages 9

Part 3: Hands-on Labs assignments 18


Web Content Management Training 19

Linux Administration Training 19

A GOV Open Access Technical Academic Publications


Enhancing education & empowering people worldwide through eLearning in the 21st Century

1
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Global Open Versity


Systems Integration Hands-on Labs Training Manual

Step-By-Step Install Guide CiviCRM with Drupal on Linux


By Kefa Rabah, krabah@globalopenversity.org Sept 16,, 2010 GTS Institute

Introduction
Drupal is a free software package that allows an individual or a community of users to easily
publish, manage and organize a wide variety of content on a website. Tens of thousands of
people and organizations are using Drupal to power scores of different web sites, including:
Community web portals; Discussion sites; Corporate web sites; Intranet applications; Personal
web sites or blogs; Aficionado sites; E-commerce applications; Resource directories; and Social
Networking sites.

CiviCRM is a free, libre and open source software constituent relationship management solution.
CiviCRM is web-based, internationalized, and designed specifically to meet the needs of
advocacy, non-profit and non-governmental groups. Integration with both Drupal and Joomla!
content management systems gives you the tools to connect, communicate and activate your
supporters and constituents.

Today most nonprofits and community groups maintain relationships with many types of
constituents. CiviCRM enables organizations to maintain comprehensive constituent relationship
management information in a single database, creating efficiencies and new opportunities for
nonprofits to better communicate and benefit from relationships with their constituents. CiviCRM
includes optional components which give you more power to connect and engage your
supporters.

Hands-on Labs
In this hands-on lab session you’ll learn how to install Drupal 6 CMS on Linux CentOS 5 with
MySQL database. Next you’ll learn how to install and integrate CiviCRM with Drupal CMS. Upon
completion of this lab session you’ll have gained competent to install and integrate CiviCRM with
Drupal CMS.

Part 1: Install Drupal 6 CMS

Step 1: Assumption

1. It’s assumed that you know how to install and configure Linux CentOS52. If not, then
checkout or excellent hands-on labs manual "Install Guide Linux CentOS5 Server".

1. Upgrade the operating system


1
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

yum update -y

2. Install common programs

yum install php mysql-server php-mysql php-mbstring php-gd

3. Reboot the system

Step 2: Starting MySQL & Creating Database

1. If you already have MySQL installed secured and running, skip to step 7.

2. As root, in a command line, depending on how you have paths set up, you may have to use
/sbin/service for the command. You should get an OK as feedback when it's done.

3. Still as root, enter service mysqld start. Once again, wait for the OK.

4. To have MySQL start up on boot, as root enter chkconfig --level 345 mysqld on. There is
also a GUI way of starting/stopping services, but I prefer the command line.

4. IMPORTANT! Set up the mysql database root password. Without a password, ANY user on
the box can login to mysql as database root. The mysql root account is a separate password
from the machine root account.

mysqladmin –u root password 'NewRootPassword'\\quotes are required

5. The mysql command will prompt for your NewRootPassword (from above).

6. Make additional security-related changes to mysql.


Mysql –u root –p
Mysql> DROP DATABASE test; \\ removes the test dbase
Mysql> DELETE FROM mysql.user WHER user = ''; \\ removes anonymous across
Mysql> FLUSH PRIVILEGES;

7. Create a database and database-user for use with drupal CMS. You will use this database and
username in your database connection string. The GRANT statement actually creates a new
MySQL user account.

8. We now need to create the drupal database and drupal user in MySQL.
mysql -u root -p
> CREATE DATABASE drupaldb DEFAULT CHARACTER SET utf8;
> GRANT ALL PRIVILEGES ON drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY
'drupalpass';
> GRANT SELECT,LOCK TABLES on drupaldb.* TO 'drupal'@'localhost' IDENTIFIED BY
'drupalpass';
> FLUSH PRIVILEGES;
> QUIT
2
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Note: The above also creates a backup user drupal so that you can use mysqldump to make
database backups without accident. Replace drupalpass with a secure password of your own
choosing.

Step 2: Drupal on CentOS5

1. If your install Drupal using Package Manager, then Drupal installs to /var/www directory

2. You use httpd to control access to Drupal. This is what keeps visitors from getting access to
your system, since httpd forbids going up above allowed directories by default.

3. The base setup of httpd and Drupal is set in "/etc/httpd/conf.d/drupal6.conf", where you
find

Alias /drupal /var/www/drupal


<Directory /var/www/drupal>
AllowOverride All
</Directory>

Note: This is already set if you are using CentOS5.

Step 3: More steps before diving into Drupal


1. Hope over to www.drupal.org and down load the latest Drupal package. At the time of writing
we downloaded "drupal-6.19.tar.gz".

2. Copy downloaded package to "/var/www/" directory

cp drupal-6.19.tar.gz /var/www/

cp /var/www/
tar -zxvf drupal-6.19.tar.gz

3. You will get permissions error messages from Drupal as it tries to establish your site, unless
and until you do the following:

chmod –R 777 /var/www/drupal

4. Go to the default directory "/var/www/drupal/sites/default", and

cp default.settings.php settings.php
chmod 666 settings.php default.settings.php

5. Finally, you do need to restart httpd after these steps.

service httpd restart

3
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

6. You’re done with this section.

Step 4: Now, Go For It!

1. Go for installation: http://localhost /drupal Or http://yourdomain/drupal


At this point, you should be able to enter http://localhost/drupal in your browser, and
bring up the forms for starting up your Drupal site,

2. Click link: Install Drupal in English \\ or any language of choice


Follow the installation process by entering your basic database and other administrator
information, after which you're off and running!

Fig. 1: Verify Database name and username, and then click save.

3. From Fig. 1, click Save and Continue button, and you should be able to access Fig. 2.

4
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 2: Provide the as requested

Note 1: You may change the Site name from "localhost", to reflect your domain name or
IP address, as desired.

Note 2: Fig. 2 is split and continued on the next page, see Fig. 3. Again click on the Save
and continue button.

5
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 2: Cont.

Fig. 2 Cont: Provide the as requested, and don’t change default settings.

4. From Fig. 3, click "You may now visit your new site" link to go to your new homepage.

6
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 3: Click new site

5. You can change home your homepage name to reflect your site’s name, in our case it’s
Flinstate University (FU), in Flinstville. Login with appropriate admin user credentials used
during initial installation.

Fig. 4: FU User Login Homepage


7
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

6. You can sign into your site as admin to add/update or make any changes as desired, as
shown in Fig. 5.

Fig. 5: FU Admin Homepage

Step 5: A Final Note – Watch Out SELinux!

It's possible there will not always be problems with SELinux, but for many tasks in CentOS5 it
simply helps to change the enforcing mode of SELinux to Permissive. Ideally, some day there
may be some helpful documentation about SELinux to create some targeted policies that work,
but for now, this seems to be what many are doing, and not specifically just about Drupal.

Part 2: Install CiviCRM

Step 1: Create CiviCRM Database


1. We now need to create the "civicrm" database and "civicrm" user and password
"civicrm" using MySQL database.

mysql -u root -p
> CREATE DATABASE civicrm DEFAULT CHARACTER SET utf8;
> GRANT ALL PRIVILEGES ON civicrm.* TO 'civicrm'@'localhost' IDENTIFIED BY 'civicrm';
> FLUSH PRIVILEGES;

8
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

> QUIT

2. You’re done with this section

Step 2: Install Prerequisite Packages


1. We need to memory from 32M to 64M, to do this, edit "/etc/php.ini" file from:

memory_limit = 32M

to:

memory_limit = 64M

2. Restart httpd daemon:

service httpd restart

3. Install Configure JSON

# pear install pecl/json

Note: we now need to create a new file "/etc/php.d/json.ini" and add

extension=json.so

4. Next, do the following:

# cd /etc/php.d
# echo "extension=json.so" > json.ini
# service httpd restart

1. After that "phpinfo()" would output

json support enabled


json version 1.2.1

5. Restart httpd daemon:

service httpd restart

6. Fire-up your browser and hope over and download from here the appropriate tarball file.
Tarball file-names include the CiviCRM version. At the time of writing we downloaded
"civicrm-3.2.0-drupal.tar.gz". to favorite download directory.

Note: all CiviCRM code and packages used by CiviCRM (such as PEAR libraries) are included
in the compressed CiviCRM distribution files ('tarballs').
9
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

7. Create a new "modules" folder under "/var/www/drupal/sites/all" directory

cd /var/www/drupal/sites/all/

mkdir modules

8. Change to your download directory and copy or ftp the tarball file to your Drupal installation's
"/var/www/drupal/sites/all/modules" directory, not the "drupal/modules" directory, to
follow best practice and prepare for future Drupal core upgrades.

cp civicrm-3.2.0-drupal.tar.gz /var/www/drupal/sites/all/modules

tar –xvzf civicrm-3.2.0-drupal.tar.gz

Note 1: you should now have a "drupal/sites/all/modules/civicrm" directory with a


number of directories below it (including bin, CRM, sql and templates).

Note 2: you may have to change the "File Permissions" setting of "/sites/all"
directory to allow for "write" Access. Just remember to change it back to default when done.

chmod –R 777 /var/www/drupal/sites/default

9. Install civicrm using the following URL:

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

Fig. 1
10
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 1: Cont.

10. Fig. 1. Cont.

11
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 1: Click "Check Requirements and Install CiviCRM"

12
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

11. From Fig. 1 above, click "Check Requirements and Install CiviCRM" to begin instillation,
when completed, you should be taken to the "CiviCRM has been successfully installed"
page, as shown in Fig. 2.

Fig. 2: Final "CiviCRM has been successfully installed" page

12. From Fig. 2, click any of the links shown on the page to go back to Drupal admin home page,
as shown on Fig. 3. You should now see the link to the installed CiviCRM.

13
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 3
13. From Fig. 3, lick on the CiviCRM link to go to the CiviCRM Home page, as shown in Fig. 4.

Fig. 4

14
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

14. From Fig. 4, click on "Configure your Dashboard" button, to access Fig. 5. When done
configuring your dashboard. Click on the Done button, see Fig. 5.

Fig. 5: Configuring your dashboard page

15
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

15. From Fig. 6, click My Contact Dashboard link to access your contact configuration screen on
the right pane.

Fig. 5: Configuring your contact dashboard page

Note: from Fig. 5, you can join any group of your choice; check You Contribution(s), Your
Pledge(s), Your Event(s), Your Membership(s). Create Personal Campaign Pages, modify Your
Contacts/Organizations.

16. From Fig.5, click various tabs to perform other task as shown in Fig. 6 (a) to (f).

16
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 6 (a -c): Performing other tasks on your CiviCRM from the tab links.

Fig. 6 (d-f: Performing other tasks on your CiviCRM from the tab links.

17
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Fig. 6f: Performing other tasks on your CiviCRM from the tab links.

17. Take your time to checkout and get familiarize with other functionalities available with your
CiviCRM on Drupal 6.

18. You’re done with section and also the lab.

Part 3: Hands-on Labs assignments


1. Install and update Linux CentOS-5 or any Linux distro of choice.
2. Install and configure Drupal 6 CMS on Linux and add some example contents as desired
3. Install and configure CiviCRM and integrate it with Drupal CMS

Extended Bonus Assignment


4. Install and configure Joomla CMS on Linux and add some example contents as desired
5. Install and configure CiviCRM and integrate it with Joomla CMS

18
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions


Global Open Versity ICT Labs Step-By-Step Install Guide CiviCRM with Drupal on Linux v1.0

Web Content Management Training


You can now register and take our superb Web Content Management Training course. This course covers
CMS and LMS software and applications: Moodle, Mahara, Drupal, Joomla, CiviCRM, Liferay, Alfresco
and many more:

• EBT105 – Web Content Management Training

Contact us today:
Email: info@globalopenversity.org
URL: www.globalopenversity.org

Linux Administration Training


Make a smart move, its time you reconfigure your skill-sets and move your career into the fastest moving
high tech gravy train of the Linux Open Source world, join our Linux program today:

• Linux Enterprise Infrastructure Engineering Diploma – ICT202

Other Related Articles:

1. Using Webmin and Bind9 to Setup DNS Server on Linux


2. Installing Drupal using MySQL on Linux v1.2
3. Step-by-step Install Guide for Moodle with Dimdim Web Meeting
4. Step-By-Step Install Guide Alfresco Community 3.3g with Google Docs on Windows v1.0
5. Step-By-Step Install Guide Alfresco Community 3.3g on RHEL5 Server v1.0
6. Step-By-Step Install Guide Joomla CMS on Ubuntu 10.04 LTS Server v1.0
7. Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server
8. Step-By-Step Install Guide DTC on Linux CentOS5 Server v1.0
9. Deploy Secure Messaging Solutions using USendUmail & Dovecot Servers with ClamAV on Linux
10. Build your Own Private Data Center Backup Solutions using Ubuntu Powered RESTORE Backup
Server v1.0
11. Install Guide IPCop Firewall for Network Security with Spam and Virus Protection

-----------------------------------------------
Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is knowledgeable in several
fields of Science & Technology, Information Security Compliance and Project Management, and
Renewable Energy Systems. He is also the founder of Global Open Versity, a place to enhance your
educating and career goals using the latest innovations and technologies.

Fellow us on Twitter: Global Open Versity and Kefa Rabah

A GOV Open Access Technical Academic Publications


Enhancing education & empowering people worldwide through eLearning in the 21st Century
19
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT200 – Electronic Information Management Systems Solutions

Potrebbero piacerti anche