| Instructions for v1.0 Beta ONLY These instructions apply to the 1.0 Beta release only. For current release installation, refer to our offical 2. Install. |
TABLE OF CONTENTS
| Drupal / CivicSpace Already Installed? CiviCRM is been tested with Drupal 4.5 and 4.6 and CivicSpace 0.8.1. If you already have an instance of one of these installed and running, you can skip to down to the Installing CiviCRM section. |
| Zend Optimizer Incompatibility CiviCRM will not run with Zend Optimizer release 2.5.7. The current release of Optimizer is 2.5.10 - and we are testing compatibility with this version now. We will update this info as soon as we have the results. For more info, refer to Linux installation - setting up the environment. |
Setting up Apache2 for Drupal
Lets prepare proper space for our CiviCRM installation. Create a file in /etc/apache2/sites-available/ directory:
and enable it:
Go to your Apache2s DocumentRoot and create directory named drupal and reload Apache2s settings:
You are all set up and ready to install Drupal and CiviCRM.
Setting up the databases
You will need two databases: one for Drupal and one for CiviCRM. You could share the same db user or create a new user for each db. The below code assumes a new user for each db. Make the necessary changes based on your requirements. The user will need to have sufficient privileges on both db's to perform all operations.
Perform the following operation:
You will need both databases very soon.
Drupal
Go to Drupal download site and fetch Drupal 4.6.2
Now edit /var/www/drupal/sites/default/settings.php and set up two configuration options:
Create database:
Open http://localhost/drupal in your browser. Do you see Drupal Welcome page? Now you only need to create Drupal admin account (remember to write down the password that was generated for you or better still, change the password!). You also need to set the "File System Path" in administer->settings, or create the /var/www/drupal/files directory.
You are ready to enter the final phase!
| Running CiviCRM with MySQL 4.0 CiviCRM 1.0 has been developed for and tested with MySQL 4.1. However, we now have a revision of 1.0 (tarballs labeled rev2072 and higher) which should run under MySQL 4.0. Follow the additional MySQL 4.0 steps below. |
| PHP4 on Mandrake If installing on Mandrake, you may see the following error when you browse to the Drupal Welcome page: XML support is not installed by default (at least in MDK10.1). If you receive this error - download a copy of the php-xml rpm and install it. |
Finally - Installing and Configuring CiviCRM
Download the Codebase
- The latest stable release of CiviCRM is available as dowloadable tarballs at:
http://downloads.openngo.org/civicrm/
| Select the Appropriate Tarball for Your Version of PHP For PHP4: Download civicrm-drupal-php4...tgz If you're not sure what version of PHP you have: |
- Copy the downloaded tarball file to your drupal/modules directory and untar it.
- There should now be a drupal/modules/civicrm directory with the civicrm files and sub-directories below it.
|
If you're interested in playing with the latest 'in development' code - you can access this from our svn repository. However, trunk code will only run under php5. |
Edit Configuration File
These instructions assume you have Drupal installed in /var/www/drupal. Adjust paths as needed.
- Create your local copy of the configuration file by copying config.user.php (default config file) to config.inc.php (the config file actually used by the installation):
- Now we need to tweak your configuration file. Open
modules/config.inc.phpin your favorite editor. It should look something like this:
- Update the $user_home, CRM_HTTPBASE and CRM_RESOURCEBASE to match your paths
- Update the CRM_DSN "YOUR_PASSWORD" string with your civicrm database password (and update user and database names if you did not use the recommended defaults)
- Update CRM_SMTP_SERVER with your SMTP Server if you plan on using the 'Send Email' feature
| MySQL 4.0 Configuration If you are running MySQL 4.0.x - change the CRM_MYSQL_VERSION value to 4.0 |
Edit and Run the Setup Script
The setup script creates additional data object code files (DAO folder) - in PHP5 installs (these are pre-built and included in the tarball download for PHP4 installs). Then it runs two SQL scripts - to create the CiviCRM database tables and then load both fixed data (e.g. countries, states, reserved relationships types, etc.) and some sample contact data (to help you try out CiviCRM before loading your own contact data).
| Setup Without Shell Access If you are installing the PHP4 version, and do NOT have shell/command-line access you can setup the CiviCRM database by running the following two SQL files from phpMyAdmin: |
| Modifications to Setup Script for Non-default CiviCRM DB and User Names If your CiviCRM database user name is NOT 'civicrm', replace the 1st instance of 'civicrm' in BOTH mysql lines with your user name. If your CiviCRM database name is NOT 'civicrm' replace the 2nd instance of 'civicrm' with your CiviCRM database name. |
| MySQL 4.0 Setup Script Changes (Database Loader) For MySQL 4.0, you will need to verify that the file Contacts.mysql40.sql is in the civirm/sql directory, and modify setup.sh or setup.php4.sh to replace the sql script file name as shown below. |
- For PHP5 installs:
|
If youre running PHP5 and you've installed PHP in /opt/bin/php5, you might also need to edit the setup script to specify a php path. Edit the line containing |
- For PHP4 installs:
Now all you need to do is log in to your Drupal installation and do final tweaks to configuration. First, go to "administer" -> "modules", and enable the civicrm modules. Next go to "administer" -> "blocks" and enable "CiviCRM Menu", "CiviCRM Quick Add", "CiviCRM Search" and "CiviCRM Shortcuts" blocks. In order to get handy layout of left hand menu items, you should also assign proper weights to menu items, as follows:
- Menu Weight: -4
- Search Weight: -3
- Shortcuts Weight: -2
- Quick Add Weight: -1
| Reminders for php4 installations If you are installing in a php4 environment:
|
| Configuring PHP to Handle Import Files from/on Macintosh Computers In order for CiviCRM to properly handle CSV import files created on Macs, you may need to update a PHP setting for detecting line endings. The symptom of this problem is that the "Import Contacts: Match Fields" step shows the file as one big record - rather than recognizing the end of each row.
|
Enjoy!

