- |
- Discussion |
- Edit |
- History
Step-by-Step Installation for Developers
Contents |
[edit]
Operating System Specific:
- OS X: Installation for Developers on OS X.
- Linux:
- Virtual Machine: QEMU or download the OpenMRS_Appliance.
- (old) Step-by-Step Installation for Developers (for v1.0.0 to v1.4.0)
[edit]
STEP 1 - Prerequisites for Installing OpenMRS
- Download and install the latest stable release of the following software
- Java >= at least v1.5 aka v5.0 (implementers can use the JRE, developers need the JDK)
- MySQL 5.x
- Ant >= latest stable release. included with eclipse
- Tomcat >= at least v5.5 or v6.x
- Eclipse IDE for Java EE Developers >= latest stable release
- One (or more) Subversion client:
- Subversion OR
- TortoiseSVN (if you're working within Windows) OR Subclipse (for working within Eclipse)
- NOTE- You may use both TortoiseSVN and Subclipse, but only one is necessary.
- Growl + growlnotify (in the Growl Extras folder) - for Macs
[edit]
STEP 2 - Retrieve a Copy of the Source Code
- With Subversion installed:
- Create a new directory for the code. Our example will call it OPENMRS.
- At a command line prompt in the OPENMRS directory, run %SVN_HOME%/bin/svn checkout http://svn.openmrs.org/openmrs/trunk
- With TortoiseSVN installed:
- Right-click within explorer and select SVN Checkout...
- Enter URL as http://svn.openmrs.org/openmrs/trunk, specify a new directory for your working copy, then click OK
- With Subclipse installed (in eclipse):
- File-->New-->Project...-->SVN-->Checkout project from SVN
- Use Repository - http://svn.openmrs.org/
- Browse in new tree to /openmrs/trunk
- Go through various prompts with Next>
[edit]
STEP 3 - Create your OpenMRS-build.properties file =
- Open a text editor (i.e. Notepad - click Start > Programs > Accessories > Notepad)
- Copy-and-paste Build Properties section from Overriding OpenMRS Default Properties into Notepad
- Save file to
- %USER_HOME%\Application Data\OpenMRS\OpenMRS-build.properties (for windows) or ~/.OpenMRS/OPENMRS-build.properties (for unix) or %USER_HOME%\AppData\Roaming\OpenMRS\OpenMRS-build.properties (for Windows Vista)
- Modify the Build Properties to match the location for your installation of Tomcat.
- for windows
-
tomcat.home=C:/Program Files/Apache Software Foundation/Tomcat 6.0/
- for unix
-
tomcat.home=/usr/local/apache-tomcat-6.0.16
- If you are using unix, change your properties.xml file so that:
-
- <property name="tomcat.home" value="/usr/local/apache-tomcat-6.0.16"/>
- <property name="catalina.home" value="/usr/local/apache-tomcat-6.0.16"/>
-
NOTE: Make sure the file does not save with a .txt file extension behind the scenes (Turn on 'show extensions for known filetypes' in windows).
[edit]
STEP 4 - Deploy OpenMRS
Assumptions and Dependencies:
- Ensure that Tomcat is running
- Once you are up and running, the default OpenMRS user/password is admin/test
[edit]
Eclipse (in Windows, Linux, Unix, Mac)
- Run Eclipse.exe
- Download the OpenMRS trunk code using the subclipse plugin and the SVN Repository perspective.
- In the project explorer, right click on your OpenMRS project folder root and select "properties", left click on "Java Compiler" and ensure that the Java Compiler is set to Compiler compliance level 5.0
- Click Window > Show View > Ant
- Drag and Drop build.xml from the 'openmrs' project into the Ant view
- In the Ant view (left pane), expand the 'openmrs-trunk' build file
- Double click on the install ant task (this may take a few minutes)
- NOTE: Subsequent re-installs can be done using the update Ant task.
- Make sure your tomcat user has the roles manager,admin,tomcat
- More specifically, add these lines inside your Tomcat installation conf/tomcat-users.xml file:
- <role rolename="manager"/>
- <role rolename="tomcat"/>
- <role rolename="admin"/>
- <user username="test" password="test" roles="admin,manager,tomcat"/>
- You will want to restart Tomcat (stop service and start service) after you save these changes
- View your installation at http://localhost:${tomcat.port}/${webapp.name}/ (Default is http://localhost:8080/openmrs)
- For support on Windows XP/Vista/Eclipse integration, contact jim@manico.net
[edit]
Command Line (Windows XP)
- Open a Windows command line prompt
- Click Start Menu > Run
- Type 'cmd' at the Open prompt
- Press Ok
- Change directories to the openmrs project directory where you checked out the OpenMRS trunk code using Tortoise
- Type 'ant install'
- Assumes that Ant has been added to your PATH (provide link to instructions)
- Future compilations can run %ANT_HOME%/bin/ant -k clean remove install or %ANT_HOME%/bin/ant update
[edit]
Command Line (Unix / Linux)
- Log into server
- Open a bash shell
- Change directories to the openmrs project directory where you checked out the OpenMRS trunk code using svn.
- Type 'ant install'
- Future compilations can run %ANT_HOME%/bin/ant -k clean remove install or %ANT_HOME%/bin/ant update
[edit]
STEP 5 - Database and Runtime Properties Created
- Go to http://localhost:8080/openmrs in your web browser
- Walk through the initial setup wizard and it will create your database for you, put in demo data, and create your runtime properties file.
