= CiviCRM HowTo Install Tags: [[CiviCRM]] [[HowTo]] 1. [[Drupal HowTo Install]] 2. Follow the official guide at [[https://wiki.civicrm.org/confluence/display/CRMDOC/Drupal+Installation+Guide+for+CiviCRM+4.5+-+Drupal+7|Install CiviCRM]] or: 1. Create the CiviCRM database: 1. Log into MySQL. 2. {{{CREATE DATABASE {database name} CHARACTER SET utf8 COLLATE utf8_general_ci;}}} 3. {{{GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, TRIGGER ON {database name}.* TO '{username}'@'{server}' IDENTIFIED BY '{password}';}}} 1. Download the relevant version of CiviCRM from [[https://svn.rcs.le.ac.uk/LCBRU/utilities/civicrm/civicrm_releases/]] 2. Copy the core Civi and internationalisation files into the {{{{Drupal folder}/sites/all/modules}}} directory. 3. {{{tar -xzf civicrm-{version}-drupal.tar.gz}}} 4. {{{tar -xzf civicrm-{version}-l10n.tar.gz}}} 5. Browse to the address {{{http://{Drupal site address}/sites/all/modules/civicrm/install/index.php}}} 6. Enter the database details. 7. - Add localisation, to allow for English (UK) language: relevant l10n file for civi version. - Then follow additional localisation instructions at: http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+Localisation - Log in as the site administrator account, and go to /sites/all/modules/civicrm/install/index.php - Provide details of civicrm database connection and other pre-install configuration. - Full details of the installation step here: http://wiki.civicrm.org/confluence/display/CRMDOC42/Drupal+Installation+Guide+for+CiviCRM+4.2+-+Drupal+7 - Enable the 'CiviGroup Roles Sync' module. - Run CiviCRM > Administration > 'Users and Permissions' > 'Synchronize contacts to users', to ensure that cid=1 is set to the site admin user. == Configuration Check List === Localization - Default Language: English UK - Default Currency: GBP - Available Currencies: GBP - Available Countries: UK - Available States: UK === Organisation Address and Contact Info Enter something appropriate. Make it witty, but not rude. === Enable Components Enable CiviCase and CiviReport only. Remove other components. === Register your site Not likely === Display Preferences ==== Untick: - Editing Contacts > IM - Editing Contacts > Open ID - Editing Contacts > Website - Notify activity assignees ==== Tick - Contact Dashboard > Assigned Activities === Address Settings ==== In Mailing Labels and Address Display: - Move supplemental_address_1 field ABOVE the street_address field. - Change 'contact.state_province' to 'contact.state_province_name'. ==== Address Editing Turn off: - post code suffix - county - latitude - longitude - street address parsing. === Mapping and Geocoding Move along === Search Settings Keep Moving === Misc Still nothing === Contact Types Still nothing. This must be done in the LCBRU module set up. === Outbound Email - Select Mailer: SMTP - SMTP Server: smtp.xuhl-tr.nhs.uk - Port: 25. - Authentication is not required. === From Email Address Options ... and beyond Nothing more from the checklist. == Other Settings === Administer > Localization > Date Formats. Complete Date: 'dd/mm/yyyy' === Administer > System Settings > Directories - Custom Templates: '[Drupal Base]/sites/all/civicrm_templates' - Custom PHP Path Directory: '[Drupal Base]/sites/all/civicrm_php' - CiviCRM Extensions Directory: '[Drupal Base]/sites/all/civicrm_extensions' '''You will need to create these directories first''' === Administer > Customize Data and Screens > Word Replacements Create the following replacements: - !CiviCase > Study Management - Case Types > Research Studies - Case Type > Study - Open Case > Enrol into study - Case Subject > Enrolment Label - Case Statuses > Enrolment Statuses - Case > Study Enrolment - case > study enrolment - Client > Participant ''Make sure they are all enabled'' == Enable LCBRU Module Finally, install the lcbru module to configure the GENVASC case structure and other customisations specific to the LCBRU, the GENVASC label printing module and the ICE messaging module. == Configuring Civi Cases The definition XML files for the CiciCRM Cases for each Study is attached to the Study TRAC page. 1. Ensure that all the Activity Types used in the Study Definition XML file is defined within CiviCRM (Administer >> Customise Data and Screens >> Activity Types) against the !CiviCase component. 1. Copy the Study Definition file into the following directory: {{{Drupal civicrm_templates}}}/CRM/Case/xml/configuration 1. Create the Case Types in Administer > Study Management > Research Studies. Complete the form using the exact same text for the Label as you entered for the CaseType element in your case configuration files. == Issues == === CiviCRM Documentation === Configuration of CiviCase: http://wiki.civicrm.org/confluence/display/CRMDOC41/CiviCase+Configuration#CiviCaseConfiguration-ConfiguringCiviCase [[Notes on Drupal and LDAP configuration ]] - used to create user accounts, and associate the user accounts to the 'LCBRU staff' group. === PDF generation === Better performance in PDF generation is offered with the wkhtmltopdf library - which SHOULD NOT be installed on Ubuntu using apt-get, but by downloading and installing the pre-compiled version from the website, which includes an internal X server for use on headless machines. Copy the resulting executable to /usr/bin/wkhtmltopdf and then in the CiviCRM admin menu you can point to the executable, and CiviCRM will use that. === Mail merging, tokens, etc === The {contact.state_province_name} token works in the display screens but not in the mail merges. There's a replacement token supplied using hooks in the LCBRU module, along with other tokens useful for various purposes, in the civicrm_hooks.php file. === Upgrades === Remember that drupal upgrades require dependent modules to be disabled during the upgrade process. This can take a little while, as you have to disable them in order of dependency. Upgrade from 4.2.x to 4.3.5 worked smoothly on localhost test machine. However before this could be repeated on live, 4.4.0 was released. This did not upgrade smoothly on the test server - the new word_replacements code imposes a case-insensitive uniqueness constraint which does not work well with our data. There is a patch, and 4.4.1 will be OK. The test system was restored to full functionality with the word replacements being entered manually, but for the live system, we should patch the upgrade before applying it. The patch was installed manually, and the upgrade reported completed successfully. [[BackLinks]]