16 Comments
Hide/Show CommentsJun 14, 2005
Anonymous
Thanks Lobo.
I was able to make it operate, and am very excited by the progress.
On my dedicated host I would need to install custom second instance of Mysql 4.1, and custom second instance of PHP5, and run apache 2 on a separate port. As a shortcut, I installed the php5 version of civicrm on my OSX 10.4 laptop, 850 Mhz G4 with apache 1.
On that machine, performance is pretty painful. Even clicking on a user after a search takes quite a few seconds. I realize that optimization comes last, but can you give me some idea of what level of machine the developers are running it on?
I'm wondering if it's worth my time to create the environment needed to run civicrm at my dedicated host. (Probably requires compiling both mysql and php). It's a Super Celeron 2.4 GHz with 512MB RAM, runs a bunch of sites, but generally very lightly loaded.
Thanks,
Cheryl
Jun 15, 2005
Donald A. Lobo
hey cheryl:
The sandbox operates on a 1.7G Celeron with 512M RAM with ok performance. We are running on a combination of mac os x 10.3 labtops and linux desktops. performance on the os x box is not great (performance for base drupal pages is also quite high), i suspect this is mainly because OS X does not do a great job context switching php / apache and mysql
a couple of optimizations can be applied pretty easily, we are using innodb tables in mysql (allows us to catch errors in the DB), i suspect performance might be better if we switch to MyISAM. also if u built php using the ports system, it was most likely compiled with '-g'. In related good news, php5.1b1 has just been released with major speed improvements over 5.0.x and 4.4.x, i'll see how we do on that later this week
lobo
Jul 06, 2005
Cheryl Chase
PS: Not just trying to be an uber-geek by installing it rather than playing at your demo server. As soon as I can display data in this, my staff will use it (read only until we conclude that it is stable enough to trust our db with).
Jul 06, 2005
Donald A. Lobo
Hey cheryl:
can u please comment out line: 2062 from the file packages/DB/Dataobject.php ( $this->query("SET NAMES 'utf8'"); )
We have not tested things out on mysql 4.0.x (all our machines run 4.1.x, and we need
this since we want to support utf8 which has significantly better support in mysql4.1)
Jul 09, 2005
Anonymous
I tried Lobo's suggestion (remove SET NAMES), but it produced a slew of other msyql errors. So I've set up an account at http://textdrive.com (developer-oriented hosting service set up by the Textile/Textpattern and Ruby on Rails folks). $12/month with no setup fee provides apache 2, php 5 (and php 4), and mysql 4.1
However, now I find that the php5 package is missing the xml directory, and has GenCode.php right in the top level directory. What gives?
http://downloads.openngo.org/civicrm/civicrm-drupal-php5-v1.0BETA-rev2009.tgz
Jul 10, 2005
David Greenberg
Cheryl -
We recently eliminated the need to run GenCode.php for php5 installs - and hence the need for the xml directory. All DAO (data object) files are now included in the php4 AND php5 tarballs. Unfortunately, we did NOT catch the obsolete reference in setup.sh.txt.
You can comment out the line which calls GenCode.php...
and then setup.sh should run and things should be happy with your install.
Sorry for any inconvenience this over-sight caused
We will be formalizing a structured install script for 1.1 - with the appropriate QA - so as to minimize these types of problems going forward.
Jul 16, 2005
Anonymous
The supplied Contacts.mysql40.sql file does not work correctly with MySQL version 4.0.24, which is the standard on 1&1 hosted sites. The block comments using C-style /* * */ are invalid. I had to prefix all of those lines with SQL-92 standard "-- " to make it work right. It was rather frustrating to find since MySQL's syntax error messages are so completely vague.
Jul 16, 2005
Anonymous
This set of directions is non-functional. Drupal looks for actual modules (*.module) in subdirecrtories of its modules directory. Following these directions and using the tarbells pointed to by its links results in a directory structure that is incompatible with Drupal. One ends up with something that looks like this: DOCUMENT_ROOT/modules/civicrm/modules/civicrm.module
None of the files and directories which end up in the DOCUMENT_ROOT/modules/civicrm look anything like a module to Drupal.
It may well be that the tarball is wrong – since I noticed it contained Mambo code, too, which is of course not needed here.
I'm not sure what hacks I need to get this to work, but I'm going to try some.
Jul 16, 2005
Anonymous
Me again (Mr. Anonymous of the 2 previous posts). For your reference, I'm using this tarball: http://downloads.openngo.org/civicrm/civicrm-drupal-php4-v1.0BETA-rev2072.tgz
It looks like there is a bunch of configuration stuff missing or something. At this point, I'm giving up until I get at least a tidbit more information as to what a working install should look like.
Jul 19, 2005
Donald A. Lobo
1. the drupal module is in the directory modules/civicrm.module. Note that in drupal version 4.5 and later (not sure about earlier), the module file can reside in a subdirectory
2. Thanx for te mysql4.0 comment standards. We'll fix our code base to reflect that in the next release
Jul 19, 2005
David Greenberg
Responding to the 3 posts from 'Mr. Anonymous' above....
Regards,
Dave Greenberg
Jul 20, 2005
Anonymous
Is it possible to install without shell access. I've attempted to replicate most steps using ftp and, phpMyAdmin and editing files. I think I followed most steps though I have several errors and don't have CRM working with Drupal yet. If it is possible could you write up some instructions along those lines?
Things that confused me so far:
config.inc.php or user.inc.php- it seems the instructions say to change the user.inc.php file to config.inc.php. Is this correct? Why not just have the file properly labeled in the tarball?
paths in config.inc.php- the instructions and examples for setting the paths are a bit confusing. Could the example include the root directory of the install as well as the proper url for example purposes?
Jul 20, 2005
David Greenberg
It should be possible to install without shell access. Let us know what errors you saw and we can provide further guidance.
Regarding the civicrm config file...the 'sample' file distributed in the 1.0 tarballs is named config.user.php. This file is copied as config.inc.php - which you then edit for your settings. config.inc.php is the actual file used by the module to determine configuration settings.
Jul 22, 2005
Donald A. Lobo
make sure you have set the CRM_MYSQL_VERSION propertly (in this case 4) for your install
Sep 15, 2005
Anonymous
i followed these instructions. i have mysql 4.0.24-log on my web host. it seems to have worked without errors.
unfotunately, now i get a "civicrm" entry under administer->modules, but it has no description. when i enable it, and go to blocks, there are no civicrm blocks there.
i went back and followed the instructions in the config.inc.php file, to create the compile and uploads directories, but this did not help.
do you have any suggestion as to what may be wrong?
i'm using a php4 install and the tarball seems to be from sept 14th. it's civicrm-drupal-php4-v1.1-rev2954.tgz . is that a stable version?? i followed the link in the above instructions to get it.
i also have a bunch of tables like:
Browse: (0 Rows) civicrm_activity_history
Browse: (0 Rows) civicrm_activity_type
Browse: (0 Rows) civicrm_address
Browse: (0 Rows) civicrm_contact
which have table structures, so the db doesn't seem to be the problem. i used the civicrm_40.mysql file through my phpMyAdmin interface.
i'm installing this for a nonprofit i work with and we're very excited to start using it.
lotus at NOSPAM indymedia d0t org
Sep 15, 2005
Donald A. Lobo
sorry about that, was a bad download file. have updated and fixed. can u please try again