It is possible to run multiple instances of OpenMRS in the same servlet container instance. OpenMRS looks up database connection properties from the runtime properties file and so the different instances can connect to different databases. The runtime properties file lookup is based on the name of the webapp, so creating a second instance is (almost) as easy as renaming the war file and deploying it.
...
The application data dir is where openmrs stores temporary data, the omods loaded, and the runtime properties. This is ~/.OpenMRS on linux based machines and /home/user/Application Data/OpenMRS for windows based ones. You can change the location of the application data directory several ways. See the Application Data Directory page for details and methods.
...
You can easily have two or more standalone openmrs installations on server. All data is kept within that unzipped folder. When the standalone starts up, it will keep trying new ports for mysql and tomcat until one is found that is available.
For developers using Jetty
...