OpenEMPI Installation
OpenEMPI Installation
The following is a quick guide to installing OpenEMPI on Ubuntu. This page is intended to both serve as a reference, as well as gather any problems that may be encountered during installation. Also see http://kenai.com/projects/openempi/pages/InstallationInstructions for more detailed instructions.
- OpenEMPI: This guide assumes that OpenEMPI will be deployed as a war file built from source (see http://kenai.com/projects/openempi/pages/BuildingFromSource). The source tree also contains the data directory which contains the sql scripts necessary for the creation of the database schema, as well as the openempi/conf directory, which contains configuration files needed by OpenEMPI at runtime.
- PostgreSQL
- Install PostgreSQL
sudo apt-get install postgresql-9.1
- Create a user for OpenEMPI
sudo -u postgres createuser -D -A -P openempi
- Create a new database called openempi which is owned (-O) by the user openempi
sudo -u postgres createdb -O openempi openempi
- Next you will need to run the database creation scripts, but first the new openempi user needs permission to login locally on the system, so add the following line to the /etc/postgresql/9.1/main/pg_hba.conf config file
and restart the server
local openempi openempi password
sudo /etc/init.d/postgresql restart
- Now run the database scripts
Also run each of the update scripts, e.g.
psql -d openempi -U openempi -W openempi=> \i create_database_schema.sql
openempi=> \i update_database_schema-2.1.1.sql
- Install PostgreSQL
- TODO JBoss installation instructions
- Tomcat7
- Install Tomcat
sudo apt-get install tomcat7
- Setup the OPENEMPI_HOME environment variable. This is the directory where conf is located. One way is to add the following to /etc/init.d/tomcat7
Ensure that the tomcat7 user has permission to read/write from and to this directory.
export OPENEMPI_HOME=/somedir/openempi
- Copy the war file the the tomcat deploy directory, /var/lib/tomcat7/webapps/
- Restart the server
sudo /etc/init.d/tomcat7 restart
- Install Tomcat
OpenEMPI should now be up and running.
Logging
If there are problems, the first place to look is the logs. The OpenEMPI log will get written out to the OpenEMPI home directory. If the OPENEMPI_HOME directory isn't set properly however, the log will get written to /var/lib/tomcat7, but it may happen that the tomcat user doesn't have permission to write to this directory. In this case, if you do wish to have the log generated, you can always run tomcat as root by changing the following lines in /etc/default/tomcat7
TOMCAT7_USER=root TOMCAT7_GROUP=root
Note however that isn't a very good idea to run tomcat this way, since it presents a security risk, so this approach certainly isn't recommended for production systems and only for troubleshooting purposes.
Importing Fails
With the current version of trunk (tested on revision 235), the configuration needs to be updated to use the hp file loader.
- Update the XML namespace in the mpi-config.xml file. file-loader needs to change to file-loader-hp.
Note the lines
<mpi-config xsi:schemaLocation="http://configuration.openempi.openhie.org/mpiconfig mpi-config.xsd http://configuration.openempi.openhie.org/file-loader-hp file-loader-hp.xsd http://configuration.openempi.openhie.org/basic-blocking basic-blocking.xsd http://configuration.openempi.openhie.org/probabilistic-matching probabilistic-matching.xsd http://configuration.openempi.openhie.org/exact-matching exact-matching.xsd" xmlns="http://configuration.openempi.openhie.org/mpiconfig" xmlns:mpi="http://configuration.openempi.openhie.org/mpiconfig" xmlns:fl="http://configuration.openempi.openhie.org/file-loader-hp" xmlns:bb="http://configuration.openempi.openhie.org/basic-blocking" xmlns:em="http://configuration.openempi.openhie.org/exact-matching" xmlns:pm="http://configuration.openempi.openhie.org/probabilistic-matching" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
http://configuration.openempi.openhie.org/file-loader-hp file-loader-hp.xsd xmlns:fl="http://configuration.openempi.openhie.org/file-loader-hp"
- Add the hp file loader to the list of modules in the openempi-extension-contexts.properties configuration file by changing
to
applicationContext-module-file-loader.xml
applicationContext-module-file-loader-hp.xml