Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Ensure the following libraries are in the [TOMCAT_HOME]/lib folder:
    1. tomcat-jdbc.jar

      If you are missing it use the following link to download: http://www.java2s.com/Code/JarDownload/tomcat-jdbc/tomcat-jdbc.jar.zip
    2. mysql-connector-java-5.1.22(You will need to download latest MySQL Connector/J Jar file fromhttp://dev.mysql.com/downloads/connector/j/)
      To download it you will need to make an Oracle account, after that run the downloaded file.

  2. Generate a new keystore using java keytool (if you havent already done this):
    1. Create keystore
      1. for Windows:
      2. for Unix:
    2. Update server.xml as in docs with the following command:


  3. Update tomcat configuration files for SSL

    1. Go to  [TOMCAT_HOME]/conf and open server.xml with notepad:
      Image RemovedImage Added


    2. Delete everything in it and copy-paste the following code:

      <?xml version='1.0' encoding='utf-8'?>
      <Server port="8005" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.core.JasperListener" />
      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
      <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
      
        <GlobalNamingResources>
             <Resource name="UserDatabase" auth="Container"
                    type="org.apache.catalina.UserDatabase"
                    description="User database that can be updated and saved"
                    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                    pathname="conf/tomcat-users.xml"
             />
      
             <Resource type="javax.sql.DataSource"
                  name="jdbc/mifosplatform-tenants"
                  factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
                  driverClassName="com.mysql.jdbc.Driver"
                  url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
                  username="root"
                  password="[root mysql password]"
                  initialSize="3"
                  maxActive="10"
                  maxIdle="6"
                  minIdle="3"
                  validationQuery="SELECT 1"
                  testOnBorrow="true"
                  testOnReturn="true"
                  testWhileIdle="true"
                  timeBetweenEvictionRunsMillis="30000"
                  minEvictableIdleTimeMillis="60000"
                  logAbandoned="true"
                  suspectTimeout="60"
             />
        </GlobalNamingResources>
      
        <Service name="Catalina">
      
      <Connector protocol="org.apache.coyote.http11.Http11Protocol"
                 port="8443" maxThreads="200" scheme="https"
                 secure="true" SSLEnabled="true"
                 keystoreFile="/home/ubuntu/.keystore"
                 keystorePass="testmifos"
                 clientAuth="false" sslProtocol="TLS"
                 URIEncoding="UTF-8"
                 compression="force"
                 compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>
      
            <Engine name="Catalina" defaultHost="localhost">
      
            <Realm className="org.apache.catalina.realm.LockOutRealm">
              <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
            </Realm>
      
            <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
      
                <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
                     prefix="localhost_access_log." suffix=".log"
                     pattern="%h %l %u %t &quot;%r&quot; %s %b" />
            </Host>
          </Engine>
        </Service>
      </Server>

       

    3. Press Ctrl + S or File>Save.
    4. Close Notepad.

       

    Note:- 
    Below mentioned are to be updated in the same server.xml
    i - Key store path should be updated like shown in example here:- keystoreFile="C:\Users\conflux9\.keystore" 
    ii - Key store password (which was provided while creating the key). Should also be updated like shown in example:- keystorePass="mif456"
    Dropping application into tomcat webapps folderiii - Provide your mysql user name and password, like in this example:- username="root"
             

...

  1.                                

...

  1.          

...

  1.                                                                        password="mysql"
     


  2. Dropping application into tomcat webapps folder

           a) Copy "mifosng-provider.war" file from downloaded mifos-platform folder: 

                 Image Added

           b) Paste it to - WEBAPPS Folder i.e C:\tomcat\webapps

                 

          c) Copy "community app" folder from downloaded mifos-platform>>apps folder: 

                  

          d).   Paste Paste it to - ROOT Folder i.e C:\tomcat\webapps\ROOT

                  

e         e) Copy-paste the entire api-docs folder to [TOMCAT_HOME]/webapps/ROOT folder.

                  


  1. Startup tomcat
    1. Platform application should be available at https://[server ip address]:8443/mifosng-provider/api/v1/offices?tenantIdentifier=default&pretty=true
    2. Community application should be available at https://[server ip address]:8443/community-app?baseApiUrl=https://[server ip address]:8443/mifosng-provider/api/v1/
    3. API docs should be available @ https://[server ip address]:8443/api-docs/apiLive.htm

...