Now that you have a good understanding of the overall architecture of JIRA, the basic system requirements, and the various installation options, we are ready to deploy our own JIRA instances.
In the following exercise, we will be installing and configuring a fresh JIRA instance that will be ready for a small production team. We will be performing our installation on a Windows platform with a MySQL database server. If you are planning to use a different platform or database, please refer to the vendor documentation on installing the required software for your platform.
In this exercise, you will:
We will continue to use this JIRA instance in our subsequent chapters and exercises as we build up our help desk implementation.
For our deployment, we will be using the following:
JIRA 5 requires Java Runtime Environment (JRE) version 6 update 18 or higher to run. If you already have a JDK installed, then you can skip this section. If you are not sure, then you can verify this by running the following command in a command prompt:
java -version
If you do not see a similar output, then chances are, you do not have Java installed. You will need to perform the following steps below to set up your Java environment.
To install JDK onto your system, simply perform the following steps:
JAVA_HOME
for the rest of the book.JAVA_HOME
with the value of where you installed Java:java -version
This will display the version of Java installed if everything is done correctly. In Windows, you have to start a new command prompt after you have added the environment variable to see the change.
The next step is to prepare an enterprise database for your JIRA installation. JIRA requires a fresh database. If during the installation process, JIRA detects that the target database already contains any data, it will not proceed. If you already have a database system installed, then you may skip this section.
To install MySQL, simply perform the following steps:
root
.Now that you have MySQL installed, you need to first create a user for JIRA to connect to MySQL with, and then create a fresh database for JIRA to store all its data:
mysql –u root -p
create database jiradb character set utf8;
jiradb
. You can name the database anything you like. As you will see later in this chapter, this name will be referenced when you connect JIRA to MySQL. We have also set the database to use UTF8 character encoding, as this is a requirement for JIRA. You need to ensure that the database uses the InnoDB storage engine to avoid data corruption.grant all on jiradb.* to 'jirauser'@'localhost' identified by 'jirauser';
jirauser
and assign the password jirauser
to him. You should change the username and password to something else.jiradb
that we just created, so that the user can perform database operations, such as create/drop tables, and insert/delete data. If you have named your database something other than jiradb
in step 3, then make sure you change the command so that it uses your database name.quit;
mysql –u jirauser –p
jirauser
.show databases;
jiradb
amongst the list of databases.jiradb
database by issuing the following commands:use jiradb; show tables;
jiradb
database, so all of your subsequent commands will be executed against the correct database.jiradb
database. Right now, the list should be empty, since tables have been created for JIRA now, but don't worry—as soon as we connect to JIRA, all the tables will automatically be created. With the Java environment and database prepared, you can now move on to install JIRA. Normally, there are only two steps—create and set up the JIRA_HOME
directory and run through the JIRA setup wizard.
The first step is to
download the latest stable release of JIRA, and install the necessary files to the JIRA_INSTALL
directory:
The Atlassian website will detect the operating system you are using and automatically suggest the installation package for you to download. If you intend to install JIRA on a different operating system than the one you are currently on, make sure you select the correct operating system package.
JIRA_INSTALL
directory.The next step is to create the JIRA_HOME
directory.
As we have discussed earlier in the chapter, this is where JIRA keeps its data such as configurations, indexes, and attachments. It is usually a good practice to create this directory in a separate location where JIRA is installed; in other words, where the JIRA_INSTALL
directory is:
JIRA_HOME
.JIRA_INSTALLatlassian-jiraWEB-INFclassesjira-application.properties
file in a text editor.#jira.home =
JIRA_HOME
directory and save the file:jira.home = C:/JIRA_HOME
JIRA 5 comes with an easy-to-use setup wizard that will walk you through the installation and configuration process in four simple steps. You will be able to configure database connections, default language, and much more.
Once you complete the preceding steps, you can start up JIRA by running the start-jira.bat
file from the JIRA_INSTALLin
directory. You will see a command prompt opening up and eventually an output similar to the following screenshot, ending with INFO: Server startup in x ms
:
If you see the output similar to the preceding screenshot, it means that your JIRA is up and running. Now, you can fire up your browser and point it to http://localhost:8080
to start the setup wizard.
In the first step of the wizard, you will be asked to select Server Language and whether JIRA should use an internal or External Database connection.
The server language will determine what language will be used when users access JIRA. You will see that as soon as you make a change from the drop-down list, JIRA will automatically change its onscreen text to the selected language.
The database connection setting will determine what database JIRA will use. If you select Internal, JIRA will use its bundled in-memory database, which is great for evaluation purposes. If you want to use a proper enterprise database, such as in our case, you should select the External option.
After you have selected the External option, the wizard will expand for you to provide the database connection details. Once you have filled in the details for your database, it is a good idea to first click on the Test Connection button to verify that JIRA is able to connect to the database. If everything is set up correctly, JIRA will report back with a success message, and you should be able to move onto the next step by clicking on Next. This may take a few minutes, as JIRA will now create all the necessary database objects. Once this is done, you will be taken to step 2 of the wizard.
In the second step, you will need to provide some basic details about this JIRA instance, and most importantly, the license key. If you have already obtained a license from Atlassian, you can cut and paste it into the License Key text box. If you do not have a license, you can generate an evaluation license by clicking on the Generate an Evaluation Key link at the bottom. An evaluation license allows you to use JIRA with its full features for three months. Once you have filled in the required properties, click on Next to move on to step 3 of the wizard:
Property |
Description |
---|---|
This is the title given to your JIRA. | |
Public will allow user signup. Private will disable user signup and only allow administrators to create users. | |
This is the URL used to access your JIRA. It will be used for links generated by JIRA. | |
This is a valid license key for your JIRA. It can be either a full license or an evaluation license. |
In the third step, you will be setting up the administrator account for JIRA. It is important that you keep the account details somewhere safe and do not lose the password. Since JIRA only stores the hashed value of the password instead of the actual password itself, you will not be able to retrieve it. However, there are methods for you to reset the password if you do lose it, as we will see in the later chapters. Fill in the administrator account details and click on Next to move on to the last step:
In the fourth and final step, you can set up your e-mail server details. JIRA will use the information configured here to send out notification e-mails. As you will see in Chapter 7, E-mails and Notifications, notification is a very powerful feature in JIRA and one of the primary methods for JIRA to communicate with the users. If you do not have your e-mail server information handy, do not worry, you can skip this step now by clicking on Disable Email Notifications. JIRA allows you to change your e-mail server settings anytime; we will cover the settings in Chapter 7, E-mails and Notifications, when we delve deeper into JIRA's notification system. After you have filled in the e-mail server details, click on Finish to complete the setup wizard:
Congratulations! You have successfully completed your JIRA setup, and you will be taken directly to your new JIRA instance, with a welcome message.
Your JIRA is now installed and running, however, at the moment, if you restart your server, you will need to manually start up JIRA. In a production environment, it is usually required for applications to start up automatically when the system reboots, in events such as hardware upgrades and system patching. In Windows, this means you need to install JIRA as a service.
To configure JIRA as a Windows service, simply follow the steps below:
JIRA_INSTALL/bin
directory.service.bat install JIRA
install
command. So in your example, the name of the service will be Atlassian JIRA:You can now start/stop/restart JIRA from the Windows services panel. You can also set JIRA to start automatically.