OpenMRS-VM
From Foss2Serve
(Difference between revisions)
Emily.lovell (Talk | contribs) (Created page with "= Using a VM with OpenMRS Pre-installed= == Using the VM built at POSSE 2015 == * Download Virtual Box so that you can load the VM: https://www.virtualbox.org ** Accept all d...") |
m |
||
(7 intermediate revisions by one user not shown) | |||
Line 2: | Line 2: | ||
== Using the VM built at POSSE 2015 == | == Using the VM built at POSSE 2015 == | ||
+ | |||
* Download Virtual Box so that you can load the VM: https://www.virtualbox.org | * Download Virtual Box so that you can load the VM: https://www.virtualbox.org | ||
** Accept all default settings | ** Accept all default settings | ||
− | *In Virtual Box, File -> Import Appliance... and select OpenMRS.ova | + | *In Virtual Box, ''File -> Import Appliance...'' and select ''OpenMRS-on-Harvard-CS50.ova'' from wherever the file is on your physical machine |
− | **Click Import | + | **Click ''Import'' |
**Accept all default settings | **Accept all default settings | ||
− | *Select the newly imported virtual machine, then click File->Preferences (PC) or VirtualBox->Preferences (Mac), then Network, then Host-only Networks | + | *Select the newly imported virtual machine, then click ''File->Preferences'' (PC) or ''VirtualBox->Preferences'' (Mac), then ''Network'', then ''Host-only Networks'' |
− | **If you don't see a network adapter then +/add and accept the new adapter with default settings | + | **If you don't see a network adapter then ''+''/add and accept the new adapter with default settings |
− | **Then click Cancel/OK to accept settings | + | **Then click ''Cancel''/''OK'' to accept settings |
**Note: on Windows you may already see a network adapter, it is advisable to do the following | **Note: on Windows you may already see a network adapter, it is advisable to do the following | ||
− | ***Click the settings gear icon (settings for the selected VM), Network, Adapter 2, click drop-down menu next to Name:, and | + | ***Click the settings gear icon (settings for the selected VM), ''Network'', ''Adapter 2'', click drop-down menu next to ''Name:'', and reset ''VirtualBox Host-Only Ethernet Adapter'' (this may seem odd, but you are doing great!), click ''OK'' |
− | *Select the newly imported machine in the lefthand panel and click | + | *Select the newly imported machine in the lefthand panel and click ''Start'' (green arrow) |
*Starting OpenMRS in the virtual machine | *Starting OpenMRS in the virtual machine | ||
**Open a terminal in the VM and type: | **Open a terminal in the VM and type: | ||
− | ***cd openmrs-core | + | ***''cd openmrs-core'' |
− | ***cd webapp | + | ***''cd webapp'' |
− | ***mvn jetty:run | + | ***''mvn jetty:run'' |
**When you see the following in terminal window "[INFO] Starting scanner at interval of 10 seconds", then open a browser on the VM and go to: http://localhost:8080/openmrs . This starts OpenMRS | **When you see the following in terminal window "[INFO] Starting scanner at interval of 10 seconds", then open a browser on the VM and go to: http://localhost:8080/openmrs . This starts OpenMRS | ||
− | *To setup OpenMRS (in browser), you will need the mysql root username is jharvard, root password for the cs50 machine, which is | + | *To setup OpenMRS (in browser), you will need the mysql root username is ''jharvard'', root password for the cs50 machine, which is ''crimson'' |
*To stop the jetty server, type Ctrl+C in terminal where it is running | *To stop the jetty server, type Ctrl+C in terminal where it is running | ||
+ | |||
+ | == How the VM built at POSSE 2015 was created == | ||
+ | |||
+ | *OpenMRS Developer's Guide Manual Install instructions (starting point): http://en.flossmanuals.net/openmrs-developers-guide/get-set-up/ | ||
+ | *Documentation on cs50 image: https://manual.cs50.net/appliance/2015/ | ||
+ | *Steps followed (within cs50 VM): | ||
+ | **to prevent our terminal commands from getting logged/sent back to Harvard, in terminal enter: ''no cs50'' | ||
+ | **installed maven using apt-get: ''sudo apt-get install maven'' | ||
+ | **updated JDK to 1.8 following these instructions: http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/ | ||
+ | ***''sudo add-apt-repository ppa:webupd8team/java'' | ||
+ | ***''sudo apt-get update'' | ||
+ | ***''sudo apt-get install oracle-java8-installer'' | ||
+ | ***verify that version has been updated to 1.8 with ''java -version'' | ||
+ | **grab the sourcecode for OpenMRS from github; in a terminal, type: ''git clone https://github.com/openmrs/openmrs-core.git'' | ||
+ | **''mvn clean install'' (the next specified instruction to enter in terminal) was hitting an error at openmrs-web testing, so isntead we ran ''mvn clean install -DskipTests=true'' (recommended from: https://talk.openmrs.org/t/openmrs-api-failure-with-maven/2847) | ||
+ | *In Virtual Box, ''File -> Export Appliance...'' | ||
+ | **Accept all default settings | ||
+ | |||
+ | [[Category:OpenMRS]] |
Latest revision as of 11:00, 28 January 2017
Using a VM with OpenMRS Pre-installed
Using the VM built at POSSE 2015
- Download Virtual Box so that you can load the VM: https://www.virtualbox.org
- Accept all default settings
- In Virtual Box, File -> Import Appliance... and select OpenMRS-on-Harvard-CS50.ova from wherever the file is on your physical machine
- Click Import
- Accept all default settings
- Select the newly imported virtual machine, then click File->Preferences (PC) or VirtualBox->Preferences (Mac), then Network, then Host-only Networks
- If you don't see a network adapter then +/add and accept the new adapter with default settings
- Then click Cancel/OK to accept settings
- Note: on Windows you may already see a network adapter, it is advisable to do the following
- Click the settings gear icon (settings for the selected VM), Network, Adapter 2, click drop-down menu next to Name:, and reset VirtualBox Host-Only Ethernet Adapter (this may seem odd, but you are doing great!), click OK
- Select the newly imported machine in the lefthand panel and click Start (green arrow)
- Starting OpenMRS in the virtual machine
- Open a terminal in the VM and type:
- cd openmrs-core
- cd webapp
- mvn jetty:run
- When you see the following in terminal window "[INFO] Starting scanner at interval of 10 seconds", then open a browser on the VM and go to: http://localhost:8080/openmrs . This starts OpenMRS
- Open a terminal in the VM and type:
- To setup OpenMRS (in browser), you will need the mysql root username is jharvard, root password for the cs50 machine, which is crimson
- To stop the jetty server, type Ctrl+C in terminal where it is running
How the VM built at POSSE 2015 was created
- OpenMRS Developer's Guide Manual Install instructions (starting point): http://en.flossmanuals.net/openmrs-developers-guide/get-set-up/
- Documentation on cs50 image: https://manual.cs50.net/appliance/2015/
- Steps followed (within cs50 VM):
- to prevent our terminal commands from getting logged/sent back to Harvard, in terminal enter: no cs50
- installed maven using apt-get: sudo apt-get install maven
- updated JDK to 1.8 following these instructions: http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
- verify that version has been updated to 1.8 with java -version
- grab the sourcecode for OpenMRS from github; in a terminal, type: git clone https://github.com/openmrs/openmrs-core.git
- mvn clean install (the next specified instruction to enter in terminal) was hitting an error at openmrs-web testing, so isntead we ran mvn clean install -DskipTests=true (recommended from: https://talk.openmrs.org/t/openmrs-api-failure-with-maven/2847)
- In Virtual Box, File -> Export Appliance...
- Accept all default settings