Professional Documents
Culture Documents
Hands-on Labs 1
1
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
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.
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".
yum update -y
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.
5. The mysql command will prompt for your NewRootPassword (from above).
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
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.
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
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:
cp default.settings.php settings.php
chmod 666 settings.php default.settings.php
3
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
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
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
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
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.
6. You can sign into your site as admin to add/update or make any changes as desired, as
shown in Fig. 5.
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.
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
> QUIT
memory_limit = 32M
to:
memory_limit = 64M
extension=json.so
# cd /etc/php.d
# echo "extension=json.so" > json.ini
# 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
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
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.
http://<your_drupal_home>/sites/all/modules/civicrm/install/index.php
Fig. 1
10
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Fig. 1: Cont.
11
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
12
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
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.
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
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
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.
15
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
15. From Fig. 6, click My Contact Dashboard link to access your contact configuration screen on
the right pane.
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
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
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
©April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
Contact us today:
Email: info@globalopenversity.org
URL: www.globalopenversity.org
-----------------------------------------------
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.