Setting up JIRA on Mac OSX 10.11 El Capitan

By | January 3, 2016

Getting JIRA 7.0.5 on to my mac wasn’t as straight forward as I’d expected but I finally got there in the end. The first thing to note from the Atlassian website is:

osx not supported

which was taken from https://confluence.atlassian.com/jira/installing-jira-on-mac-os-x-191501161.html. These steps are what we will be following as well. If you are interested in what I had to do, read on!

Step 1. Download JIRA.

This is the easy part.

Step 2. Set JAVA_HOME

This is where the fun begins. In order to set JAVA_HOME, you have to have Java installed. To see if you have Java installed, type:

>> java -version

If you get “no Java runtime present, requesting install.” then you  need to head over to Oracle and download the latest version of Java. The important part here is that if you download the entire JDK, you can probably save yourself a lot of time. That wouldn’t be fun so I decided to just download the JRE. It’s all I need and I didn’t want to bloat my system with extra stuff.

When I download the JRE (1.8.65 in my case), typing in java -version still didn’t work. This is when I came across this blog post: http://anas.pk/2015/09/02/solution-no-java-runtime-present-mac-yosemite/ from Muhammad.

The key was that:
“…by default, /usr/bin/java is a symlink to /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java . To make it work on command line, we have to delete it and then recreate it pointing it to the java command in newly installed Oracle JRE which resides at /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin.”

So the solution was simple. Just run:
>> sudo rm /usr/bin/java
>> sudo ln -s /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin

Not so fast. In the latest OSX 10.11 (El Capitan), you can’t just modify content in /usr/bin. There is this funky new security feature called SIP. System Integrity Protection and you can read all about it here. Basically it restricts what a root user can do. ie no longer do you have full control as a root user.

But wait, there’s more! You can actually disable it by running

>> csrutil disable

in recovery mode. Read how to do this here.

So now you have disabled SIP, and you can repoint the sym link, lo and behold, you should get:

java

And all that was to get Java installed! We still have to set JAVA_HOME!

To set JAVA_HOME:
Open terminal and type:

>> vim .bash_profile

Hit “export JAVA_HOME=”/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home”
Click ESC then type :wq (save and quit in vim)

>> source .bash_profile

echo $JAVA_HOME if you see the path you are all set.

Step 3: Atlassian home directory

Go back to the Atlassian docs and set your home directory. You’ll have to find the “jira-application.properties” file which is located in “atlassian-jira-software-7.0.5-standalone/atlassian-jira/WEB-INF/classes”.

I set mine to /Atlassian/jira705. This allows me to install multiple versions in the same directory keeping it tidy. I can also make this the home directory for Confluence also.

Step 4: Start JIRA and pray it works.

Go into you Atlassian bin directory and run this command:

>> ./start-jira.sh

and you should see:

success

Now if that wasn’t a mission and a half, I don’t know what is. It took me the best part of half a day figuring all this out and granted there are easier ways, but they wouldn’t be as fun right?

Conclusion:

In the latest OSX version 10.11 El Capitan, there are a few road bumps to watch out for. Installing Java requires  a few additional steps, some repointing and the figuring out of what exactly JAVA_HOME points to.

Thanks to the author of the various resources pointed out as well.

4 thoughts on “Setting up JIRA on Mac OSX 10.11 El Capitan

  1. sudharsankss

    Hi ,

    Can you please advise me how to set java home on mac Capitan version for java 8 ? Tried all the possible solutions available online . Nothing seems to be working. No sunshine in life 🙁 Tried above mention steps as well.

    Thanks!
    Sudharsan.

    Reply
  2. Idris

    I am getting this error when I tried to run startup.sh and start-jura.sh. Any idea how to get past this?

    Reply
  3. Idris

    Here is the error: Wrong JVM version! You are running with .. but JIRA requires at least 1.8 to run.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *