Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Jira 8 Administration Cookbook

You're reading from   Jira 8 Administration Cookbook Over 90 recipes to administer, customize, and extend Jira Core and Jira Service Desk

Arrow left icon
Product type Paperback
Published in Jun 2019
Publisher
ISBN-13 9781838558123
Length 280 pages
Edition 3rd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Patrick Li Patrick Li
Author Profile Icon Patrick Li
Patrick Li
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Jira Server Administration FREE CHAPTER 2. Customizing Jira for Your Projects 3. Jira Workflows 4. User Management 5. Jira Security 6. Emails and Notifications 7. Integrations with Jira 8. Jira Troubleshooting and Administration 9. Jira Service Desk 10. Other Books You May Enjoy

Installing Jira for production use

In this recipe, we will look at how to install and set up Jira in a production environment. This includes setting up a dedicated user to run Jira under and using an external database.

We will use the archive distribution since the steps are consistent across both the Windows and Linux platforms. This will also provide you with an insight into the exact steps required to get a Jira instance deployed and running; these would otherwise be hidden by an automated installer. This will provide you with the information needed for subsequent maintenance and further configurations.

Getting ready

The following things need to be checked before you begin with this recipe:

How to do it...

We first need to create an empty MySQL database for Jira:

  1. Open up a new Command Prompt on the MySQL server.
  1. Run the following command (you can also use another user instead of root as long as the user has permission to create new users and databases):
mysql -u root -p
  1. Enter the password for the user when prompted.
  2. Create a new database for Jira by running the following command:
create database jiradb character set utf8;
  1. Create a new user for Jira in the database and grant the user access to the jiradb database we just created using the following command:
grant all on jiradb.* to 'jirauser'@'localhost'
identified by  'jirapassword';
  1. In the previous five steps, we created a new database named jiradb and a new database user named jirauser. We will use these details later to connect Jira with MySQL. The next step is to install Jira.
  2. Create a dedicated user account to run Jira under. If you're using Linux, run the following command as root or with sudo:
useradd --create-home --comment "Dedicated
Jira account" -- shell /bin/bash jira
It is good practice to reduce security risks by locking down the user account so that it does not have login permissions.
  1. Create a new directory on the filesystem where Jira will be installed. This directory will be referred to as JIRA_INSTALL.
  2. Create another directory on the filesystem. This will be used for Jira to store its attachments, search indexes, application data, and other information. You can create this directory on a different drive with more hard disk capacity, such as a network drive (this could slow down performance). This directory will be referred to as JIRA_HOME.
It is good practice to keep the JIRA_INSTALL and JIRA_HOME directories separate; that is, the JIRA_HOME directory should not be a subdirectory inside JIRA_INSTALL. This will make future upgrading and maintenance easier.
  1. Unzip the Jira archive file in the JIRA_INSTALL directory.
  2. Change both the JIRA_INSTALL and JIRA_HOME directories' owner to the new Jira user.
  3. Open the JIRA_INSTALL/atlassian-jira/WEB-INF/classes/jira-application.properties file in a text editor.
  4. Locate the jira.home= line in this file.
  5. Copy and paste this in the full path to the JIRA_HOME directory and remove the # symbol if present. Make sure you use the forward slash (/). The following line shows how it looks on a Linux system:
jira.home=/opt/data/jira_home 
Windows uses the backward slash (\) in the file path. You should still use the forward slash (/) while specifying the jira.home directory.
  1. Copy the database driver JAR file (obtained from the Getting ready section) to the JIRA_INSTALL/lib directory.
  2. Start up Jira by running the start-jira.sh (for Linux) or start-jira.bat (for Windows) script from the JIRA_INSTALL/bin directory as the Jira user. You should see the output, Tomcat, started in your console; this means that Jira is up and running.
  1. Jira comes with a setup wizard that will help guide us through the final phase of the installation.
  2. Open up a browser and go to http://localhost:8080 (replace localhost with the actual server name). By default, Jira runs on port 8080. You can change this by changing the connector port value in the JIRA_INSTALL/conf/server.xml file.
  3. The first step in setup is to select how you want Jira to be set up. Select the I'll set it up myself option and click on the Next button:
  1. The second step is to set up database information. Select the My Own Database (recommended for production environments) option.
  2. Select a value for the Database Type option. For this recipe, select the MySQL 5.7+ option.
  1. Enter the details for our new jiradb database:
  1. Click on Test Connection to check whether Jira is able to connect to the database.
  2. Click on the Next button to proceed if the database connection test is successful and move to the next step of the wizard.
  3. Enter the Application Title value for this Jira instance.
  4. Select Public if you would like to let people sign up for accounts, or Private if you want only administrators to create accounts. Most organizations that use Jira to track internal projects will require Private mode.
  5. Set the Base URL option. The base URL is the one that users will use to access Jira. Usually, this should be a fully qualified domain name or the hostname—that is, not localhost or an IP address.
  1. Click on Next to go to the third step of the wizard, as shown in the following screenshot:
  1. Enter your Jira license key if you have one. If you do not have a license key, you can generate a temporary trial license by clicking the Generate a Jira trial license link and following the instructions.
  2. Click on Next to go to the fourth step in the wizard, as shown in the following screenshot:
  1. Enter the details for the initial administrator account. The user account will have access to all the configuration options in Jira, so make sure you do not lose its login credentials.
  2. Click on Next to go to the fifth and final step of the wizard, as shown in the following screenshot:
  1. Choose whether you want to set up an outgoing SMTP server Now or Later. If you do not have an SMTP server ready right now, you can always come back and configure it later.
  2. Click on Finish to complete the setup process.

You will see the following Welcome! screen:

This ends the general configuration part of the setup process. Your Jira system is up and running. Next, Jira will walk you through its onboarding process as a first-time user. You will be asked to select the default language to use, upload a user avatar, and create your very first project.

There's more...

By default, Jira is set to use a maximum of 768 MB of memory. For a production deployment, you might need to increase the amount of memory allocated to Jira. You can increase this by opening up the setenv.sh (on Linux) or setenv.bat (on Windows) files in the JIRA_INSTALL/bin directory and changing the value of the JVM_MAXIMUM_MEMORY parameter.

For example, if we want to set the maximum memory to 2 GB, we will change it to JVM_MAXIMUM_MEMORY="2048m". You will need to restart Jira after performing this change. For production uses, it is recommended that you allocate at least 4 GB (4096 MB) of memory to the Jira JVM. Make sure you have sufficient physical memory available on your server first.

If you are using LDAP for user management in your organization, refer to the Integrating with LDAP for authentication only recipe in Chapter 4, User Management.

Detailed steps for downloading the code bundle are mentioned in the Preface of this book. Please have a look. The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Jira-8-Administration-Cookbook-Third-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
You have been reading a chapter from
Jira 8 Administration Cookbook - Third Edition
Published in: Jun 2019
Publisher:
ISBN-13: 9781838558123
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime