Skip to content

Installing and configuring

Alessandro Gubitosi edited this page May 21, 2015 · 21 revisions

Before start

In order to install this interface you need before to install GPG and the followings php5 packages:

  • php5-curl
  • php5-json

GPG is very important because the interface uses it for generate new invited users ID.
See also installing GPG on your machine.

Is intended that you've already installed and configured MongoDB and the Ontology Wrapper on your machine.


Step by step installation

1. Clone the repo in your favourite folder.

git clone https://github.com/bioversity/PGRDG.git .

2. Create the RSA keys for encrypt client and web interface communications

Make sure to have right root permissions with these commands (if needed, use sudo before commands).

$ cd common/include/conf/
$ mkdir .rsa_keys
$ cd .rsa_keys
$ openssl genrsa -out rsa_2048_priv.pem 2048
$ openssl rsa -pubout -in rsa_2048_priv.pem -out rsa_2048_pub.pem

3. Associate the interface to the OntologyWrapper

In order to let the interface working, you must download at least the variables definitions.
Such definitions are synchronized with the OntologyWrapper queries and responses, in other word the interface must speak the OntolologyWrapper language.
In this way, the PGRDG interface and the OntologyWrapper can be placed in different machines, so you could use the definitions package as Proxy between them.

Open the common/include/conf/interface/site.js configuration file, and change the value of url key and of definitions_dir key.
The url key expects an "http" host value and the definitions_dir key expects a local path value.
Consider the sshfs remote mounting if you want to use a remote Proxy definitions.

4. Give the write permissions

On Linux:

$ chown -R root:www-data /var/wwww/

On Mac:

$ chown -R _www:_www /var/www/

That's it.
Open the browser, load the interface and everything should work ;)