Tag Archives: Mirth

Installing Mirth on Linux Amazon EC2

For a recent health care information system integration job, I was required to learn how to use HL7 and the MIRTH integration engine. Here is how I learned to install MIRTH on an Amazon cloud server.

NOTE: some of the information in this tutorial was hard to come by. Mirth doesn't offer high level support unless you purchase it for $5000 and up depending on the type of membership you acquire, so I did a lot of trial and error to figure this out and hope it helps others in a similar situation. -Ian L. author

Set up an appropriate server

First thing you need to do is make sure your server instance can support Mirth. The main concern here is that it has JRE and proper ports. Check your instance for JRE by typing the following at the command prompt for your server:

java -version

and make sure it returns version 1.6 or better.

Next, checĀ  your security group from the Amazon EC2 console and make sure you allow the following ports:

SSH tcp 22 22 0.0.0.0/0
HTTPS tcp 443 443 0.0.0.0/0
HTTP tcp 80 80 0.0.0.0/0
Custom tcp 8080 8080 0.0.0.0/0
Custom tcp 8443 8443 0.0.0.0/0

If you don't have a port such as 8443, then add it or start a new instance with a new security group and manually add the proper ports indicated above.

Installing MIRTH

Installing MIRTH is simple using wget. Simply use the following commands

First login as root or use sudo in front of the command like in the following example:

It took a few minutes for it to download in my case. After it is done, use the following command to extract it:

sudo tar xvfz mirthconnect-2.0.1.5164.b404-unix.tar.gz

It will not work if you are not logged in as root or use the sudo command in front of the tar command as in the above example.

Starting Mirth Connect

Here I got a little chung up because the tutorial I read said to change to the directory like this"

cd Mirth Connect

weill that didn't work because Linux doesn't like spaces in directory names, so you have to escape it with a backslash like this:

cd Mirth/ Connect

Once you are in the Mirth Connect directory, run the following start command:

./mirthconnect_service start

Accessing Mirth from a Browser

The next thing you should do is open the GUI in your browser using your server's IP or domain name followed by a semi-colon and the port no. The default port is 8080 so I used:

http://53.241.142.64:8080/

replace the IP address with your own in the above command.