LibreHIS deploy and startup on Windows - LibreHIS/librehis GitHub Wiki

First of all, choose which database are you going to use:

Microsoft SQL Server

  1. Download and install latest SQL Server:

    https://www.microsoft.com/en-us/sql-server/sql-server-downloads

  2. Download and install latest SQL Server Management Studio:

    https://msdn.microsoft.com/library/mt238290.aspx

  3. Setup database:

    3.1 Complete "Creating the openMAXIMS database.pdf" guide located in openMAXIMS/Source Library/database/

    NOTE: instead of reference data script we use openmaxims_backup file.

PostgreSQL

  1. Download and install latest PostgreSQL:

    https://www.postgresql.org/download/

  2. Setup database:

    2.1 Get backup file of db from librehis/Source Library/database/TODO/openmaxims_train_with_dirty_data.backup

    2.2 Open PgAdmin and create new database (e.g. openmaxims_train)

    2.3 Restore backup via PgAdmin.

Apache Tomcat

openMAXIMS.war constitutes the entire openMAXIMS application, containing all run-time dependencies. This can be deployed as a web application in Apache Tomcat in the standard manner.

  1. Download, install and setup latest Apache Tomcat 8:

    http://tomcat.apache.org/download-80.cgi

    1.1 Create a system wide environment variable called TOMCAT_HOME and set it to tomcat_install_dir

    1.2 Copy openMAXIMS/apps/sqljdbc41.jar to tomcat_install_dir/lib

    1.3 Create tomcat_install_dir/conf/Catalina/localhost/openMAXIMS.xml file with content:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="jdbc/sqlserver" auth="Container"
type="javax.sql.DataSource"
username="openmaxims" password="openmaxims"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
cachingAllowed="false" url="jdbc:sqlserver://localhost:1433;databaseName=openmaxims_train;user=openmaxims;password=openmaxims;"/>
</Context>

  1. Add openMAXIMS.war file to Tomcat:

    Just copy openMAXIMS.war file from openmaxims_workspace/WebApp/ to tomcat_install_dir/webapps/

  2. Run:

    2.1 Go to tomcat_install_dir/bin/ and run Tomcat8.exe

    Application should be accessible via address http://localhost:8080/openMAXIMS/

⚠️ **GitHub.com Fallback** ⚠️