Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
This is the port at which to run Tomcat
This is the port at which to run MySQL
File → Quit
This stops Tomcat and MySQL and then closes the application
File → Launch Browser
This opens the OpenMRS login page for the current web application context
File → Clear Output
This clears the output log in the user interface text area, but does not clear the log file written on the file system
This button runs Tomcat, which will automatically start the MySQL database engine if it was not already running. For the embedded MySQL, the first connection automatically starts the MySQL engine
This button stops Tomcat and then also stops the MySQL database engine, without closing the application
Minimizing or maximizing the application window does not have any effect on the server. The Close window icon will stop the server (behaves as File → Quit) but will first ask you to confirm.
|-commandline||Run from the commandline|
Use to override the MySQL port in the runtime properties file
Use to override the Tomcat port in the runtime properties file
Use to start the server
Use to stop the server
Use to launch a new browser instance
|-noninteractive||No prompting, installs demo data|
|-noninteractive -expert||No prompting, installs without demo data (just basic metadata)|
|-noninteractive -empty||No prompting, installs with an empty database|
After running the standalone jar, it will take you to the OpenMRS log in web page where you can log in with the following default username and password:
OpenMRS username: admin
OpenMRS password: Admin123 or test
The MySQL database has these credentials by default:
MySQL username: openmrs
MySQL password: randomly generated at initial startup. Look in
openmrs-runtime.properties file under
Go to the extracted standalone folder and copy the password from the
openmrs-runtime.propertiesfile. Then go to the database/bin folder and execute this at the commandline:
That will prompt you for a password which you copied from the
If you are using graphical tools like Navicat and others, just create a new connection and enter the appropriate properties of username, password, port, etc as in the run-time properties file.
If running windows, then you can change the above command to: mysql.exe -u openmrs -p
If you are running multiple instances locally and want to specify a port, you can use something like this:
You can override the default tomcat memory by changing these values in the "vm_arguments" run-time properties file property as below:
vm_arguments=-Xmx512m -Xms512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m
You can run the embedded tomcat in debug mode by appending values to the "vm_arguments" run-time properties file property as below:
vm_arguments=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000
After starting the standalone with those vm arguments, if you are using an IDE like eclipse,
Go to "Run->Debug Configurations...". Click on "Remote Java Applications", then click "New". Type in the title. Set the port as 5000 and click the Debug button. Feel free to change the port to any other value.
You can profile the standalone with YourKit by appending values to the "vm_arguments" run-time properties file property as below:
vm_arguments=-agentpath:<full agent library path>
This is an example: vm_arguments = -agentpath:/Projects/YourKit_Java_Profiler_11.0.8.app/bin/mac/libyjpagent.jnilib
You can get details of the vm arguments from: http://www.yourkit.com/docs/10/help/agent.jsp
openmrs.warfile in "
tomcat/webapps" to something different. e.g
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)":
&server.socket=/tmp/openmrs.sock" (without the double quotes) at the end of the value in the
connection.urlkey of the runtime properties file, and then restart the standalone application. If after doing that, you still get the same error message, then on your command line, add this: --socket=/tmp/openmrs.sock
connection.urlin the runtime properties file in this format:
=32M, you would add it as:
Please create a ticket in our issue tracker under the "OpenMRS Standalone" project.
The standalone is an executable jar. Inside the jar is a Java embedded MySQL jar and an embedded Tomcat jar. (TODO, add links to mysql and tomcat pages) The Tomcat home folder is the directory where you unzipped the standalone. The tomcathome/webapps already has the openmrs war file inside of it, ready to be run. When you execute the standalone jar, MySQL and Tomcat are started on open ports. Because the openmrs war file is in the tomcat webapps directory, it starts automatically.
Code for the standalone can be found in git: https://github.com/openmrs/openmrs-standalone
See the readme.txt file in the openmrs standalone code for instructions on how to build, package, and release the standalone application.