Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rearranged Windows installation and added Table of Content

OpenSRP is an open source project that uses multiple platforms.  

...

  1. JDK 1.7 or above (1.8 is recommended)

  2. Development Editor

  3. CouchDB 1.6.1 - port :5984. (Remember to put properties file, bean id and configure in appcontext of spring); /start couchDB

  4. CouchDB Lucene 1.1
  5. PostgresSQL 9.1 or above (Install as a service since its only used for reporting) - Port: 5432; /start postgres windows service

  6. ActiveMQ 5.4.2 (To stop Exception of JMS for ActiveMQ appearing in console, change in activemq.prop.. tcp:// to vm:// since both are on same server); /start ActiveMQ

  7. Mysql 5.6 or above (This is required by the Quartz plugin and opensrp-web)
  8. Maven 2 or above
  9. Apache-Tomcat 6 or above (Tomcat 7 is recommended)

  10. OpenMRS version 1.12.x

Below is the detailed explanation of OpenSRP installation process for a Windows based machine.

Table of Contents

Debian Linux Installation

  1. You will need

    to download java

    to Install jdk1.7

    or 1.8 here to

    to run the application.

     
    •  Follow up the following steps to setup java jdk.   
    Download and install any development environment of your choice ie, Netbeans, eclipse or Intellij IDE (All can be used however Intellij IDEA 3.0 window's version

    To do so, first install OpenJDK or Java JDK (both can be used to build OpenSRP however OpenJDK is recommended).

     

  2. Download and install Tomcat 7 to be used as an OpenSRP server.
  3. Download MySQL database from here and follow up these steps to set it up.
  4.  Install CouchDB v 1.6.1.
    • To install CouchDB, download the above release from CouchDB Relax site.
    • Double click on the downloaded software to begin the installation process.
    • Next on “Welcome” screen
    • Accept the License agreement
    • Select the installation directory
    • Specify “Start Menu” group name
    • Approve that you’d like to install CouchDB as service and let it be started automatically after installation (probably, you’d like so)
    • Verify installation settings
    • Install CouchDB
    • Open up Fauxton (if you hadn’t selected autostart CouchDB after installation, you have to start it first manually)
    • It’s time to Relax!   CouchDB v 1.6.1 is required for data storage. 
  5. Install ActiveMQ to be used for scheduling activities on the server side (JMS, Quartz, Motech, etc.).   
  6. To install ActiveMQ, download the latest release from the Apache ActiveMQ site.
  7. Copy the downloaded folder to any directory of your choice eg (E:\apache-activemq-5.15.2-bin).
  8. Click on the bin folder and select the windows bit version you are running.
  9. Open and run the Command prompt as Administrator.

  10. Put in the following lines of code depending on where you placed the Apache ActiveMQ folder.

    Code Block
    languagetext
    titleCMD
    C:\windows:\system32\cd\
    C:\>cd Programs
    C:\>cd Programs:\apache-activemq-5.15.2-bin
    C:\>cd Programs:\apache-activemq-5.15.2-bin\cd bin
    C:\>cd Programs:\apache-activemq-5.15.2-bin\bin\cd win64
    C:\>cd Programs:\apache-activemq-5.15.2-bin\bin\win64\InstallService.bat
  11. (Optional) Download and install postgresSQL 9.1 or above for  OpenSRP reporting module and ETL processes.
  12. Create and initialize the quartz database in MySQL as follows

    1. Download this file tables_quartz_mysql.sql

    2. Create the quartz database by running: CREATE DATABASE motechquartz; Ensure that the user you created has permission to this database.
    3. (Optional) Create a user for quartz that only has access to the motechquartz database
  13. Clone the appropriate OpenSRP Server git repository from https://github.com/OpenSRP/opensrp-server and checkout the correct branch,this can be done through your respective IDEs. 
  14. Update the following files with password credentials of MySQL, CouchDB and ActiveMQ respectively:
    1. comment out the CURL command in the pom.xml file for windows installation.
    2. assets/config/opensrp.properties for CouchDB and MySQL credentials
    3. opensrp-web/src/main/resources/quartz.properties for  MySQL credentials
    4. assets/config/couchdb.properties CouchDB credentials
  15. Run and build the OpenSRP WAR file in your respective IDE by running  the following command;

    In the IDE's command line terminal, type in the following command:

    Code Block
    languagetext
    titlecode
    mvn clean install

    If the code generates multiples errors, type in the command bellow to build and install all the different modules.

    Code Block
    languagetext
    titlecode Block
    mvn clean install -Dmaven.test.skip=true
  16. Generate the OpenSRP war file from the project directory under the webapps target folder.
    1. Place the downloaded war file into the tomcat folder directory.
    2. Start tomcat server.
    3. Once tomcat is up and running, place http://localhost:8080/openmrs in your respective browsers depending on the port numbers you specified while installing tomcat
    4. follow up the installation initial setup of openmrs to run it according to your desire as well as setting up its MySQL databaseDownload the Openmrs.war file version 1.11.9 from here and follow the installation procedures bellow. 
  17. Once openmrs is installed, place the generated opensrp.war into the same tomcat folder as that of openmrs.war  and start tomcat once again
  18. Open up the openMRS once again and add the following modules to enable you create users for the openSRP mobile application:
    1. Team module-1.2.2.omod
    2. reporting-1.15.0.omod
    3. UI framework-3.13.0.omod
    4. serialisation.xstream-0.2.12.omod
  19. Create a team indicating its location and other required credentials. With in the created team, add members who will be granted access to the opensrp App. 
  20. To test whether the user created is authenticated, write http://localhost:8080/opensrp/security/authenticate into your browser and place in the created user credentials. For verification, a JSON file should be returned indicating the user's details.                                                                            
Here is a detailed explanation of OpenSRP installation process for a Debian based Linux machine. 

    You will need to Install jdk1.7 to run the application. To do so, first install OpenJDK or Java JDK (both can be used to build OpenSRP however OpenJDK is recommended).

    To install OpenJDK run the following command from terminal:

    After installing Java, set the JAVA_HOME variable - you will need this later in the set up so be sure to set it correctly.

    First find out the path of your Java Installation

    Code Block
    languagebash
    sudo update-alternatives --config java
    It should return something like this:
    No Format
    nopaneltrue
    There are 2 choices for the alternative java (providing /usr/bin/java).
    Selection    Path                                            Priority   Status
    ------------------------------------------------------------
    * 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1062      auto mode
      1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
      2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      manual mode
    
    Press enter to keep the current choice[*], or type selection number:
    Copy your installed Java path and put it into file /etc/environment
    Code Block
    languagebash
    sudo nano /etc/environment

    Add the following line at the end of the file (Replace YOUR_PATH with your Java path above up to the base directory /usr/lib/jvm/java-7-openjdk-amd64/ There's no need to include /jre/bin/java) 

    JAVA_HOME="YOUR _PATH"
  1. Reload this file

    Code Block
    languagebash
    source /etc/environment

    Test it by executing

    Code Block
    languagebash
    echo $JAVA_HOME

    If you have set it correctly, your path should now show on screen (ie. /usr/lib/jvm/java-7-openjdk-amd64/)

  2. CouchDB v 1.6.1 is used for data storage. Your package manager may have a different version. In this case, we recommend installing a PPA for the development environment. Production setup may be different. CouchDB 2.x is not supported (v 2.x stopped supporting the PPA as well). 

    Code Block
    languagebash
    sudo apt-get install software-properties-common
    sudo add-apt-repository ppa:couchdb/stable
    sudo apt-get update
    sudo apt-get install couchdb

    Alternatively, follow the CouchDB setup instructions for your environment here.

  3. (Optional) The OpenSRP reporting module and ETL process uses PostgreSQL 9.1 or above.

    To install PostgreSQL execute the following commands

    Code Block
    languagebash
    sudo apt-get update
    sudo apt-get install postgresql postgresql-contrib

    Connect to the default database with user postgres

    Code Block
    languagebash
    sudo -u postgres psql template1

    Set the password for user postgres, then exit psql (Ctrl-D)

    Code Block
    languagebash
    ALTER USER postgres with encrypted password 'xxxxxxx';

    Edit the pg_hba.conf file

    Code Block
    languagebash
    sudo vi /etc/postgresql/9.1/main/pg_hba.conf
  4. And change "peer" to "md5" on the line concerningpostgres
    local all postgres peer md5

  5. Restart the database

    Code Block
    languagebash
    sudo /etc/init.d/postgresql restart

    Whenpostgresqlservice stops use the command to start

    Code Block
    languagebash
    sudo service postgresql start

    We use Apache ActiveMQ for scheduling activities on the server side (JMS, Quartz, Motech, etc.)

  6. To install Apache ActiveMQ download the latest stable release from Apache ActiveMQ Site 
  7. Extract the download to /opt

    Code Block
    languagebash
    sudo tar -xf apache-activemq-x.x.x-bin.tar.gz -C /opt/

    To create an ActiveMQ service, create a soft link in init.d using the following command:

    Code Block
    languagebash
    sudo ln -snf /opt/apache-activemq-x.x.x/bin/linux-x86-64/activemq /etc/init.d/activemq
    sudo update-rc.d activemq start 66 3 5 . stop 34 0 1 6 .
    sudo service activemq start
  8. Verify it's running by checking the following url:
    http://localhost:8161/
  9. Install Maven 2 or above. To install from terminal execute the following command

    Code Block
    languagebash
    sudo apt-get install maven

    Install tomcat7 you can download it from tomcat apache site. You can follow this instructions to get it up and running.

    Code Block
    languagebash
    sudo apt-get install tomcat7

    Install mysql using the instructions specified on the mysql documentation for your platform.

    Code Block
    languagebash
    sudo apt-get install mysql-server-5.6
    #Or if you're using Ubuntu 15.10 or greater
    sudo apt-get install mysql-server
  10. Create and initialize the quartz database in MySQL as follows

    1. Download this file tables_quartz_mysql.sql

    2. Create the quartz database by running: CREATE DATABASE motechquartz; Ensure that the user you created has permission to this database.
    3. (Optional) Create a user for quartz that only has access to the motechquartz database
    4. To create the database tables for the motechquartz database: mysql -u root -p"$MYSQL_ROOT_PASSWORD" "motechquartz" < "$PATH_TO"/tables_quartz_mysql.sql
  11. Install CouchDB Lucene v1.1

    Download the source code and unpack the tarball (https://github.com/rnewson/couchdb-lucene/releases/tag/v1.1.0)

    Code Block
    languagebash
    tar -xzf couchdb-lucene-1.1.0.tar.gz -C ~/

    Enter the directory

    Code Block
    languagebash
    cd ~/couchdb-lucene-1.1.0/

    Build the project with maven

    Code Block
    languagebash
    mvn install

    Run maven

    Code Block
    languagebash
    mvn

    Unzip the build file and install it in the /opt/ directory

    Code Block
    languagebash
    sudo tar -xzf target/couchdb-lucene-1.1.0-dist.tar.gz -C /opt/

    Rename the distribution folder

    Code Block
    languagebash
    sudo mv /opt/couchdb-lucene-1.1.0 /opt/couchdb-lucene
    Configure CouchDB to work with Lucene

    Edit the local.ini file

    Code Block
    languagebash
    sudo nano /opt/couchdb/etc/local.ini
  12. Add the following line under the [httpd_global_handlers]
    _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>}
  13. Enter into directory by the command  cd /opt/couchdb-lucene/tools/etc/init.d/couchdb-lucene/
  14. Edit the couchdb-lucene file as DAEMON=/opt/couchdb-lucene/bin/run for your application directory path.
  15. If you have set your admin user in couchdb Navigate to /opt/couchdb-lucene/conf/ then Edit the couchdb-lucene.ini and edit the last code url = http://localhost:5984/ with url = http://youradminuser:youradminpass@localhost:5984/
  16. After saving run the command in the terminal cp couchdb-lucene /etc/init.d/
  17. Restart couchdb service to fall your change effect executing the command sudo service couchdb restart
  18. Start the couchdb-lucene service executing the command sudo service couchdb-lucene start to create the Channel with couchdb server
  19. (Optional) For the development environment install your preferred Java editor Eclipse, STS, NetBeans IDE, IntelliJ IDEA, etc.
    STS and IntelliJ IDEA is preferable.
    You can download STS (Spring Tools Suite) here
    You can download IntelliJ IDEA here

  20. Clone the appropriate OpenSRP Server git repository from https://github.com/OpenSRP/opensrp-server and checkout the correct branch.

    Code Block
    languagebash
    git clone https://github.com/OpenSRP/opensrp-server.git
    git checkout BRANCH_NAME
    Each implementation of OpenSRP is maintained in a distinct branch on the OpenSRP GitHub repository.
    Below is a list of branches to clone:
    1. Zambia Electronic Immunization - Branch Name: "path"
    2. TB Reach applicatoin - Branch Name: "tb-reach"
    3. mCare - Branch Name: "mcare-2"
    4. Bangladesh - Branch Name: "bd-family-planning"
    5. Indonesia - Branch Name: "indonesia-server-v2"
  21. (Optional) Import the git repository into your IDE
  22. Update the following files with password credentials (MySQL and CouchDB)
    1. assets/config/couchdb.properties
    2. assets/config/opensrp.properties
    3. opensrp-web/src/main/resources/quartz.properties
  23. Build the OpenSRP WAR file in your IDE or mavenIf using maven:

    Enter the openrsrp-server folder and make sure you're on the correct branch 

    Code Block
    cd opensrp-server
    git status
  24. Run mvn clean install from the root directory of opensrp-server. If there are test failures, you can run the mvn clean install -Dmaven.test.skip=true to build and install all the different modules.

  25. Once tomcat is running, you can install the opensrp.war file from opensrp-web into the webapps directory in order to run the application.

    Code Block
    languagebash
    sudo cp opensrp-web/target/opensrp.war /var/lib/tomcat7/webapps/
    Proceed to install OpenMRS using the OpenMRS Installation Guide
    1. To install OpenJDK run the following command from terminal:


    2. After installing Java, set the JAVA_HOME variable - you will need this later in the set up so be sure to set it correctly.
      1. First find out the path of your Java Installation

        Code Block
        languagebash
        sudo update-alternatives --config java


        It should return something like this:

        No Format
        nopaneltrue
        There are 2 choices for the alternative java (providing /usr/bin/java).
        Selection    Path                                            Priority   Status
        ------------------------------------------------------------
        * 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1062      auto mode
          1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
          2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      manual mode
        
        Press enter to keep the current choice[*], or type selection number:


      2. Copy your installed Java path and put it into file /etc/environment

        Code Block
        languagebash
        sudo nano /etc/environment

        Add the following line at the end of the file (Replace YOUR_PATH with your Java path above up to the base directory /usr/lib/jvm/java-7-openjdk-amd64/ There's no need to include /jre/bin/java) 

        JAVA_HOME="YOUR _PATH"

      3. Reload this file

        Code Block
        languagebash
        source /etc/environment

        Test it by executing

        Code Block
        languagebash
        echo $JAVA_HOME

        If you have set it correctly, your path should now show on screen (ie. /usr/lib/jvm/java-7-openjdk-amd64/)

  26. CouchDB v 1.6.1 is used for data storage. Your package manager may have a different version. In this case, we recommend installing a PPA for the development environment. Production setup may be different. CouchDB 2.x is not supported (v 2.x stopped supporting the PPA as well). 

    Code Block
    languagebash
    sudo apt-get install software-properties-common
    sudo add-apt-repository ppa:couchdb/stable
    sudo apt-get update
    sudo apt-get install couchdb

    Alternatively, follow the CouchDB setup instructions for your environment here.

  27. (Optional) The OpenSRP reporting module and ETL process uses PostgreSQL 9.1 or above.

    1. To install PostgreSQL execute the following commands

      Code Block
      languagebash
      sudo apt-get update
      sudo apt-get install postgresql postgresql-contrib


    2. Connect to the default database with user postgres

      Code Block
      languagebash
      sudo -u postgres psql template1


    3. Set the password for user postgres, then exit psql (Ctrl-D)

      Code Block
      languagebash
      ALTER USER postgres with encrypted password 'xxxxxxx';


    4. Edit the pg_hba.conf file

      Code Block
      languagebash
      sudo vi /etc/postgresql/9.1/main/pg_hba.conf


    5. And change "peer" to "md5" on the line concerningpostgres
      local all postgres peer md5

    6. Restart the database

      Code Block
      languagebash
      sudo /etc/init.d/postgresql restart


    7. Whenpostgresqlservice stops use the command to start

      Code Block
      languagebash
      sudo service postgresql start


  28. We use Apache ActiveMQ for scheduling activities on the server side (JMS, Quartz, Motech, etc.)

    1. To install Apache ActiveMQ download the latest stable release from Apache ActiveMQ Site 
    2. Extract the download to /opt

      Code Block
      languagebash
      sudo tar -xf apache-activemq-x.x.x-bin.tar.gz -C /opt/


    3. To create an ActiveMQ service, create a soft link in init.d using the following command:

      Code Block
      languagebash
      sudo ln -snf /opt/apache-activemq-x.x.x/bin/linux-x86-64/activemq /etc/init.d/activemq
      sudo update-rc.d activemq start 66 3 5 . stop 34 0 1 6 .
      sudo service activemq start


    4. Verify it's running by checking the following url:
      http://localhost:8161/
  29. Install Maven 2 or above. To install from terminal execute the following command

    Code Block
    languagebash
    sudo apt-get install maven


  30. Install tomcat7 you can download it from tomcat apache site. You can follow this instructions to get it up and running.

    Code Block
    languagebash
    sudo apt-get install tomcat7


  31. Install mysql using the instructions specified on the mysql documentation for your platform.

    Code Block
    languagebash
    sudo apt-get install mysql-server-5.6
    #Or if you're using Ubuntu 15.10 or greater
    sudo apt-get install mysql-server


  32. Create and initialize the quartz database in MySQL as follows

    1. Download this file tables_quartz_mysql.sql

    2. Create the quartz database by running: CREATE DATABASE motechquartz; Ensure that the user you created has permission to this database.
    3. (Optional) Create a user for quartz that only has access to the motechquartz database
    4. To create the database tables for the motechquartz database: mysql -u root -p"$MYSQL_ROOT_PASSWORD" "motechquartz" < "$PATH_TO"/tables_quartz_mysql.sql
  33. Install CouchDB Lucene v1.1
    1. Download the source code and unpack the tarball (https://github.com/rnewson/couchdb-lucene/releases/tag/v1.1.0)

      Code Block
      languagebash
      tar -xzf couchdb-lucene-1.1.0.tar.gz -C ~/


    2. Enter the directory

      Code Block
      languagebash
      cd ~/couchdb-lucene-1.1.0/


    3. Build the project with maven

      Code Block
      languagebash
      mvn install


    4. Run maven

      Code Block
      languagebash
      mvn


    5. Unzip the build file and install it in the /opt/ directory

      Code Block
      languagebash
      sudo tar -xzf target/couchdb-lucene-1.1.0-dist.tar.gz -C /opt/


    6. Rename the distribution folder

      Code Block
      languagebash
      sudo mv /opt/couchdb-lucene-1.1.0 /opt/couchdb-lucene


  34. Configure CouchDB to work with Lucene
    1. Edit the local.ini file

      Code Block
      languagebash
      sudo nano /opt/couchdb/etc/local.ini


    2. Add the following line under the [httpd_global_handlers]
      _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>}
    3. Enter into directory by the command  cd /opt/couchdb-lucene/tools/etc/init.d/couchdb-lucene/
    4. Edit the couchdb-lucene file as DAEMON=/opt/couchdb-lucene/bin/run for your application directory path.
    5. If you have set your admin user in couchdb Navigate to /opt/couchdb-lucene/conf/ then Edit the couchdb-lucene.ini and edit the last code url = http://localhost:5984/ with url = http://youradminuser:youradminpass@localhost:5984/
    6. After saving run the command in the terminal cp couchdb-lucene /etc/init.d/
    7. Restart couchdb service to fall your change effect executing the command sudo service couchdb restart
    8. Start the couchdb-lucene service executing the command sudo service couchdb-lucene start to create the Channel with couchdb server
  35. (Optional) For the development environment install your preferred Java editor Eclipse, STS, NetBeans IDE, IntelliJ IDEA, etc.
    STS and IntelliJ IDEA is preferable.
    You can download STS (Spring Tools Suite) here
    You can download IntelliJ IDEA here

  36. Clone the appropriate OpenSRP Server git repository from https://github.com/OpenSRP/opensrp-server and checkout the correct branch.


    Code Block
    languagebash
    git clone https://github.com/OpenSRP/opensrp-server.git
    git checkout BRANCH_NAME


    Each implementation of OpenSRP is maintained in a distinct branch on the OpenSRP GitHub repository.
    Below is a list of branches to clone:
    1. Zambia Electronic Immunization - Branch Name: "path"
    2. TB Reach applicatoin - Branch Name: "tb-reach"
    3. mCare - Branch Name: "mcare-2"
    4. Bangladesh - Branch Name: "bd-family-planning"
    5. Indonesia - Branch Name: "indonesia-server-v2"
  37. (Optional) Import the git repository into your IDE
  38. Update the following files with password credentials (MySQL and CouchDB)
    1. assets/config/couchdb.properties
    2. assets/config/opensrp.properties
    3. opensrp-web/src/main/resources/quartz.properties
  39. Build the OpenSRP WAR file in your IDE or maven
    1. If using maven:
      1. Enter the openrsrp-server folder and make sure you're on the correct branch 

        Code Block
        cd opensrp-server
        git status


      2. Run mvn clean install from the root directory of opensrp-server. If there are test failures, you can run the mvn clean install -Dmaven.test.skip=true to build and install all the different modules.

  40. Once tomcat is running, you can install the opensrp.war file from opensrp-web into the webapps directory in order to run the application.

    Code Block
    languagebash
    sudo cp opensrp-web/target/opensrp.war /var/lib/tomcat7/webapps/


  41. Proceed to install OpenMRS using the OpenMRS Installation Guide

Windows Installation

  1. You will need to download java jdk1.7 or 1.8 here to run the application.  
    •  Follow up the following steps to setup java jdk.   
  2. Download and install any development environment of your choice ie, Netbeans, eclipse or Intellij IDE (All can be used however Intellij IDEA 3.0 window's version is recommended). 
  3. Download and install Tomcat 7 to be used as an OpenSRP server.
  4. Download MySQL database from here and follow up these steps to set it up.
  5.  Install CouchDB v 1.6.1.
    • To install CouchDB, download the above release from CouchDB Relax site.
    • Double click on the downloaded software to begin the installation process.
    • Next on “Welcome” screen
    • Accept the License agreement
    • Select the installation directory
    • Specify “Start Menu” group name
    • Approve that you’d like to install CouchDB as service and let it be started automatically after installation (probably, you’d like so)
    • Verify installation settings
    • Install CouchDB
    • Open up Fauxton (if you hadn’t selected autostart CouchDB after installation, you have to start it first manually)
    • It’s time to Relax!   CouchDB v 1.6.1 is required for data storage. 
  6. Install ActiveMQ to be used for scheduling activities on the server side (JMS, Quartz, Motech, etc.).   
    • To install ActiveMQ, download the latest release from the Apache ActiveMQ site.
    • Copy the downloaded folder to any directory of your choice eg (E:\apache-activemq-5.15.2-bin).
    • Click on the bin folder and select the windows bit version you are running.
    • Open and run the Command prompt as Administrator.

    • Put in the following lines of code depending on where you placed the Apache ActiveMQ folder.

      Code Block
      languagetext
      titleCMD
      C:\windows:\system32\cd\
      C:\>cd Programs
      C:\>cd Programs:\apache-activemq-5.15.2-bin
      C:\>cd Programs:\apache-activemq-5.15.2-bin\cd bin
      C:\>cd Programs:\apache-activemq-5.15.2-bin\bin\cd win64
      C:\>cd Programs:\apache-activemq-5.15.2-bin\bin\win64\InstallService.bat


  7. (Optional) Download and install postgresSQL 9.1 or above for  OpenSRP reporting module and ETL processes.
  8. Create and initialize the quartz database in MySQL as follows

    1. Download this file tables_quartz_mysql.sql

    2. Create the quartz database by running: CREATE DATABASE motechquartz; Ensure that the user you created has permission to this database.
    3. (Optional) Create a user for quartz that only has access to the motechquartz database
  9. Clone the appropriate OpenSRP Server git repository from https://github.com/OpenSRP/opensrp-server and checkout the correct branch,this can be done through your respective IDEs. 
  10. Update the following files with password credentials of MySQL, CouchDB and ActiveMQ respectively:
    1. comment out the CURL command in the pom.xml file for windows installation.
    2. assets/config/opensrp.properties for CouchDB and MySQL credentials
    3. opensrp-web/src/main/resources/quartz.properties for  MySQL credentials
    4. assets/config/couchdb.properties CouchDB credentials
  11. Run and build the OpenSRP WAR file in your respective IDE by running  the following command;
    1. In the IDE's command line terminal, type in the following command:

      Code Block
      languagetext
      titlecode
      mvn clean install


    2. If the code generates multiples errors, type in the command bellow to build and install all the different modules.

      Code Block
      languagetext
      titlecode Block
      mvn clean install -Dmaven.test.skip=true


  12. Generate the OpenSRP war file from the project directory under the webapps target folder.
    1. Place the downloaded war file into the tomcat folder directory.
    2. Start tomcat server.
    3. Once tomcat is up and running, place http://localhost:8080/openmrs in your respective browsers depending on the port numbers you specified while installing tomcat
    4. follow up the installation initial setup of openmrs to run it according to your desire as well as setting up its MySQL databaseDownload the Openmrs.war file version 1.11.9 from here and follow the installation procedures bellow. 
  13. Once openmrs is installed, place the generated opensrp.war into the same tomcat folder as that of openmrs.war  and start tomcat once again
  14. Open up the openMRS once again and add the following modules to enable you create users for the openSRP mobile application:
    1. Team module-1.2.2.omod
    2. reporting-1.15.0.omod
    3. UI framework-3.13.0.omod
    4. serialisation.xstream-0.2.12.omod
  15. Create a team indicating its location and other required credentials. With in the created team, add members who will be granted access to the opensrp App. 
  16. To test whether the user created is authenticated, write http://localhost:8080/opensrp/security/authenticate into your browser and place in the created user credentials. For verification, a JSON file should be returned indicating the user's details.