Thursday 20 March 2014

Install Jira on CentOS 6.5 and/or Fedora 19

This should help to install JIRA with some useful customisation.
The installation documentation will work for either CentOS 6.5 or Fedora 19 with MySQL/MariaDB 5..5.35+.

Some of the steps are duplicated if Confluence is already installed on the server.

  1. download the latest version of JIRA from Atlassian
     
  2. install and configure an up-to-date version of Java.
    i.e. java -version   --->>  java version "1.7.0_51"
  3. download the Java Connector version > 5.1.28 from Oracle (see git install)
     
  4. GOTCHA !!!   remove all previous JIRA accounts, groups and installations unless you want to upgrade !!!
     
  5. copy both to the destination machine
    change permissions to 755 on JIRA
     
  6. install the Java Connector into the /usr/share/java/
    and replace old links of mysql-connector-java.jar (see git install)
     
  7. prepare the database (local or different db server)
    CREATE USER 'jira'@'localhost(remote host)' IDENTIFIED BY 'supersecret';CREATE DATABASE IF NOT EXISTS `jira_db` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
    GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `jira_db`.* TO 'jira'@'localhost (or other hostname)';
     
  8. prepare a data directory/file-system i.e. on a storage device for easier back-up.
    i.e. /data/jira
     
  9. prepare a directory for central logging /var/log/jira
     
  10. decide which tomcat ports you want to use; this is not needed when you run JIRA on its own server.
     
  11. next still as superuser, execute the JIRA binary
     
  12. GOTCHA !!!   before starting JIRA or logging onto the gui for the remaining configuration, you have to create a link (or copy) the java-connector
    cd /opt/atlassian/jira/lib  (the default installation)
    ln -s /usr/share/java/mysql-connector-java-5.1.28/mysql-connector-java-5.1.28-bin.jar mysql-connector-java.jar
    Without this copy or link you will not see the database.
     
  13. Questions / Prompts during install:
    1. This will install JIRA 6.2 on your computer   --->  press Enter
    2. Choose the appropriate installation or upgrade option   --->    2 + Enter
    3. Where should JIRA 6.2 be installed?   --->  press Enter
    4. Default location for JIRA data (see item 6.)   --->  /data/jira  + Enter
    5. Configure which ports JIRA will use (see item 8)   --->  select option and Enter
    6. Install JIRA as Service? (silly question)   --->  press Enter
    7. Finishing installation ...
       
  14. Now is the time for item 10. !!!
  15. Enter the database connection details into the file: /data/jira/dbconfig.xml
  16. Also do Item 7.now.
    1. mv /data/jira/log/atlassian-jira.log  /var/log/jira/
    2. rmdir /data/jira/log
    3. ln -s /var/log/jira /data/jira/log
    4. cd /opt/atlassian/jira
    5. mv logs/* /var/log/jira/
    6. rmdir logs
    7. ln -s /var/log/jira logs
       
  17. Restart JIRA and log-in to the gui to configure the admin user and the database.
     
  18. lastly configure Apache or nginx as the gateway.

No comments: