# Multiple DHIS2 instances on Windows

**URL:** <https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389>\
**Category:** Support - Assistance technique\
**Created:** [18 August 2011 09:18 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389 "2011-08-18T09:18:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [18 August 2011 09:18 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/1 "2011-08-18T09:18:37Z")

</div>

Hello all,

It has been a while since I last ran multiple DHIS2 instances (each with its own database) on the same Windows server. Not sure if we have reached a consensus as to best practice on this (I actually think the best practice would be to run a Ubuntu server, but in many cases people find a change of OS an additional burden when there is so much knowledge to absorb about DHIS2 itself)

I see the following options:

1. Multiple war files in the same Tomcat or multiple Tomcats on different ports. If so, just download the Tomcat zip file, not installer, and configure for different ports.

2. Each dhis.war needs a separate hibernate.properties. Is this best done inside the (exploded) war file, or is it best to create multiple environment variables?

How to set the JAVA\_OPTS? The server has only 3GB RAM…

If this has already been documented, I would be grateful for just a pointer.

Thanks,

Knut

---

<div class="post-metadata">

**Author:** ![jason](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jason/32/32739_2.png) [@jason](https://community.dhis2.org/u/jason)\
**Post date:** [18 August 2011 09:29 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/2 "2011-08-18T09:29:14Z")

</div>

In Nigeria, we have two completely separate instance of Tomcat with two environment variables

DHIS2\_HOME=“/var/lib/tomcat6/conf/dhis2\_conf”

DHIS2\_HOME\_NG=“/var/lib/tomcat6/conf/dhis2\_conf\_ng”

The reason for the separate instances was really just to be able to allocate more CPU resources to a single Tomcat instance.

You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar

Open up “mc” (or some other tool which can manipulate inside of a jar file) and navigate within the JAR file to META-INF/dhis/beans.xml

and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance will read from the DHIS2\_HOME\_NG environment.

On Windows, two separate DHIS2 Live directories configured for different ports would seem to be a better solution. Then you do not need to worry about this hack.

Regards,

Jason

> **···**
>
> On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > Hello all,
> 
> > It has been a while since I last ran multiple DHIS2 instances (each with its own database) on the same Windows server. Not sure if we have reached a consensus as to best practice on this (I actually think the best practice would be to run a Ubuntu server, but in many cases people find a change of OS an additional burden when there is so much knowledge to absorb about DHIS2 itself)
> 
> > 
> 
> > I see the following options:
> 
> > 
> 
> > 1. Multiple war files in the same Tomcat or multiple Tomcats on different ports. If so, just download the Tomcat zip file, not installer, and configure for different ports.
> 
> > 1. Each dhis.war needs a separate hibernate.properties. Is this best done inside the (exploded) war file, or is it best to create multiple environment variables?
> 
> > 
> 
> > How to set the JAVA\_OPTS? The server has only 3GB RAM…
> 
> > 
> 
> > If this has already been documented, I would be grateful for just a pointer.
> 
> > 
> 
> > Thanks,
> 
> > Knut
> 
> > 
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![olatitle](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/olatitle/32/45144_2.png) [@olatitle](https://community.dhis2.org/u/olatitle)\
**Post date:** [18 August 2011 09:39 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/3 "2011-08-18T09:39:59Z")

</div>

> In Nigeria, we have two completely separate instance of Tomcat with two environment variables

> 

> 

> DHIS2\_HOME=“/var/lib/tomcat6/conf/dhis2\_conf”

> DHIS2\_HOME\_NG=“/var/lib/tomcat6/conf/dhis2\_conf\_ng”

> 

If you are able to set DHIS2\_HOME as part of the tomcat startup scripts you don’t need to define any environment variables, and then you don’t need to modify the .war files either.

Not sure how this is done on Windows if you also want the tomcat instances to start automatically on Windows startup.

> The reason for the separate instances was really just to be able to allocate more CPU resources to a single Tomcat instance.

> 

> You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar

> 

> Open up “mc” (or some other tool which can manipulate inside of a jar file) and navigate within the JAR file to META-INF/dhis/beans.xml

> and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance will read from the DHIS2\_HOME\_NG environment.

> On Windows, two separate DHIS2 Live directories configured for different ports would seem to be a better solution. Then you do not need to worry about this hack.

Agree, using multiple live instances (with postgres) is probably the easiest setup. Again you would like to be able to start these automatically on reboot, but that should be possible.

Ola

> **···**
>
> On 18 August 2011 11:29, Jason Pickering [jason.p.pickering@gmail.com](mailto:jason.p.pickering@gmail.com) wrote:
> 
> * * *
> 
> > Regards,
> 
> > Jason
> 
> > 
> 
> > 
> 
> > On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > > Hello all,
> 
> > > It has been a while since I last ran multiple DHIS2 instances (each with its own database) on the same Windows server. Not sure if we have reached a consensus as to best practice on this (I actually think the best practice would be to run a Ubuntu server, but in many cases people find a change of OS an additional burden when there is so much knowledge to absorb about DHIS2 itself)
> 
> > >
> 
> > > I see the following options:
> 
> > >
> 
> > > 1. Multiple war files in the same Tomcat or multiple Tomcats on different ports. If so, just download the Tomcat zip file, not installer, and configure for different ports.
> 
> > > 1. Each dhis.war needs a separate hibernate.properties. Is this best done inside the (exploded) war file, or is it best to create multiple environment variables?
> 
> > >
> 
> > > How to set the JAVA\_OPTS? The server has only 3GB RAM…
> 
> > >
> 
> > > If this has already been documented, I would be grateful for just a pointer.
> 
> > >
> 
> > > Thanks,
> 
> > > Knut
> 
> > >
> 
> > >
> 
> > >
> 
> > > * * *
> > > 
> > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > > 
> > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![bobj](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/bobj/32/33033_2.png) [@bobj](https://community.dhis2.org/u/bobj)\
**Post date:** [18 August 2011 10:12 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/4 "2011-08-18T10:12:00Z")

</div>

> In Nigeria, we have two completely separate instance of Tomcat with  
> two environment variables
> 
> DHIS2\_HOME="/var/lib/tomcat6/conf/dhis2\_conf"
> 
> DHIS2\_HOME\_NG="/var/lib/tomcat6/conf/dhis2\_conf\_ng"
> 
> The reason for the separate instances was really just to be able to allocate  
> more CPU resources to a single Tomcat instance.
> 
> You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar
> 
> Open up "mc" (or some other tool which can manipulate inside of a jar file)  
> and navigate within the JAR file to META-INF/dhis/beans.xml
> 
> and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance will  
> read from the DHIS2\_HOME\_NG environment.
> 
> On Windows, two separate DHIS2 Live directories configured for different  
> ports would seem to be a better solution. Then you do not need to worry  
> about this hack.

That's right. dhis live doesn't use the environment variable -  
adopting instead the approach of "wherever I lay my hat, that's my  
home" 🙂

But it does this by using (and automatically configuring) a system  
property which takes precedence over the environment variable. That  
system property is called dhis2.home.

You should be able to set this in a variety of ways in your automatic  
startup scripts eg. by adding "-Ddhis2.home=c:/mydhis" to  
CATALINA\_OPTS in tomcat startup script. It's an alternative approach  
which might suit you.

Bob

> **···**
>
> On 18 August 2011 10:29, Jason Pickering \<jason.p.pickering@gmail.com\> wrote:
> 
> > Regards,
> > 
> > Jason
> > 
> > On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring \<knutst@gmail.com\> wrote:
> > 
> > > Hello all,  
> > > It has been a while since I last ran multiple DHIS2 instances (each with  
> > > its own database) on the same Windows server. Not sure if we have reached a  
> > > consensus as to best practice on this (I actually think the best practice  
> > > would be to run a Ubuntu server, but in many cases people find a change of  
> > > OS an additional burden when there is so much knowledge to absorb about  
> > > DHIS2 itself)  
> > > I see the following options:  
> > > 1) Multiple war files in the same Tomcat or multiple Tomcats on different  
> > > ports. If so, just download the Tomcat zip file, not installer, and  
> > > configure for different ports.  
> > > 2) Each dhis.war needs a separate hibernate.properties. Is this best done  
> > > inside the (exploded) war file, or is it best to create multiple environment  
> > > variables?  
> > > How to set the JAVA\_OPTS? The server has only 3GB RAM...  
> > > If this has already been documented, I would be grateful for just a  
> > > pointer.  
> > > Thanks,  
> > > Knut
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > > Post to : dhis2-devs@lists.launchpad.net  
> > > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > Post to : dhis2-devs@lists.launchpad.net  
> > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [18 August 2011 11:47 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/5 "2011-08-18T11:47:41Z")

</div>

Thanks guys, running multiple instances of DHIS2 Live is definitely the easiest to set up and teach. In fact, I think there may be quite few instances where Tomcat is needed on Windows. And I don’t even think I need to worry about dhis2.home - since everything is confined to the folder where dhis2-live.exe resides.

As Ola pointed out, the remaining and important issue is the automated startup after a power cut. Found some info here, grateful for further ideas.

[http://vlaurie.com/computers2/Articles/startup.htm](http://vlaurie.com/computers2/Articles/startup.htm)

Knut

> **···**
>
> On Thu, Aug 18, 2011 at 12:12 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> > On 18 August 2011 10:29, Jason Pickering [jason.p.pickering@gmail.com](mailto:jason.p.pickering@gmail.com) wrote:
> > 
> > > In Nigeria, we have two completely separate instance of Tomcat with
> > 
> > > two environment variables
> > 
> > > 
> > 
> > > DHIS2\_HOME=“/var/lib/tomcat6/conf/dhis2\_conf”
> > 
> > > 
> > 
> > > DHIS2\_HOME\_NG=“/var/lib/tomcat6/conf/dhis2\_conf\_ng”
> > 
> > > 
> > 
> > > The reason for the separate instances was really just to be able to allocate
> > 
> > > more CPU resources to a single Tomcat instance.
> > 
> > > 
> > 
> > > You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar
> > 
> > > 
> > 
> > > Open up “mc” (or some other tool which can manipulate inside of a jar file)
> > 
> > > and navigate within the JAR file to META-INF/dhis/beans.xml
> > 
> > > 
> > 
> > > and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance will
> > 
> > > read from the DHIS2\_HOME\_NG environment.
> > 
> > > 
> > 
> > > On Windows, two separate DHIS2 Live directories configured for different
> > 
> > > ports would seem to be a better solution. Then you do not need to worry
> > 
> > > about this hack.
> 
> > That’s right. dhis live doesn’t use the environment variable -
> > 
> > adopting instead the approach of "wherever I lay my hat, that’s my
> > 
> > home" 🙂
> > 
> > But it does this by using (and automatically configuring) a system
> > 
> > property which takes precedence over the environment variable. That
> > 
> > system property is called dhis2.home.
> > 
> > You should be able to set this in a variety of ways in your automatic
> > 
> > startup scripts eg. by adding “-Ddhis2.home=c:/mydhis” to
> > 
> > CATALINA\_OPTS in tomcat startup script. It’s an alternative approach
> > 
> > which might suit you.
> > 
> > Bob
> 
> > > 
> > 
> > > Regards,
> > 
> > > 
> > 
> > > Jason
> > 
> > > 
> > 
> > > On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > >
> > 
> > > > Hello all,
> > 
> > > > It has been a while since I last ran multiple DHIS2 instances (each with
> > 
> > > > its own database) on the same Windows server. Not sure if we have reached a
> > 
> > > > consensus as to best practice on this (I actually think the best practice
> > 
> > > > would be to run a Ubuntu server, but in many cases people find a change of
> > 
> > > > OS an additional burden when there is so much knowledge to absorb about
> > 
> > > > DHIS2 itself)
> > 
> > > > I see the following options:
> > 
> > > > 1. Multiple war files in the same Tomcat or multiple Tomcats on different
> > 
> > > > ports. If so, just download the Tomcat zip file, not installer, and
> > 
> > > > configure for different ports.
> > 
> > > > 1. Each dhis.war needs a separate hibernate.properties. Is this best done
> > 
> > > > inside the (exploded) war file, or is it best to create multiple environment
> > 
> > > > variables?
> > 
> > > > How to set the JAVA\_OPTS? The server has only 3GB RAM…
> > 
> > > > If this has already been documented, I would be grateful for just a
> > 
> > > > pointer.
> > 
> > > > Thanks,
> > 
> > > > Knut
> > 
> > > >
> > 
> > > >
> > 
> > > >
> > 
> > > >
> > 
> > > > * * *
> > 
> > > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> > 
> > > >
> > 
> > > 
> > 
> > > 
> > 
> > > * * *
> > 
> > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> > 
> > > 
> > 
> > > 
> > 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –  
> Cheers,  
> Knut Staring

---

<div class="post-metadata">

**Author:** ![Ime\_Asangansi](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/i/13edae/32.png) [@Ime\_Asangansi](https://community.dhis2.org/u/Ime_Asangansi)\
**Post date:** [18 August 2011 12:20 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/6 "2011-08-18T12:20:13Z")

</div>

Thanks for these answers.

Please, is there a way one can put the hibernate.properties in the war file itself?  
This used to workout in 2.0 by just putting into WEB-INF/classes but now it just doesn’t work

I’m in a PaaS offering where I don’t get access to the OS but just tomcat deploy. So, I’m unable to set the env variables.

Thanks

Ime

> **···**
>
> * * *
> 
> **From:** Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com)  
> **To:** Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com)  
> **Cc:** dhis2-devs [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)  
> **Sent:** Thursday, August 18, 2011 7:47 AM  
> **Subject:** Re: [Dhis2-devs] Multiple DHIS2 instances on Windows
> 
> Thanks guys, running multiple instances of DHIS2 Live is definitely the easiest to set up and teach. In fact, I think there may be quite few instances where Tomcat is needed on Windows. And I don’t even think I need to worry about dhis2.home - since everything is confined to the folder where dhis2-live.exe resides.
> 
> As Ola pointed out, the remaining and important issue is the automated startup after a power cut. Found some info here, grateful for further ideas.
> 
> [http://vlaurie.com/computers2/Articles/startup.htm](http://vlaurie.com/computers2/Articles/startup.htm)
> 
> Knut
> 
> On Thu, Aug 18, 2011 at 12:12 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> > On 18 August 2011 10:29, Jason Pickering [jason.p.pickering@gmail.com](mailto:jason.p.pickering@gmail.com) wrote:
> > 
> > > In Nigeria, we have two completely separate instance of Tomcat with
> > 
> > > two environment variables
> > 
> > > 
> > 
> > > DHIS2\_HOME=“/var/lib/tomcat6/conf/dhis2\_conf”
> > 
> > > 
> > 
> > > DHIS2\_HOME\_NG=“/var/lib/tomcat6/conf/dhis2\_conf\_ng”
> > 
> > > 
> > 
> > > The reason for the separate instances was really just to be able to allocate
> > 
> > > more CPU resources to a single Tomcat instance.
> > 
> > > 
> > 
> > > You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar
> > 
> > > 
> > 
> > > Open up “mc” (or some other tool which can manipulate inside of a jar file)
> > 
> > > and navigate within the JAR file to META-INF/dhis/beans.xml
> > 
> > > 
> > 
> > > and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance will
> > 
> > > read from the DHIS2\_HOME\_NG environment.
> > 
> > > 
> > 
> > > On Windows, two separate DHIS2 Live directories configured for different
> > 
> > > ports would seem to be a better solution. Then you do not need to worry
> > 
> > > about this hack.
> 
> > That’s right. dhis live doesn’t use the environment variable -
> > 
> > adopting instead the approach of "wherever I lay my hat, that’s my
> > 
> > home" 🙂
> > 
> > But it does this by using (and automatically configuring) a system
> > 
> > property which takes precedence over the environment variable. That
> > 
> > system property is called dhis2.home.
> > 
> > You should be able to set this in a variety of ways in your automatic
> > 
> > startup scripts eg. by adding “-Ddhis2.home=c:/mydhis” to
> > 
> > CATALINA\_OPTS in tomcat startup script. It’s an alternative approach
> > 
> > which might suit you.
> > 
> > Bob
> 
> > > 
> > 
> > > Regards,
> > 
> > > 
> > 
> > > Jason
> > 
> > > 
> > 
> > > On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > >
> > 
> > > > Hello all,
> > 
> > > > It has been a while since I last ran multiple DHIS2 instances (each with
> > 
> > > > its own database) on the same Windows server. Not sure if we have reached a
> > 
> > > > consensus as to best practice on this (I actually think the best practice
> > 
> > > > would be to run a Ubuntu server, but in many cases people find a change of
> > 
> > > > OS an additional burden when there is so much knowledge to absorb about
> > 
> > > > DHIS2 itself)
> > 
> > > > I see the following options:
> > 
> > > > 1. Multiple war files in the same Tomcat or multiple Tomcats on different
> > 
> > > > ports. If so, just download the Tomcat zip file, not installer, and
> > 
> > > > configure for different ports.
> > 
> > > > 1. Each dhis.war needs a separate hibernate.properties. Is this best done
> > 
> > > > inside the (exploded) war file, or is it best to create multiple environment
> > 
> > > > variables?
> > 
> > > > How to set the JAVA\_OPTS? The server has only 3GB RAM…
> > 
> > > > If this has already been documented, I would be grateful for just a
> > 
> > > > pointer.
> > 
> > > > Thanks,
> > 
> > > > Knut
> > 
> > > >
> > 
> > > >
> > 
> > > >
> > 
> > > >
> > 
> > > > * * *
> > 
> > > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> > 
> > > >
> > 
> > > 
> > 
> > > 
> > 
> > > * * *
> > 
> > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> > 
> > > 
> > 
> > > 
> > 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –  
> Cheers,  
> Knut Staring
> 
> * * *
> 
> Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)  
> Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)  
> Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)  
> More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![bobj](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/bobj/32/33033_2.png) [@bobj](https://community.dhis2.org/u/bobj)\
**Post date:** [18 August 2011 12:46 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/7 "2011-08-18T12:46:48Z")

</div>

> Thanks for these answers.
> 
> Please, is there a way one can put the hibernate.properties in the war file  
> itself?  
> This used to workout in 2.0 by just putting into WEB-INF/classes but now it  
> just doesn't work
> 
> I'm in a PaaS offering where I don't get access to the OS but just tomcat  
> deploy. So, I'm unable to set the env variables.

Probably the best place to implement something would be as a context  
parameter ([Apache Tomcat Configuration Reference (6.0.53) - The Context Container](http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Context_Parameters%5C)).

We could then fairly simply add yet another prioritized source of DHIS\_HOME:  
(i) check for context parameter called DHIS2\_HOME; failing which  
(ii) check for system property called dhis2.home; failing which  
(III) check for env variable DHIS2\_HOME.  
(the final fallback on linux is to use /opt/dhis2)

The context should be configurable by the Paas provider. Any  
thoughts? Should be a quick blueprint + some few lines of code +  
testing.

Cheers  
Bob

> **···**
>
> On 18 August 2011 13:20, Ime Asangansi \<asangansi@yahoo.com\> wrote:
> 
> > Thanks
> > 
> > Ime
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > From: Knut Staring \<knutst@gmail.com\>  
> > To: Bob Jolliffe \<bobjolliffe@gmail.com\>  
> > Cc: dhis2-devs \<dhis2-devs@lists.launchpad.net\>  
> > Sent: Thursday, August 18, 2011 7:47 AM  
> > Subject: Re: [Dhis2-devs] Multiple DHIS2 instances on Windows
> > 
> > Thanks guys, running multiple instances of DHIS2 Live is definitely the  
> > easiest to set up and teach. In fact, I think there may be quite few  
> > instances where Tomcat is needed on Windows. And I don't even think I need  
> > to worry about dhis2.home - since everything is confined to the folder where  
> > dhis2-live.exe resides.  
> > As Ola pointed out, the remaining and important issue is the automated  
> > startup after a power cut. Found some info here, grateful for further ideas.  
> > [Vlaurie](http://vlaurie.com/computers2/Articles/startup.htm)  
> > Knut  
> > On Thu, Aug 18, 2011 at 12:12 PM, Bob Jolliffe \<bobjolliffe@gmail.com\> \> wrote:
> > 
> > On 18 August 2011 10:29, Jason Pickering \<jason.p.pickering@gmail.com\> \> wrote:
> > 
> > > In Nigeria, we have two completely separate instance of Tomcat with  
> > > two environment variables
> > > 
> > > DHIS2\_HOME="/var/lib/tomcat6/conf/dhis2\_conf"
> > > 
> > > DHIS2\_HOME\_NG="/var/lib/tomcat6/conf/dhis2\_conf\_ng"
> > > 
> > > The reason for the separate instances was really just to be able to  
> > > allocate  
> > > more CPU resources to a single Tomcat instance.
> > > 
> > > You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar
> > > 
> > > Open up "mc" (or some other tool which can manipulate inside of a jar  
> > > file)  
> > > and navigate within the JAR file to META-INF/dhis/beans.xml
> > > 
> > > and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance  
> > > will  
> > > read from the DHIS2\_HOME\_NG environment.
> > > 
> > > On Windows, two separate DHIS2 Live directories configured for different  
> > > ports would seem to be a better solution. Then you do not need to worry  
> > > about this hack.
> > 
> > That's right. dhis live doesn't use the environment variable -  
> > adopting instead the approach of "wherever I lay my hat, that's my  
> > home" 🙂
> > 
> > But it does this by using (and automatically configuring) a system  
> > property which takes precedence over the environment variable. That  
> > system property is called dhis2.home.
> > 
> > You should be able to set this in a variety of ways in your automatic  
> > startup scripts eg. by adding "-Ddhis2.home=c:/mydhis" to  
> > CATALINA\_OPTS in tomcat startup script. It's an alternative approach  
> > which might suit you.
> > 
> > Bob
> > 
> > > Regards,
> > > 
> > > Jason
> > > 
> > > On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring \<knutst@gmail.com\> wrote:
> > > 
> > > > Hello all,  
> > > > It has been a while since I last ran multiple DHIS2 instances (each with  
> > > > its own database) on the same Windows server. Not sure if we have reached  
> > > > a  
> > > > consensus as to best practice on this (I actually think the best practice  
> > > > would be to run a Ubuntu server, but in many cases people find a change  
> > > > of  
> > > > OS an additional burden when there is so much knowledge to absorb about  
> > > > DHIS2 itself)  
> > > > I see the following options:  
> > > > 1) Multiple war files in the same Tomcat or multiple Tomcats on different  
> > > > ports. If so, just download the Tomcat zip file, not installer, and  
> > > > configure for different ports.  
> > > > 2) Each dhis.war needs a separate hibernate.properties. Is this best done  
> > > > inside the (exploded) war file, or is it best to create multiple  
> > > > environment  
> > > > variables?  
> > > > How to set the JAVA\_OPTS? The server has only 3GB RAM...  
> > > > If this has already been documented, I would be grateful for just a  
> > > > pointer.  
> > > > Thanks,  
> > > > Knut
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > > > Post to : dhis2-devs@lists.launchpad.net  
> > > > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > > > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > > Post to : dhis2-devs@lists.launchpad.net  
> > > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > Post to : dhis2-devs@lists.launchpad.net  
> > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)
> > 
> > --  
> > Cheers,  
> > Knut Staring
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > Post to : dhis2-devs@lists.launchpad.net  
> > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [18 August 2011 12:56 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/8 "2011-08-18T12:56:54Z")

</div>

In fact, this is really easy, just place shortcuts to the two  
dhis2-live.exe files in the Windows Startup folder:

> **[Windows help & learning](https://support.microsoft.com/en-us/windows)**
>
> Find help and how-to articles for Windows operating systems. Get support for Windows and learn about installation, updates, privacy, security and more.

Knut

> **···**
>
> On 8/18/11, Knut Staring \<knutst@gmail.com\> wrote:
> 
> > As Ola pointed out, the remaining and important issue is the automated  
> > startup after a power cut.

---

<div class="post-metadata">

**Author:** ![bobj](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/bobj/32/33033_2.png) [@bobj](https://community.dhis2.org/u/bobj)\
**Post date:** [18 August 2011 12:59 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/9 "2011-08-18T12:59:32Z")

</div>

> > As Ola pointed out, the remaining and important issue is the automated  
> > startup after a power cut.
> 
> In fact, this is really easy, just place shortcuts to the two  
> dhis2-live.exe files in the Windows Startup folder:  
> [Windows help & learning](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)

Are talking about startup or logging in?

> **···**
>
> On 18 August 2011 13:56, Knut Staring \<knutst@gmail.com\> wrote:
> 
> > On 8/18/11, Knut Staring \<knutst@gmail.com\> wrote:
> 
> > Knut

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [19 August 2011 08:30 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/10 "2011-08-19T08:30:11Z")

</div>

So now I’m running three instances of DHIS2 Live on different ports and can stop and start each one individually.

My new problem now is how to distinguish between them:

1. Most importantly, I would like to see a different hover text for each DHIS Live icon (I now have three identical ones)

2. Secondly, it would be nice if one could easily modify the text in the browser tab (i.e. the HTML element), which currently says just DHIS 2 for all of them.

Would this be easy to do?

Knut

> **···**
>
> On Thu, Aug 18, 2011 at 1:47 PM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > Thanks guys, running multiple instances of DHIS2 Live is definitely the easiest to set up and teach. In fact, I think there may be quite few instances where Tomcat is needed on Windows. And I don’t even think I need to worry about dhis2.home - since everything is confined to the folder where dhis2-live.exe residerehs.
> 
> > As Ola pointed out, the remaining and important issue is the automated startup after a power cut. Found some info here, grateful for further ideas.
> 
> > [http://vlaurie.com/computers2/Articles/startup.htm](http://vlaurie.com/computers2/Articles/startup.htm)
> 
> > 
> 
> > Knut
> 
> > On Thu, Aug 18, 2011 at 12:12 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> > 
> > > On 18 August 2011 10:29, Jason Pickering [jason.p.pickering@gmail.com](mailto:jason.p.pickering@gmail.com) wrote:
> > > 
> > > > In Nigeria, we have two completely separate instance of Tomcat with
> > > 
> > > > two environment variables
> > > 
> > > > 
> > > 
> > > > DHIS2\_HOME=“/var/lib/tomcat6/conf/dhis2\_conf”
> > > 
> > > > 
> > > 
> > > > DHIS2\_HOME\_NG=“/var/lib/tomcat6/conf/dhis2\_conf\_ng”
> > > 
> > > > 
> > > 
> > > > The reason for the separate instances was really just to be able to allocate
> > > 
> > > > more CPU resources to a single Tomcat instance.
> > > 
> > > > 
> > > 
> > > > You them modify /WEB-INF/lib/dhis-support-external-2.1-SNAPSHOT.jar
> > > 
> > > > 
> > > 
> > > > Open up “mc” (or some other tool which can manipulate inside of a jar file)
> > > 
> > > > and navigate within the JAR file to META-INF/dhis/beans.xml
> > > 
> > > > 
> > > 
> > > > and modify DHIS2\_HOME to DHIS2\_HOME\_NG and then exit mc. This instance will
> > > 
> > > > read from the DHIS2\_HOME\_NG environment.
> > > 
> > > > 
> > > 
> > > > On Windows, two separate DHIS2 Live directories configured for different
> > > 
> > > > ports would seem to be a better solution. Then you do not need to worry
> > > 
> > > > about this hack.
> 
> > > That’s right. dhis live doesn’t use the environment variable -
> > > 
> > > adopting instead the approach of "wherever I lay my hat, that’s my
> > > 
> > > home" 🙂
> > > 
> > > But it does this by using (and automatically configuring) a system
> > > 
> > > property which takes precedence over the environment variable. That
> > > 
> > > system property is called dhis2.home.
> > > 
> > > You should be able to set this in a variety of ways in your automatic
> > > 
> > > startup scripts eg. by adding “-Ddhis2.home=c:/mydhis” to
> > > 
> > > CATALINA\_OPTS in tomcat startup script. It’s an alternative approach
> > > 
> > > which might suit you.
> > > 
> > > Bob
> 
> > > > 
> > > 
> > > > Regards,
> > > 
> > > > 
> > > 
> > > > Jason
> > > 
> > > > 
> > > 
> > > > On Thu, Aug 18, 2011 at 11:18 AM, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > > 
> > > > >
> > > 
> > > > > Hello all,
> > > 
> > > > > It has been a while since I last ran multiple DHIS2 instances (each with
> > > 
> > > > > its own database) on the same Windows server. Not sure if we have reached a
> > > 
> > > > > consensus as to best practice on this (I actually think the best practice
> > > 
> > > > > would be to run a Ubuntu server, but in many cases people find a change of
> > > 
> > > > > OS an additional burden when there is so much knowledge to absorb about
> > > 
> > > > > DHIS2 itself)
> > > 
> > > > > I see the following options:
> > > 
> > > > > 1. Multiple war files in the same Tomcat or multiple Tomcats on different
> > > 
> > > > > ports. If so, just download the Tomcat zip file, not installer, and
> > > 
> > > > > configure for different ports.
> > > 
> > > > > 1. Each dhis.war needs a separate hibernate.properties. Is this best done
> > > 
> > > > > inside the (exploded) war file, or is it best to create multiple environment
> > > 
> > > > > variables?
> > > 
> > > > > How to set the JAVA\_OPTS? The server has only 3GB RAM…
> > > 
> > > > > If this has already been documented, I would be grateful for just a
> > > 
> > > > > pointer.
> > > 
> > > > > Thanks,
> > > 
> > > > > Knut
> > > 
> > > > >
> > > 
> > > > >
> > > 
> > > > >
> > > 
> > > > >
> > > 
> > > > > * * *
> > > 
> > > > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > > 
> > > > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> > > 
> > > > >
> > > 
> > > > 
> > > 
> > > > 
> > > 
> > > > * * *
> > > 
> > > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > > 
> > > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> > > 
> > > > 
> > > 
> > > > 
> > > 
> > > * * *
> > > 
> > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > > 
> > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> > 
> 
> > –  
> > Cheers,  
> > Knut Staring
> 
> –  
> Cheers,  
> Knut Staring

---

<div class="post-metadata">

**Author:** ![olatitle](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/olatitle/32/45144_2.png) [@olatitle](https://community.dhis2.org/u/olatitle)\
**Post date:** [19 August 2011 09:01 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/11 "2011-08-19T09:01:38Z")

</div>

3 GB RAM sounds very little for serving three tomcat instances + a postgres server.

I would recommend at least 8 GB here, as I assume this is a startup process with not that many users. As you get more online users and also more data to process, you will have to increase this.

Especially it seems jasper reports (standard reports) get out of memory errors (PermGen space) with less (not sure exactly how much less) than around 1 GB: -XX:MaxPermSize=1024m"

You could e.g. use something like this for each of the three tomcats/java processes:

JAVA\_OPTS=“-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m”

For an active DHIS 2 instance with many users I would allocate more, e.g. the Kenya online system uses:

-Xmx6000m -XX:MaxPermSize=1000m

This chapter in the implementation guide discusses server setup including memory settings for postgres and tomcat:

[http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415](http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415)

Ola

> **···**
>
> On 18 August 2011 11:18, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > Hello all,
> 
> > It has been a while since I last ran multiple DHIS2 instances (each with its own database) on the same Windows server. Not sure if we have reached a consensus as to best practice on this (I actually think the best practice would be to run a Ubuntu server, but in many cases people find a change of OS an additional burden when there is so much knowledge to absorb about DHIS2 itself)
> 
> > 
> 
> > I see the following options:
> 
> > 
> 
> > 1. Multiple war files in the same Tomcat or multiple Tomcats on different ports. If so, just download the Tomcat zip file, not installer, and configure for different ports.
> 
> > 1. Each dhis.war needs a separate hibernate.properties. Is this best done inside the (exploded) war file, or is it best to create multiple environment variables?
> 
> > 
> 
> > How to set the JAVA\_OPTS? The server has only 3GB RAM…
> 
> > 
> 
> * * *
> 
> > If this has already been documented, I would be grateful for just a pointer.
> 
> > 
> 
> > Thanks,
> 
> > Knut
> 
> > 
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [19 August 2011 09:12 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/12 "2011-08-19T09:12:36Z")

</div>

> > Hello all,

> > It has been a while since I last ran multiple DHIS2 instances (each with its own database) on the same Windows server. Not sure if we have reached a consensus as to best practice on this (I actually think the best practice would be to run a Ubuntu server, but in many cases people find a change of OS an additional burden when there is so much knowledge to absorb about DHIS2 itself)

> >

> > I see the following options:

> >

> > 1. Multiple war files in the same Tomcat or multiple Tomcats on different ports. If so, just download the Tomcat zip file, not installer, and configure for different ports.

> > 1. Each dhis.war needs a separate hibernate.properties. Is this best done inside the (exploded) war file, or is it best to create multiple environment variables?

> >

> > How to set the JAVA\_OPTS? The server has only 3GB RAM…

> >

> 

> 3 GB RAM sounds very little for serving three tomcat instances + a postgres server.

> I would recommend at least 8 GB here, as I assume this is a startup process with not that many users. As you get more online users and also more data to process, you will have to increase this.

> 

> Especially it seems jasper reports (standard reports) get out of memory errors (PermGen space) with less (not sure exactly how much less) than around 1 GB: -XX:MaxPermSize=1024m"

> 

> You could e.g. use something like this for each of the three tomcats/java processes:

> 

> JAVA\_OPTS=“-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m”

> 

> For an active DHIS 2 instance with many users I would allocate more, e.g. the Kenya online system uses:

> -Xmx6000m -XX:MaxPermSize=1000m

> 

> This chapter in the implementation guide discusses server setup including memory settings for postgres and tomcat:

> [http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415](http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415)

> 

Thanks Ola, this is helpful. In fact, there seems to be another server available, and one of the three instances is relatively temporary (it holds 6M rows from the old HMIS systems, parts of which we will import into the new dashboard system. So I guess what I have set up now is a relatively short term solution (though we all know those tend to linger for months and years…).

I do agree with the need to change to a 64 bit operating system and slap more memory on the server.

A few further questions:

1. As I mentioned, I am not using Tomcat at all, but running three DHIS Live instance, in other words Jetty. I assume things are a bit different then?

2. Are you recommending three JREs? I am currently running everything on the installed JRE, and not using one for each DHIS Live

Knut

> **···**
>
> On Fri, Aug 19, 2011 at 11:01 AM, Ola Hodne Titlestad [olati@ifi.uio.no](mailto:olati@ifi.uio.no) wrote:
> 
> > On 18 August 2011 11:18, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > Ola
> 
> > * * *
> 
> > 
> 
> > > If this has already been documented, I would be grateful for just a pointer.
> 
> > >
> 
> > > Thanks,
> 
> > > Knut
> 
> > >
> 
> > >
> 
> > >
> 
> > > * * *
> > > 
> > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > > 
> > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > > 
> > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> > 
> 
> –  
> Cheers,  
> Knut Staring

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [19 August 2011 10:06 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/13 "2011-08-19T10:06:47Z")

</div>

> > > As Ola pointed out, the remaining and important issue is the automated
> 
> > > startup after a power cut.
> 
> > 
> 
> > In fact, this is really easy, just place shortcuts to the two
> 
> > dhis2-live.exe files in the Windows Startup folder:
> 
> > [http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)

> Are talking about startup or logging in?

Good point - that method does require the manual step of going to the machine and logging in.

Ideally, we would create our own three services that start automagically on boot. Found the following link, but have not tried it yet:

[http://support.microsoft.com/kb/251192](http://support.microsoft.com/kb/251192)

Knut

> **···**
>
> On Thu, Aug 18, 2011 at 2:59 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> > On 18 August 2011 13:56, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > On 8/18/11, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> 
> > > 
> > 
> > > Knut
> > 
> > >
> 
> –  
> Cheers,  
> Knut Staring

---

<div class="post-metadata">

**Author:** ![bobj](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/bobj/32/33033_2.png) [@bobj](https://community.dhis2.org/u/bobj)\
**Post date:** [19 August 2011 10:28 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/14 "2011-08-19T10:28:37Z")

</div>

dhis-live is not really designed to be run as a service and I wouldn't  
really recommend trying. Given that it has a user interaction element  
in the toolbar etc. Running as a service is sort of the opposite of  
its defining use case which is to have a minimally configured  
clickable app to run on a desktop.

I think there are lots of tips on the web regarding running tomcat as  
a service. Also HISP India has some previous experience in running  
many tomcat's on a single windows server for different states. Maybe  
Bharath or John might chip in how they have set up the service.  
Assuming that is, that they ran tomcat as a windows service. Possibly  
they logged in and manually started and stopped them.

I always find it interesting when looking at the merits of windows vs  
linux servers that the argument is usually given that windows is more  
familiar and the hurdle to move to linux is too great. But when one  
scrapes the surface it seems that windows server skills are actually  
very scarce. People think they understand windows server because it  
looks just like windows. But you'll actually find much more  
knowledgeable support in our community for setting up a  
dhis+tomcat+postgres+ubuntu. Just my two cents 🙂

Re displaying different text on hover, its not a bad idea, but not one  
that anyone is likely to prioritize immediately. Maybe create a  
blueprint so the idea is not lost. From a zero-configuration  
perspective there is not much to go on mind you. We have the options  
of server port, database name or dhis home directory to distinguish  
between them, but using something mangled from those would at least  
provide something. A more nicely named instance would require an  
additional config parameter or a small dialog on startup.

Cheers  
Bob

> **···**
>
> On 19 August 2011 11:06, Knut Staring \<knutst@gmail.com\> wrote:
> 
> > On Thu, Aug 18, 2011 at 2:59 PM, Bob Jolliffe \<bobjolliffe@gmail.com\> wrote:
> > 
> > > On 18 August 2011 13:56, Knut Staring \<knutst@gmail.com\> wrote:  
> > > \> On 8/18/11, Knut Staring \<knutst@gmail.com\> wrote:  
> > > \>\> As Ola pointed out, the remaining and important issue is the automated  
> > > \>\> startup after a power cut.  
> > > \>  
> > > \> In fact, this is really easy, just place shortcuts to the two  
> > > \> dhis2-live.exe files in the Windows Startup folder:  
> > > \>  
> > > \> [Windows help & learning](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)
> > > 
> > > Are talking about startup or logging in?
> > 
> > Good point - that method does require the manual step of going to the  
> > machine and logging in.
> > 
> > Ideally, we would create our own three services that start automagically on  
> > boot. Found the following link, but have not tried it yet:  
> > [sc.exe create | Microsoft Learn](http://support.microsoft.com/kb/251192)  
> > Knut
> > 
> > > \>  
> > > \> Knut  
> > > \>
> > 
> > --  
> > Cheers,  
> > Knut Staring

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [19 August 2011 10:40 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/15 "2011-08-19T10:40:41Z")

</div>

Thanks for all the input - it has been very useful. I have come to realize that this current setup should be considered temporary (until the end of the year) and thinking&resources should probably now rather be dedicated towards setting up two national production machines by the end of the year (one for the national repository/dashboard, one for the HMIS), and these should align as much as feasible with the description in the link Ola sent:

[http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415](http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415)

In fact, we already also have a Linode, so far with only 4 GB, but that can of course be increased as needed.

Knut

> **···**
>
> On Fri, Aug 19, 2011 at 12:28 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> > dhis-live is not really designed to be run as a service and I wouldn’t
> > 
> > really recommend trying. Given that it has a user interaction element
> > 
> > in the toolbar etc. Running as a service is sort of the opposite of
> > 
> > its defining use case which is to have a minimally configured
> > 
> > clickable app to run on a desktop.
> > 
> > I think there are lots of tips on the web regarding running tomcat as
> > 
> > a service. Also HISP India has some previous experience in running
> > 
> > many tomcat’s on a single windows server for different states. Maybe
> > 
> > Bharath or John might chip in how they have set up the service.
> > 
> > Assuming that is, that they ran tomcat as a windows service. Possibly
> > 
> > they logged in and manually started and stopped them.
> > 
> > I always find it interesting when looking at the merits of windows vs
> > 
> > linux servers that the argument is usually given that windows is more
> > 
> > familiar and the hurdle to move to linux is too great. But when one
> > 
> > scrapes the surface it seems that windows server skills are actually
> > 
> > very scarce. People think they understand windows server because it
> > 
> > looks just like windows. But you’ll actually find much more
> > 
> > knowledgeable support in our community for setting up a
> > 
> > dhis+tomcat+postgres+ubuntu. Just my two cents 🙂
> > 
> > Re displaying different text on hover, its not a bad idea, but not one
> > 
> > that anyone is likely to prioritize immediately. Maybe create a
> > 
> > blueprint so the idea is not lost. From a zero-configuration
> > 
> > perspective there is not much to go on mind you. We have the options
> > 
> > of server port, database name or dhis home directory to distinguish
> > 
> > between them, but using something mangled from those would at least
> > 
> > provide something. A more nicely named instance would require an
> > 
> > additional config parameter or a small dialog on startup.
> > 
> > Cheers
> > 
> > Bob
> 
> > On 19 August 2011 11:06, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > On Thu, Aug 18, 2011 at 2:59 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> > 
> > > >
> > 
> > > > On 18 August 2011 13:56, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > > > On 8/18/11, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > > > > As Ola pointed out, the remaining and important issue is the automated
> > 
> > > > > > startup after a power cut.
> > 
> > > > >
> > 
> > > > > In fact, this is really easy, just place shortcuts to the two
> > 
> > > > > dhis2-live.exe files in the Windows Startup folder:
> > 
> > > > >
> > 
> > > > > [http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)
> > 
> > > >
> > 
> > > > Are talking about startup or logging in?
> > 
> > > 
> > 
> > > Good point - that method does require the manual step of going to the
> > 
> > > machine and logging in.
> > 
> > > 
> > 
> > > Ideally, we would create our own three services that start automagically on
> > 
> > > boot. Found the following link, but have not tried it yet:
> > 
> > > [http://support.microsoft.com/kb/251192](http://support.microsoft.com/kb/251192)
> > 
> > > Knut
> > 
> > > >
> > 
> > > > >
> > 
> > > > > Knut
> > 
> > > > >
> > 
> > > 
> > 
> > > 
> > 
> > > 
> > 
> > > –
> > 
> > > Cheers,
> > 
> > > Knut Staring
> > 
> > >
> 
> –  
> Cheers,  
> Knut Staring

---

<div class="post-metadata">

**Author:** ![bobj](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/bobj/32/33033_2.png) [@bobj](https://community.dhis2.org/u/bobj)\
**Post date:** [19 August 2011 15:09 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/16 "2011-08-19T15:09:57Z")

</div>

> Thanks for all the input - it has been very useful. I have come to realize  
> that this current setup should be considered temporary (until the end of the  
> year) and thinking&resources should probably now rather be dedicated towards  
> setting up two national production machines by the end of the year (one for  
> the national repository/dashboard, one for the HMIS), and these should align  
> as much as feasible with the description in the link Ola sent:  
> [http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415](http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415)

I see that this description stops short of describing the automatic  
startup and shutdown scripts. Does anyone have some good examples to  
contribute?

> **···**
>
> On 19 August 2011 11:40, Knut Staring \<knutst@gmail.com\> wrote:
> 
> > In fact, we already also have a Linode, so far with only 4 GB, but that can  
> > of course be increased as needed.  
> > Knut
> > 
> > On Fri, Aug 19, 2011 at 12:28 PM, Bob Jolliffe \<bobjolliffe@gmail.com\> \> wrote:
> > 
> > > dhis-live is not really designed to be run as a service and I wouldn't  
> > > really recommend trying. Given that it has a user interaction element  
> > > in the toolbar etc. Running as a service is sort of the opposite of  
> > > its defining use case which is to have a minimally configured  
> > > clickable app to run on a desktop.
> > > 
> > > I think there are lots of tips on the web regarding running tomcat as  
> > > a service. Also HISP India has some previous experience in running  
> > > many tomcat's on a single windows server for different states. Maybe  
> > > Bharath or John might chip in how they have set up the service.  
> > > Assuming that is, that they ran tomcat as a windows service. Possibly  
> > > they logged in and manually started and stopped them.
> > > 
> > > I always find it interesting when looking at the merits of windows vs  
> > > linux servers that the argument is usually given that windows is more  
> > > familiar and the hurdle to move to linux is too great. But when one  
> > > scrapes the surface it seems that windows server skills are actually  
> > > very scarce. People think they understand windows server because it  
> > > looks just like windows. But you'll actually find much more  
> > > knowledgeable support in our community for setting up a  
> > > dhis+tomcat+postgres+ubuntu. Just my two cents 🙂
> > > 
> > > Re displaying different text on hover, its not a bad idea, but not one  
> > > that anyone is likely to prioritize immediately. Maybe create a  
> > > blueprint so the idea is not lost. From a zero-configuration  
> > > perspective there is not much to go on mind you. We have the options  
> > > of server port, database name or dhis home directory to distinguish  
> > > between them, but using something mangled from those would at least  
> > > provide something. A more nicely named instance would require an  
> > > additional config parameter or a small dialog on startup.
> > > 
> > > Cheers  
> > > Bob
> > > 
> > > On 19 August 2011 11:06, Knut Staring \<knutst@gmail.com\> wrote:  
> > > \> On Thu, Aug 18, 2011 at 2:59 PM, Bob Jolliffe \<bobjolliffe@gmail.com\> \>\> \> wrote:  
> > > \>\>  
> > > \>\> On 18 August 2011 13:56, Knut Staring \<knutst@gmail.com\> wrote:  
> > > \>\> \> On 8/18/11, Knut Staring \<knutst@gmail.com\> wrote:  
> > > \>\> \>\> As Ola pointed out, the remaining and important issue is the  
> > > \>\> \>\> automated  
> > > \>\> \>\> startup after a power cut.  
> > > \>\> \>  
> > > \>\> \> In fact, this is really easy, just place shortcuts to the two  
> > > \>\> \> dhis2-live.exe files in the Windows Startup folder:  
> > > \>\> \>  
> > > \>\> \>  
> > > \>\> \> [Windows help & learning](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)  
> > > \>\>  
> > > \>\> Are talking about startup or logging in?  
> > > \>  
> > > \> Good point - that method does require the manual step of going to the  
> > > \> machine and logging in.  
> > > \>  
> > > \> Ideally, we would create our own three services that start automagically  
> > > \> on  
> > > \> boot. Found the following link, but have not tried it yet:  
> > > \> [sc.exe create | Microsoft Learn](http://support.microsoft.com/kb/251192)  
> > > \> Knut  
> > > \>\>  
> > > \>\> \>  
> > > \>\> \> Knut  
> > > \>\> \>  
> > > \>  
> > > \>  
> > > \>  
> > > \> --  
> > > \> Cheers,  
> > > \> Knut Staring  
> > > \>
> > 
> > --  
> > Cheers,  
> > Knut Staring

---

<div class="post-metadata">

**Author:** ![Orvalho\_Augusto](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/o/8491ac/32.png) [@Orvalho\_Augusto](https://community.dhis2.org/u/Orvalho_Augusto)\
**Post date:** [24 October 2011 08:02 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/17 "2011-10-24T08:02:04Z")

</div>

I am disoriented with this. So I have tried to set dhis2.home on web.xml and the second war continues to use the DHIS2\_HOME.

Setting tomcat to listen different ports means to waist machine resources that I do not have and the second instance will be used for tests.

What is the recommendation now?

Caveman

> **···**
>
> On Fri, Aug 19, 2011 at 5:09 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> > On 19 August 2011 11:40, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > Thanks for all the input - it has been very useful. I have come to realize
> > 
> > > that this current setup should be considered temporary (until the end of the
> > 
> > > year) and thinking&resources should probably now rather be dedicated towards
> > 
> > > setting up two national production machines by the end of the year (one for
> > 
> > > the national repository/dashboard, one for the HMIS), and these should align
> > 
> > > as much as feasible with the description in the link Ola sent:
> > 
> > > [http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415](http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415)
> 
> > I see that this description stops short of describing the automatic
> > 
> > startup and shutdown scripts. Does anyone have some good examples to
> > 
> > contribute?
> 
> > > In fact, we already also have a Linode, so far with only 4 GB, but that can
> > 
> > > of course be increased as needed.
> > 
> > > Knut
> > 
> > > 
> > 
> > > On Fri, Aug 19, 2011 at 12:28 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) \> \> \> wrote:
> > 
> > > >
> > 
> > > > dhis-live is not really designed to be run as a service and I wouldn’t
> > 
> > > > really recommend trying. Given that it has a user interaction element
> > 
> > > > in the toolbar etc. Running as a service is sort of the opposite of
> > 
> > > > its defining use case which is to have a minimally configured
> > 
> > > > clickable app to run on a desktop.
> > 
> > > >
> > 
> > > > I think there are lots of tips on the web regarding running tomcat as
> > 
> > > > a service. Also HISP India has some previous experience in running
> > 
> > > > many tomcat’s on a single windows server for different states. Maybe
> > 
> > > > Bharath or John might chip in how they have set up the service.
> > 
> > > > Assuming that is, that they ran tomcat as a windows service. Possibly
> > 
> > > > they logged in and manually started and stopped them.
> > 
> > > >
> > 
> > > > I always find it interesting when looking at the merits of windows vs
> > 
> > > > linux servers that the argument is usually given that windows is more
> > 
> > > > familiar and the hurdle to move to linux is too great. But when one
> > 
> > > > scrapes the surface it seems that windows server skills are actually
> > 
> > > > very scarce. People think they understand windows server because it
> > 
> > > > looks just like windows. But you’ll actually find much more
> > 
> > > > knowledgeable support in our community for setting up a
> > 
> > > > dhis+tomcat+postgres+ubuntu. Just my two cents 🙂
> > 
> > > >
> > 
> > > > Re displaying different text on hover, its not a bad idea, but not one
> > 
> > > > that anyone is likely to prioritize immediately. Maybe create a
> > 
> > > > blueprint so the idea is not lost. From a zero-configuration
> > 
> > > > perspective there is not much to go on mind you. We have the options
> > 
> > > > of server port, database name or dhis home directory to distinguish
> > 
> > > > between them, but using something mangled from those would at least
> > 
> > > > provide something. A more nicely named instance would require an
> > 
> > > > additional config parameter or a small dialog on startup.
> > 
> > > >
> > 
> > > > Cheers
> > 
> > > > Bob
> > 
> > > >
> > 
> > > > On 19 August 2011 11:06, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > > > On Thu, Aug 18, 2011 at 2:59 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) \> \> \>\> \> wrote:
> > 
> > > > > >
> > 
> > > > > > On 18 August 2011 13:56, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > > > > > On 8/18/11, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > 
> > > > > > > > As Ola pointed out, the remaining and important issue is the
> > 
> > > > > > > > automated
> > 
> > > > > > > > startup after a power cut.
> > 
> > > > > > >
> > 
> > > > > > > In fact, this is really easy, just place shortcuts to the two
> > 
> > > > > > > dhis2-live.exe files in the Windows Startup folder:
> > 
> > > > > > >
> > 
> > > > > > >
> > 
> > > > > > > [http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)
> > 
> > > > > >
> > 
> > > > > > Are talking about startup or logging in?
> > 
> > > > >
> > 
> > > > > Good point - that method does require the manual step of going to the
> > 
> > > > > machine and logging in.
> > 
> > > > >
> > 
> > > > > Ideally, we would create our own three services that start automagically
> > 
> > > > > on
> > 
> > > > > boot. Found the following link, but have not tried it yet:
> > 
> > > > > [http://support.microsoft.com/kb/251192](http://support.microsoft.com/kb/251192)
> > 
> > > > > Knut
> > 
> > > > > >
> > 
> > > > > > >
> > 
> > > > > > > Knut
> > 
> > > > > > >
> > 
> > > > >
> > 
> > > > >
> > 
> > > > >
> > 
> > > > > –
> > 
> > > > > Cheers,
> > 
> > > > > Knut Staring
> > 
> > > > >
> > 
> > > 
> > 
> > > 
> > 
> > > 
> > 
> > > –
> > 
> > > Cheers,
> > 
> > > Knut Staring
> > 
> > >
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Orvalho\_Augusto](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/o/8491ac/32.png) [@Orvalho\_Augusto](https://community.dhis2.org/u/Orvalho_Augusto)\
**Post date:** [25 October 2011 03:53 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/18 "2011-10-25T03:53:07Z")

</div>

Thanks I followed Jason solution in Nigeria editing  
dhis-support-external-\*\*.jar

It works.

Caveman

> **···**
>
> On Mon, Oct 24, 2011 at 10:02 AM, Orvalho Augusto [orvaquim@gmail.com](mailto:orvaquim@gmail.com) wrote:
> 
> > I am disoriented with this. So I have tried to set dhis2.home on web.xml and the second war continues to use the DHIS2\_HOME.
> > 
> > Setting tomcat to listen different ports means to waist machine resources that I do not have and the second instance will be used for tests.
> > 
> > What is the recommendation now?
> > 
> > Caveman
> 
> > On Fri, Aug 19, 2011 at 5:09 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> > 
> > > On 19 August 2011 11:40, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > > 
> > > > Thanks for all the input - it has been very useful. I have come to realize
> > > 
> > > > that this current setup should be considered temporary (until the end of the
> > > 
> > > > year) and thinking&resources should probably now rather be dedicated towards
> > > 
> > > > setting up two national production machines by the end of the year (one for
> > > 
> > > > the national repository/dashboard, one for the HMIS), and these should align
> > > 
> > > > as much as feasible with the description in the link Ola sent:
> > > 
> > > > [http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415](http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415)
> 
> > > I see that this description stops short of describing the automatic
> > > 
> > > startup and shutdown scripts. Does anyone have some good examples to
> > > 
> > > contribute?
> 
> > > > In fact, we already also have a Linode, so far with only 4 GB, but that can
> > > 
> > > > of course be increased as needed.
> > > 
> > > > Knut
> > > 
> > > > 
> > > 
> > > > On Fri, Aug 19, 2011 at 12:28 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) \> \> \> \> \> wrote:
> > > 
> > > > >
> > > 
> > > > > dhis-live is not really designed to be run as a service and I wouldn’t
> > > 
> > > > > really recommend trying. Given that it has a user interaction element
> > > 
> > > > > in the toolbar etc. Running as a service is sort of the opposite of
> > > 
> > > > > its defining use case which is to have a minimally configured
> > > 
> > > > > clickable app to run on a desktop.
> > > 
> > > > >
> > > 
> > > > > I think there are lots of tips on the web regarding running tomcat as
> > > 
> > > > > a service. Also HISP India has some previous experience in running
> > > 
> > > > > many tomcat’s on a single windows server for different states. Maybe
> > > 
> > > > > Bharath or John might chip in how they have set up the service.
> > > 
> > > > > Assuming that is, that they ran tomcat as a windows service. Possibly
> > > 
> > > > > they logged in and manually started and stopped them.
> > > 
> > > > >
> > > 
> > > > > I always find it interesting when looking at the merits of windows vs
> > > 
> > > > > linux servers that the argument is usually given that windows is more
> > > 
> > > > > familiar and the hurdle to move to linux is too great. But when one
> > > 
> > > > > scrapes the surface it seems that windows server skills are actually
> > > 
> > > > > very scarce. People think they understand windows server because it
> > > 
> > > > > looks just like windows. But you’ll actually find much more
> > > 
> > > > > knowledgeable support in our community for setting up a
> > > 
> > > > > dhis+tomcat+postgres+ubuntu. Just my two cents 🙂
> > > 
> > > > >
> > > 
> > > > > Re displaying different text on hover, its not a bad idea, but not one
> > > 
> > > > > that anyone is likely to prioritize immediately. Maybe create a
> > > 
> > > > > blueprint so the idea is not lost. From a zero-configuration
> > > 
> > > > > perspective there is not much to go on mind you. We have the options
> > > 
> > > > > of server port, database name or dhis home directory to distinguish
> > > 
> > > > > between them, but using something mangled from those would at least
> > > 
> > > > > provide something. A more nicely named instance would require an
> > > 
> > > > > additional config parameter or a small dialog on startup.
> > > 
> > > > >
> > > 
> > > > > Cheers
> > > 
> > > > > Bob
> > > 
> > > > >
> > > 
> > > > > On 19 August 2011 11:06, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > > 
> > > > > > On Thu, Aug 18, 2011 at 2:59 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) \> \> \> \> \>\> \> wrote:
> > > 
> > > > > > >
> > > 
> > > > > > > On 18 August 2011 13:56, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > > 
> > > > > > > > On 8/18/11, Knut Staring [knutst@gmail.com](mailto:knutst@gmail.com) wrote:
> > > 
> > > > > > > > > As Ola pointed out, the remaining and important issue is the
> > > 
> > > > > > > > > automated
> > > 
> > > > > > > > > startup after a power cut.
> > > 
> > > > > > > >
> > > 
> > > > > > > > In fact, this is really easy, just place shortcuts to the two
> > > 
> > > > > > > > dhis2-live.exe files in the Windows Startup folder:
> > > 
> > > > > > > >
> > > 
> > > > > > > >
> > > 
> > > > > > > > [http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts](http://windows.microsoft.com/en-US/windows-vista/Run-a-program-automatically-when-Windows-starts)
> > > 
> > > > > > >
> > > 
> > > > > > > Are talking about startup or logging in?
> > > 
> > > > > >
> > > 
> > > > > > Good point - that method does require the manual step of going to the
> > > 
> > > > > > machine and logging in.
> > > 
> > > > > >
> > > 
> > > > > > Ideally, we would create our own three services that start automagically
> > > 
> > > > > > on
> > > 
> > > > > > boot. Found the following link, but have not tried it yet:
> > > 
> > > > > > [http://support.microsoft.com/kb/251192](http://support.microsoft.com/kb/251192)
> > > 
> > > > > > Knut
> > > 
> > > > > > >
> > > 
> > > > > > > >
> > > 
> > > > > > > > Knut
> > > 
> > > > > > > >
> > > 
> > > > > >
> > > 
> > > > > >
> > > 
> > > > > >
> > > 
> > > > > > –
> > > 
> > > > > > Cheers,
> > > 
> > > > > > Knut Staring
> > > 
> > > > > >
> > > 
> > > > 
> > > 
> > > > 
> > > 
> > > > 
> > > 
> > > > –
> > > 
> > > > Cheers,
> > > 
> > > > Knut Staring
> > > 
> > > >
> 
> > > * * *
> > > 
> > > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > > 
> > > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > > 
> > > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)
> > > 
> > > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> >

---

<div class="post-metadata">

**Author:** ![sca007](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/sca007/32/30694_2.png) [@sca007](https://community.dhis2.org/u/sca007)\
**Post date:** [2 December 2020 00:44 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/19 "2020-12-02T00:44:39Z")

</div>

Can we do these steps in 2.35 also?  
There is no way to edit dhis-support-external-\*\*.jar and no LIVE versions available !!!

---

<div class="post-metadata">

**Author:** ![Knut\_Staring](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/knut_staring/32/32549_2.png) [@Knut\_Staring](https://community.dhis2.org/u/Knut_Staring)\
**Post date:** [2 December 2020 11:54 UTC](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389/20 "2020-12-02T11:54:51Z")

</div>

In Bob’s response above, he suggested an alternative approach which might work: “You should be able to set this in a variety of ways in your automatic  
startup scripts eg. by adding “-Ddhis2.home=c:/mydhis” to CATALINA\_OPTS in tomcat startup script.”

[Next page](https://community.dhis2.org/t/multiple-dhis2-instances-on-windows/12389.md?page=2)
