← Back to team overview

dhis2-users team mailing list archive

Re: dhis.war deployment on Windows platform

 

The hibernate.properties configuration file will be read only if it is
mentioned in by the dhis_home system variable. So define a system variable
named dhis2_home.

I personally use different method. I embed the hibernate.properties in the
war file. I modify the war file and it its looks like following:



This has an advantage. I can run multiple dhis2 war files for different
application.

But for production environment try to use Ubuntu server and follow the
implementation guide for tuning.

For deploying larger war, like dhis2, you can follow the following steps:

Stop tomcat service.

Copy war file to the 'webapps' folder (e.g. E:\Program Files\Apache
Software Foundation\Tomcat 7.0\webapps).

Start tomcat service.

Depending on tomcat configuration it will take some time and the
application will be ready.

Also as Knut suggests please make sure that your server are connected to
your database (PostgreSQL).


On Sun, May 12, 2013 at 12:49 PM, Sam Kasozi <kasozis@xxxxxxxxx> wrote:

> Hi  Dayo, assuming PostgreSQL is installed and the database is created
> with the following:
>
> Login Role (User): dhisuser
> User password: dhispwd
> Database: dhis2dbase
>
> Then the hibernate.properties configuration file would be as thus:
>
> hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
> hibernate.connection.driver_class = org.postgresql.Driver
> hibernate.connection.url = jdbc:postgresql:dhis2ug
> hibernate.connection.username = dhisuser
> hibernate.connection.password = dhispwd
> hibernate.hbm2ddl.auto = update
>
> To tell the DHIS 2 where to find the configuration file, create a system
> Environment Variable DHIS2_HOME, with the directory path to the
> hibernate.properties configuration file
> i.e DHIS2_HOME: C:\...
>
> Another Environment Variable you need to set is the JAVA_OPTS, which
> allocates memory to the java process
> JAVA_OPTS: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
>
> The current DHIS2 WAR file (version 2.11) is about 80MB, which is higher
> than the default maximum size that can be deployed by Tomcat 7.x. To
> correct this, increase the max-file-size and max-request-size from 50MB
> (52428800) to at least 100MB (104857600) by editing the ‘web.xml’ file in
> the directory: C:\Program Files (x86)\Apache Software Foundation\Tomcat
> 7.0\webapps\manager\WEB-INF (in my case).
>
> http://dhis2.org/development
>
> From the Tomcat Manager:
> Under Deploy section, choose the WAR file to upload, Deploy and wait
> (about 3-5 minutes in my case)
>
> If all is well, then the DHIS2 instance will be loaded under the
> Applications Section
> Click on it under the ‘Path’ column to start
>
> Hope this helps,
> Sam
>
>
>
> On Sat, May 11, 2013 at 9:12 PM, Dayo Adeyomoye <deemoyes@xxxxxxxxx>wrote:
>
>> Hi All,
>>
>> What config does one need to do if dhis.war is deployed on windows using
>> apache tomcat. I mean the hibernate.properties connection to be able to use
>> postgres and the system&user environment variables.
>>
>> Thank you.
>>
>> Adedayo
>>
>> BlackBerry: 3114F90C
>> Phone: 08028851441, 08035560463
>> emails: deemoyes@xxxxxxxxx, addyraph@xxxxxxxxx
>> Yahoo IM: deemoyes
>> Facebook: pharael
>> twitter:pharaell
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References