Installing JIRA applications on Linux from Archive File

In this guide we'll run you through installing a JIRA application in a production environment, with an external database, manually using a tar.gz file.

This method gives you the most control over the installation process.

Other ways to install JIRA: 

  • Evaluation - get your free trial up and running in no time.
  • Installer – install JIRA using the Linux installer. 
  • Windows – install JIRA on a Windows server. 

On this page:

Before you begin

Before you install JIRA, there are a few questions you need to answer. 

 

Are you using a supported operating system and Java version?
  Tell me more...

Check the Supported platforms page for the version of JIRA you are installing. This will give you info on supported operating systems, databases and browsers.

Good to know:

  • We don't support installing JIRA on OS X or mac OS for production environments.
  • JIRA can't run on OpenJDK. You'll need to install Oracle Java.
  • You can use either the JDK (Java Development Kit) or JRE (Java Runtime Environment).
  • We only support the version of Apache Tomcat that is bundled with JIRA.
Do you want to run JIRA as a service?
  Tell me more...

Running JIRA as a service means that your JIRA application will automatically start up when your Linux server is started.

You should use the Linux installer if you want to run JIRA as a service.

If you choose not to run JIRA as a service:

  • You will start your JIRA application by running the start-jira.sh file in your JIRA installation directory.
  • We recommend creating a dedicated user to run JIRA. This user must have full read, write and execute access to the installation directory and home directory.
  • JIRA will need to be restarted manually if your server is restarted.
What database do you plan to use? 
  Tell me more...

To run JIRA in production you'll need an external database. Check the  Supported platforms page for the version you're installing for the list of databases we currently support. If you don't already have a database, PostgreSQL is free, easy to set up and has been extensively tested with JIRA.

Good to know:

  • Set up your database before you begin. Step-by-step guides are available for PostgreSQLOracleMySQL, and SQL Server.
  • Use UTF-8 character encoding.
  • If you're using Oracle or MySQL you'll need to download the driver for your database.
  • The embedded H2 database can be used for evaluating JIRA, but you'll need to migrate to another database before running in production. You may find it easier to use external database from the start.

Do you have a JIRA license?

  Tell me more...

You'll need a valid JIRA Software Server, JIRA Core Server or JIRA Service Desk Server license to use JIRA.

Good to know:

  • If you have not yet purchased a JIRA application license you'll be able to create an evaluation license during setup.
  • If you already have a license key you'll be prompted to log in to my.atlassian.com to retrieve it, or you can enter the key manually during setup.
  • If you're migrating from JIRA Cloud, you'll need a new license.

Is your JAVA_HOME variable set correctly?
  Tell me more...

Before you install JIRA, check that you're running a supported Java version and that the JAVA_HOME environment variable is set correctly.

JIRA applications can only run with Oracle JDK or JRE.

To check your Java version:

$ java -version

To check your JAVA_HOME variable is set correctly:

$ echo $JAVA_HOME

If you see a path to your Java installation directory, the JAVA_Home environment variable has been set correctly. If a path is not returned you'll need to set your JAVA_HOME environment variable manually before installing JIRA.

Have you created a dedicated user to run JIRA?
  Tell me more...

We strongly recommend running JIRA as a dedicated user.

You should create this user before you begin, so that when creating the installation and home directories, you can give this user appropriate read and write permissions.

In this example, we'll create a user called jira:

$ sudo /usr/sbin/useradd --create-home --comment "Account for running JIRA Software" --shell /bin/bash jira

 

Install a JIRA application

1. Download JIRA

Download the tar.gz file for your operating system - https://www.atlassian.com/software/jira/download

2. Create the installation directory

  1. Create your installation directory – this is where JIRA will be installed. Avoid using spaces or special characters in the path. We'll refer to this directory as your <installation-directory>
     

      Show me how to do this...

    In this example we'll call our installation directory jirasoftware:

    $ mkdir jirasoftware
  2. Extract the JIRA tar.gz file to your <installation-directory>. We recommend using a GNU version of the archive utility, especially on Solaris.
     

      Show me how to do this...

    Change to the directory where you downloaded JIRA then execute these commands:

    $ tar -xzf atlassian-jira-software-X.X.X.tar.gz -C <installation-directory>
    $ cd <installation-directory>
    $ tar -xf atlassian-jira-software-X.X.X.tar

    Replace x.x.x with your JIRA version and <installation-directory> with the full path to the directory you created in the last step.

  3. Give your dedicated JIRA user read, write and execute permission to your <installation-directory>
     

      Show me how to do this...

    In this example we're changing ownership of the installation directory and giving the user jira read, write and execute permissions.

    $ chown -R jira <installation-directory>
    $ chmod -R u=rwx,go-rwx <installation-directory>

3. Create the home directory

  1. Create your home directory – this is where JIRA application data like logs, search indexes and files will be stored. This should be separate to your installation directory, with no spaces or special characters in the path. Each JIRA application needs its own home directory. 

    We'll refer to this directory as your <home-directory>
     

      Show me how to do this...

    In this example we'll call our home directory jirasoftware-home:

    $ mkdir jirasoftware-home
  2. Give your dedicated JIRA user read, write and execute permissions to the <home-directory>.

      Show me how to do this...

    In this example we're changing ownership of the home directory and giving the user jira read, write and execute permissions.

    $ chown -R jira <home-directory>
    $ chmod -R u=rwx,go-rwx <home-directory>
  3. Tell JIRA where to find your <home-directory> when it starts up.  There are two ways to do this:
      

      Edit the jira-application.properties file...

    Edit <installation-directory>\atlassian-jira\WEB-INF\classes\jira-application.properties file in any text editor.

    After jira.home add the absolute path to your home directory (not a symlink), for example:

    jira.home=/var/jirasoftware-home
      Set an environment variable...

    You can set an environment variable named JIRA_HOME in your operating system with the absolute path to your <home-directory>.

    In Terminal, execute the following:

    export JIRA_HOME=/path/to/home-directory

    You can then specify the command above in a script used to start JIRA.

4. Check the ports

By default JIRA listens on port 8080. If you have another application running on your server that uses the same ports, you'll need to tell JIRA to use a different port. 
 

  Show me how to do this...

To change the ports:

  1. Edit <installation-directory>\conf\server.xml

  2. Change the Server port (8005) and the Connector port (8080) to free ports on your server.

    In the example below we've changed the Server port to 5005 and the Connector port to 5050.

    <Server port="5005" shutdown="SHUTDOWN">
    ...
       <Service name="Catalina">
          <Connector port="5050"
             maxThreads="150"
             minSpareThreads="25"
             connectionTimeout="20000"
             enableLookups="false"
             maxHttpHeaderSize="8192"
             protocol="HTTP/1.1"
             useBodyEncodingForURI="true"
             redirectPort="8443"
             acceptCount="100"
             disableUploadTimeout="true"/>

If you are running on a Unix server and bind the ports below 1024 (such as port 80 for example), you will need to start JIRA as root in order to successfully bind to the port.

5. Start JIRA

  1. Run <installation-directory>/bin/start-jira.sh to start the setup process.  
     

      Show me how to do this...

    We recommend running JIRA as your dedicated user.

    $ su -u <user>
    $ ./start-jira.sh

    If you're using Ubuntu the command is a little different:

    $ sudo su <user>
    $ ./start-jira.sh
  2. Go to http://localhost:8080/ to launch JIRA in your browser (change the port if you've updated the Connector port).

 

  Trouble starting JIRA?
  • Check your JAVA_HOME variable is set correctly.

Set up your JIRA application

6. Choose set up method

Choose  I'll set it up myself.

7. Connect to your database

  1. If you've not already done so, it's time to create your database. See the 'Before you begin' section of this page for details. 
  2. Choose My own database
  3. Choose your database type then enter the details for your database. 
      

      Show me how to do this...

    JIRA connects to your database using a standard JDBC database connection. Connection pooling is handled within JIRA, you can change this using JIRA configuration tool later.

    If you're using Oracle or MySQL there's an extra step: 

    • Download and and extract the appropriate Database JDBC Drivers.
    • Drop the JAR file into your <confluence-installation>/lib folder before continuing with the setup wizard.

    In the setup wizard:

    • Driver Class Name – the Java class name for your database driver. If you're not sure, check the documentation for your database.
    • Database URL – the JDBC URL for your database. If you're not sure, check the documentation for your database.
    • Username and Password – A valid username and password that JIRA can use to access your database.

8. Set application properties

  1. Give your JIRA site a name.
  2. Choose wether your site should is private or if anyone can sign up. You can change this later. 
  3. Enter your base URL - this is the address people will use to access your JIRA site. 

9. Enter your license

Follow the prompts to log in to  my.atlassian.com to retrieve your license, or enter a license key.

10. Create your administrator account

Enter details for the administrator account.  You can add more administrators after set up is complete.

11. Set up email notifications

Enter details of your mail server.  This will allow JIRA to send notifications when issues change.

12. Start using JIRA

That's it! Your JIRA site is accessible from your base URL or a URL like this: http://<computer_name_or_IP_address>:<port>

Here's a few things that will help you get your team up and running:

Troubleshooting

  Running into problems installing JIRA?
  • Check your JAVA_HOME is set correctly.

 Head to Installation Troubleshooting in our Knowledge Base for more help.  

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport