You are on page 1of 6

Installing JIRA

In the following exercise, we will be installing and configuring a fresh JIRA instance that will be ready for production. We will be basing our installation on a Windows platform. In this exercise, we will: 1. Install a fresh instance of JIRA. 2. Configure JIRA to an enterprise relational database. 3. Configure JIRA as a service so it will start automatically with the system. We will continue to use this JIRA instance in our subsequent chapters and exercis es as we build up our help desk implementation. For our implementation, we will be using: ‡ JIRA WAR-EAR distribution 4.3.4 ‡ MySQL 5 ‡ Java Development Kit 6 ‡ Microsoft Windows XP

Installing Java
JIRA requires Java Development Kit (JDK) version 6 update 10 or higher to run. It is important to note that some systems come with Java Runtime Environment (JRE), which is different and insufficient to run JIRA. If you already have a JDK installed, you can skip this section. To install JDK onto your system, simply carry out the following steps: 1. Download the latest JDK from -jsp136632.html. 2. Double-click on the downloaded installation file to start the installation wizard. 3. Select where you would like to install Java, or you can simply accept the default values. The location where you install JDK will be referred to as JAVA_HOME for the rest of the book. 4. Create a new environmental variable named JAVA_HOME with the value of where you installed Java. 5. Test the installation by typing the following command in a new command prompt:
java version

This will display the version of Java installed.

Double-click on the downloaded installation file to start the installation wizard. Download MySQL from: http://dev. 9.Installing MySQL The next step is to prepare an enterprise database for our JIRA installation. Click on Execute on the next screen and MySQL will start applying the configuration options. 6. select Standard Configuration. 4. Configure the MySQL root user password. This will bring up the MySQL configuration wizard. simply follow the steps below: 1. Check both the Install As Windows Service and Include Bin Directory in Windows PATH options on the next screen. The username will be root. From the MySQL configuration wizard. 7. Select the Typical setup option on the next you can choose to customize your installation. 8. 3. Once the installation is completed. . Otherwise. 2. make sure you check the Configure MySQL Server now option and click on Finish. To install MySQL. just accept the default values for all subsequent screens. If you are an experienced database administrator. 8. Click on Next on the welcome screen. This will make MySQL startup when the system starts up and also allow you to run the MySQL command line tools directly. 5.

This will list all the databases that are currently accessible by the logged in user. 13. We have also set the database to use UTF8 character encoding.* to 'jirauser'@'localhost' identified by 'jirauser'. 9. Issue the command below to connect to MySQL: mysql ±u root -p 3. Here we are creating a database called jiradb. This allows us to control the fact that only authorized users (specified in the preceding command) are able to access the JIRA database to ensure data security and integrity. Start a new interactive session with our newly created user: mysql ±u jirauser ±p 12. You should see jiradb amongst the list of databases. so all of our subsequent commands will be executed against the correct database. Here we are doing several things. 1. as this is a requirement for JIRA. The first command connects us to the jiradb database. 11. You will be prompted for jirauser's password. 4. we have created a user called jirauser and assigned the password jirauser to the user. 10. exit the current interactive session by issuing the following command: quit. make sure you change the command so it uses your database name. When prompted for password. This will bring up the intera ctive shell for MySQL. which we have set up in our previous command as jirauser. 2. As we will see later in this chapter. You can name the database to anything you like. 14. We have also granted all privileges to the user for the database jiradb we have just created so the user can perform database operations such as create/ drop tables. 5. it is time to create a database for JIRA. Issue the command below to create a database: create database jiradb character set utf8. Examine the jiradb database by issuing the following commands: use jiradb. and insert/delete data.Configuring MySQL Now that we have MySQL installed. To verify our setup. 8. this name will be referenced when we connect JIRA to MySQL. Start a new command prompt. You can. 15. Issue the following command: grant all on jiradb. . change the username and password to something else. First. show tables. 6. If you have named your database to something other than jiradb in step 3. You need to ensure that the database is using the InnoDB storage engine to avoid data corruption. 7. 16. Issue the command: show databases. enter the password you chose during configuration.

with Windows. mysql. Unzip the downloaded file to your intended JIRA_INSTALL directory.. Locate the following line: #jira. ensure the <transaction -factory>.transaction. hsql. Locate the <datasource> tag near the bottom. we can now move on to install JIRA. make sure you select the correct operating system package.home = C:/JIRA_HOME 8. and change the field-type-name attribute value: Possible values include cloudscape.jspa The Atlassian website will detect the operating system you are using and automatically suggest the installation package for you to download.xml .. For the purpose of our exercise. Configuring JIRA application properties jira/JIRADownloadCenter. we will be using the selfextracting option as this will provide us with an insight o f the steps usually hidden by installation programs To access the ZIP option. postgres. mckoidb.atlassian.ofbiz. oracle.entity. sapdb. Open JIRA_INSTALL\atlassian-jira\WEB-INF\classes\jira-application. db2.JNDIFactory"> <user-transaction -jndi jndi -server-name="default" jndiname="java:comp/env/UserTr ansaction"/> <transaction -manager-jndi jndi-server-name="default" jndiname="java:comp/env/UserTransaction"/> </transaction -factory> . Fill in the full path to your JIRA_HOME directory and save the file.xml .properties file in a text editor. Download Atlassian JIRA from http://www. The database is specified in $JIRA_INSTALL/edit-webapp/WEB-INF/classes/entityengine. Make sure that you remove the # at the front and use forward slashes (/) instead of backward slashes (\). 3. 4. mssql. Database Connection JIRA needs to be told what type of database you'll be using. and Sybase Note : If not using HSQLDB remove: schema-name="PUBLIC" Also in entityengine. As mentioned earlier. firebird. jira. If you intend to install JIRA on a different operating system than the one you are currently on.</transaction factory> tag contains: <transaction -factory class="org.Installing JIRA With the JDK and database prepared. there is a Windows installer package and self extracting ZIP package. click on the Show all link to the righthand side. 6. postgres72.home = 7.core. 2.

and point your browser to http://localhost:8080/jira You should now see the Setup Wizard.UserTransaction" factory="org.5/jira.DataSource" username="jiraus er" password="mypassword" driverClassName="com. This will produce the deployable WAR file in the$JIRA_INSTALL/dist-tomcat directory.jdbc. download http://www.transaction. ensure you have updated the field-type-name. If using a different database than hsql. To start using JIRA.(sh|bat) scripts. first start (or restart) the Tomcat server with Tomcat's bin/startup.3-tomcat-5x.jotm. To do this: 1./build.timeout="60"/> <Manager pathname=""/> </Context> 3.objectweb.xml from the built JIRA distribution to your Tomcat's conf/Catalina/localhost/ directory. Be sure to remove existing versions of these JAR before copying the new ones.war"> <Resource name="jdbc/JiraDS" auth="Container" type=" and copy the contained jars to Tomcat's common/lib/ directory. Customise the copied (Unix) on the command line in the $JIRA_INSTALL directory.mysql.Driver" url="jdbc:mysql://localhost/jiradb?useUnicode=true&amp. To fix this.characterEncoding =UTF8" maxActive="20" validationQuery="select 1"/> <Resource name="UserTransaction" auth="Contai ner" type="javax. 1. which will take you through the brief setup procedure. Configure Tomcat A JIRA 'context' now needs to be set up in Tomcat. copy the JDBC driver jar to common/lib / 2.xml as follows: <Context path="/jira" docBase="path/to/atlassian -jira-3.sql. Start Tomcat JIRA should now be ready to run in . Copy dist-tomcat/tomcat-5.atlassian.13.Build JIRA Now build JIRA by typing build (Windows) or .UserTransactionFactory" jotm. Update Tomcat Libraries Tomcat does not come with some libraries required to run JIRA. 2.

decodeparameters=true -Xms128m -Xmx512m -XX:MaxPermSize=256m .mime.BodyContentImpl. Create a file setenv.lang.runtime.apache.LIMIT_BUFFER=true Dmail.bat in tomcat/bin folder if not exi st and copy the below line.Troubleshooting Problem . set CATALINA_OPTS=%CATALINA_OPTS% Dorg.OutOfMemoryError: Java heap spac e Soln.jasper. java.