Note |
---|
This page is outdated and no longer receives updates! |
Step by step setup walk through for Linux Developer Installation
...
Notice that the step named Build Maven Project below also works on Windows 7 / 64.
Prerequisites:
Install: Eclipse IDE for Java EE Developers
Download: eclipse-jee-juno-linux-gtk.tar.gz (May need to select alter for latest file or architecture at http://www.eclipse.org/downloads/)
Open terminal and navigate to your download folder
su – or prefix all commands with sudo
Extract files
tar -xvzf eclipse-jee-juno-linux-gtk.tar.gz -C /opt (varies by downloaded file name)
Add read permissions to all files
chmod -R +r /opt/eclipse
Create Eclipse executable on /usr/bin path
touch /usr/bin/eclipse
chmod 755 /usr/bin/eclipse
Open eclipse file with your favorite editor
nano -w /usr/bin/eclipse
(or graphically)
gksu -u root gedit /usr/bin/eclipse
Paste following content to file
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
Create Gnome desktop launcher
## Create following file, with your favorite editor ##
/usr/share/applications/eclipse.desktop
( graphically)
gksu -u root gedit /usr/share/applications/eclipse.desktop
## Add following content to file and save ##
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse SDK 3.6.1
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
2. Make sure JDK is installed*
sudo apt-get install openjdk-6-jdk
3. Make sure mysql-server is installed (Required for OpenMRS Database)*
sudo apt-get install mysql-server
*** NOTE: You will be prompted to create a database password, do not forget this as you need it later on!!!
Configure Eclipse and Plugins
Launch Eclipse EE and create a new workspace (Applications -> Programming -> Eclipse)
See How to install Eclipse plugins sections here
Check out Source Code from repository
** NOTE ** You might need to click on the workspace icon in the top right of Eclipse main panel to get into the Java perspective.
...
See how to check out a maven project from a Git
...
repository here
Install OpenMRS
In the project explorer panel, right click on the project which has been created and navigate to “Run as → Maven Install” (this may take some time to complete)
Build Maven Project
**Review console notifications to makes sure Maven installation was successful.
Expand the project and navigate to the “webapp” folder. Right click and select “ Run As -Maven Build”
In the “Goals” text field enter: “jetty:run” which will start the java application server locally.
In the JRE tab, put in the following VM arguments: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
Press the Run button
Configure OpenMRS Installation for the first time
...
Once the jetty application server is running (via Maven Build, last step), point your browser to http://127.0.0.1:8080/openmrs/initialsetup
http://127.0.0.1:8080/openmrs/initialsetupClick on the “Advanced” installation option and press continue.
Follow these configuration instructions. ## ** NOTE this is where you will need the mysql database password from before
...
You should now be able to login to OpenMRS via http://127.0.0.1:8080/
Default Login Details for your Locally hosted OpenMRS
Username : admin
Password : either "Admin123" or "test"
End Notes
When making most code modifications, you need to complete a Maven Install. You may cut down on compile time by skipping OpenMRS tests if desired. This can be done by creating a new run configuration for the project and typing into the “Goals” textfield the word “install”, and checking the checkbox which says “skip tests”.
...