Drupal is a Content Management System (CMS) allowing to build a web portal with a friendly administration interface and with extensible capabilities. What is referred to Mica Drupal Client in this documentation consists of a set of Drupal modules and theme. These modules/theme will get the published data from the Mica server (through its web services) and will deliver them as Drupal pages. Drupal supports user authentication which is itself extended to use Agate user directory. This way Drupal users can authenticate on Agate and get the Mica pages adapted to their permissions.
This guide describes how to set up a Drupal server with Mica client modules/theme configured. It is intended for the the system administrators.
Server Hardware Requirements
|CPU||Recent server-grade or high-end consumer-grade processor|
|Disk space||2GB or more.|
|Memory (RAM)||Minimum: 4GB, Recommended: >4GB|
Server Software Requirements
|Drupal||7.x||Drupal application that will host Mica Client modules/theme.|
|Drupal requirements (PHP, database etc.)||PHP >=5.5||See Drupal Requirements|
For Linux systems the following dependencies need to be installed:
apt-get update apt-get install mariadb-server php5.6 php5.6-mysql php5.6-curl php5.6-gd php5.6-cli php5.6-xml
yum clean all yum install mariadb-server php56w php56w-mysql php56w-gd php56w-cli php56w-xml
Drush and Composer
# Install Composer at system level (root access required) curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Install Drush via Composer tool:
# Install Drush and add composer installation directory to your execution path composer global require drush/drush:7.* echo "export PATH=\$HOME/.composer/vendor/bin:\$PATH" | tee -a $HOME/.bashrc # For CentOS 7 you have to use : echo "export PATH=\$HOME/.config/composer/vendor/bin:\$PATH" | tee -a $HOME/.bashrc source .bashrc # Verify Drush install drush status # Install composer module for Drush (allows Drush to use Composer) drush dl composer-8.x-1.x
Now you can install Drupal 7. The installation with Drush is recommended. See Drupal Documentation for details (we recommend you the installation with drush).
CentOS If you have problems about authorization (like httpd code 403 from apache), this error could be related to SELinux. You can disable SELinux (command : setenforce 0) to check if this resolves your problem (temporarily). See SELinux documentation for details.
The following modules and theme are required to have a fully functional Mica Drupal Client:
|obiba_mica||modules||https://www.drupal.org/project/obiba_mica||Uses Mica web services to render published content, data summaries and manage data access requests.|
|obiba_agate||module||https://www.drupal.org/project/obiba_agate||Uses Agate web services to authenticate Mica users.|
|obiba_bootstrap||theme||https://www.drupal.org/project/obiba_bootstrap||Bootstrap based Drupal theme with appropriate style sheets and page templates. Extension of bootstrap theme.|
Once Drupal is installed on your system, run the following commands:
# Apply some folder permissions chown www-data:www-data ./sites/default/files/composer/
# Apply some folder permissions chown apache\: ./sites/default/files/composer/
To enable the mode_rewrite on Debian:
sudo a2enmod rewrite sudo service apache2 restart
On CentOS the rewrite_mode is enabled by default.
- Make sure that the apache config on Debian and CentOS allow overriding via .htaccess, to do so make sure the apache config file has the following directive:
<Directory "/var/www/html"> ... AllowOverride All ... </Directory>
- Go to http://localhost/drupal/#overlay=admin/config/search/clean-urls
- Check "Enable clean URLs" and save.
- Due to an incompatibility with a nonvalid ssl certificate in CentOS, you need to set mica url and agate url without ssl. To do this :
- Go to http://localhost/drupal/admin/config/obiba-agate/agate-settings
- Replace Agate address with : http://localhost:8081
- In Application Key, set : changeIt
- Go to http://localhost/drupal/admin/config/obiba-mica/obiba-mica-settings
- Replace Mica address with : http://localhost:8082
Before proceeding, make sure that the PHP version is 5.6 and Mica server version is >= 2.0.0.
The following instructions apply when upgrading from obiba_mica 7.x-1.3 or older.
If some templates have been overridden, please compare with the new original one.
If you have defined a sub-theme of obiba_bootstrap's theme, you might need to update your style sheet.