Step by step install of JIRA on Orion,IBM JAVA,MYSQL on Red Hat 4x

Step by step install of JIRA on Orion/IBM JAVA/MYSQL on Red Hat 4x

This document will help you setup an Orion, IBM java, MySQL, and Jira server with the followig packages on a Red Hat AS 4.2 x86 server running under the orion user account.

Required Files

The following files are required:

  • atlassian-jira-enterprise-3.4.3.tar.gz
  • mysql-connector-java-3.1.12.tar.gz
  • orion2.0.5.zip
  • IBMJava2-142-ia32-SDK-1.4.2-3.0.i386.rpm

Steps

Create user and group

groupadd orion
useradd -g orion orion

Setup the environment

vi /etc/profile

Set a few environmental variables for Orion, and IBM Java

export ORION_DIR=/opt/orion
export ORION_LIBDIR=/usr/share/orion
export JAVA_HOME=/opt/IBMJava2-142
export JAVAC=$JAVA_HOME/bin/javac
export JDK_HOME=$JAVA_HOME
export CLASSPATH=$ORION_LIBDIR/activation.jar:$ORION_LIBDIR/admin.jar:$ORION_LIBDIR/applicationlauncher.jar:$ORION_LIBDIR/assemblerlauncher.jar:$ORION_LIBDIR/autoupdate.jar:$ORION_LIBDIR/clientassembler.jar:$ORION_LIBDIR/crimson.jar:$ORION_LIBDIR/earassembler.jar:$ORION_LIBDIR/ejb.jar:$ORION_LIBDIR/ejbassembler.jar:$ORION_LIBDIR/ejbmaker.jar:$ORION_LIBDIR/jaas.jar:$ORION_LIBDIR/jaxp.jar:$ORION_LIBDIR/jcert.jar:$ORION_LIBDIR/jdbc.jar:$ORION_LIBDIR/jndi.jar:$ORION_LIBDIR/jnet.jar:$ORION_LIBDIR/jsse.jar:$ORION_LIBDIR/jta.jar:$ORION_LIBDIR/loadbalancer.jar:$ORION_LIBDIR/mail.jar:$ORION_LIBDIR/orion.jar:$ORION_LIBDIR/orionconsole.jar:$ORION_LIBDIR/parser.jar:$ORION_LIBDIR/taglibassembler.jar:$ORION_LIBDIR/webappassembler.jar:$ORION_LIBDIR/xalan.jar:$ORION_LIBDIR/xerces.jar:$JAVA_HOME/lib/tools.jar

IBM Java

rpm -ivh IBMJava2-142-ia32-SDK-1.4.2-3.0.i386.rpm

Remove rh as 4.2 java

rpm -qa | grep -i java

(output)
java-1.4.2-gcj-compat-1.4.2.0-27jpp
IBMJava2-142-ia32-SDK-1.4.2-3.0
gcc-java-3.4.4-2

rpm -e java-1.4.2-gcj-compat-1.4.2.0-27jpp gcc-java-3.4.4-2

Install Orion

cp orion2.0.5.zip /opt/

unzip orion2.0.5.zip

mkdir /opt/orion/sbin
chown orion.orion /opt/orion/sbin

Make startup script.

vi /opt/orion/sbin/start_orion.sh

#!/bin/bash

#Start Orion Server

# Orion's User
ORION_USER=orion

# STDERR Log Location
ORION_ERR=/var/log/orion/stderr.log

# STDOUT Log Location
ORION_OUT=/var/log/orion/stdout.log

cd $ORION_DIR
$JAVA_HOME/bin/java -jar /opt/orion/orion.jar -config /opt/orion/config/server.xml -userThreads -quiet -out $ORION_OUT -err $ORION_ERR &

Make shutdown script.

vi /opt/orion/sbin/stop_orion.sh

#!/bin/bash

ps auxww | grep orion.jar | awk '{print $2}' | xargs kill &> /dev/null

Make logs

mkdir /var/log/orion
chown orion.orion /var/log/orion

vi /var/log/orion/stderr.log

#STDERR LOG


vi /var/log/orion/stdout.log

#STDOUT LOG

Set orion to run on port 8081

vi /opt/orion/config/default-web-site.xml

Change line

<web-site host="[ALL]" port="80" display-name="Default Orion WebSite">

to:

<web-site host="[ALL]" port="8081" display-name="Default Orion WebSite">

Copy over the tools.jar to the /opt orion directory

cp /opt/IBMJava2-142/lib/tools.jar /opt/orion/

Set permissions

chown orion.orion /var/log/orion/stdout.log
chown orion.orion /var/log/orion/stderr.log
chmod 777 /var/log/orion/stdout.log
chmod 777 /var/log/orion/stderr.log

chown orion.orion /opt/orion -R

chmod 777 /opt/orion/sbin/*.sh

Actual setup of Orion server (admin password)

logout and login for environment variable to be set so you can run the installer.

su - orion
cd /opt/orion

$JAVA_HOME/bin/java -jar /opt/orion/orion.jar -config /opt/orion/config/server.xml -install
Enter an admin password to use: orion
Confirm admin password: orion
Installation done

exit (to get back to root).

Startup script for reboot

vi /etc/rc.local

#Start Orion Server
su - orion -c /opt/orion/sbin/start_orion.sh

CREATE JIRA DATABASE IN MYSQL (jiradb)

mysql -u root -p
enter the "password"
use mysql;
INSERT INTO db 
(host,db,user,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) 
values ('localhost','jiradb','root','Y','Y','Y','Y','Y','Y');
#now type

quit

mysqladmin -u root -p create jiradb



#GRANT JIRAUSER access to the JIRADB DATABASE (add localhost and the servers FNQD to the mysql grant listed below)

mysql -u root -p
enter the "password"
use mysql;

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on
  jiradb.* TO 'jirauser'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye



#NOW TEST JIRAUSER ACCESS TO JIRADB DATABASE

mysql --user=jirauser --password=password --database=jiradb


#YOU SHOULD SEE


Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> 


#TO EXIT MYSQL TYPE

mysql> exit
Bye

INSTALL MYSQL CONNECTOR for ORION:

cp mysql-connector-java-3.1.12.tar.gz /opt
cd /opt
tar -zxvf mysql-connector-java-3.1.12.tar.gz
cp /opt/mysql-connector-java-3.1.12/mysql-connector-java-3.1.12-bin.jar /opt/orion/lib/

JIRA INSTALL

cp atlassian-jira-enterprise-3.4.3.tar.gz /opt/
cd /opt
tar -zxvf atlassian-jira-enterprise-3.4.3.tar.gz
mv atlassian-jira-enterprise-3.4.3 jira
cd jira

Edit entityengine.xml

vi /opt/jira/edit-webapp/WEB-INF/classes/entityengine.xml

    <datasource name="defaultDS" field-type-name="mysql"
        helper-class="org.ofbiz.core.entity.GenericHelperDAO"
      check-on-start="true"
      use-foreign-keys="false"
      use-foreign-key-indices="false"
      check-fks-on-start="false"
      check-fk-indices-on-start="false"
      add-missing-on-start="true"
      check-indices-on-start="true">
        <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/JiraDS"/>

CONFIGURE ORION TO USE JIRA

cd /opt/orion/config



#application.xml 

vi application.xml

<web-module id="jira" path="../../../opt/jira/dist-generic" />



#data-sources.xml 

vi data-sources.xml


        <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="Jira Database"
                location="jdbc/JiraCoreDS"
                xa-location="jdbc/xa/JiraXADS"
                ejb-location="jdbc/JiraDS"
                connection-driver="com.mysql.jdbc.Driver"
                username="jirauser"
                password="password"
                url="jdbc:mysql://localhost/jiradb?autoReconnect=true"
                inactivity-timeout="30"
	/>

Edit default-web-site.xml

vi default-web-site.xml

<default-web-app application="default" name="jira" root="/jira"/>

Now Create a INDEX directory for JIRA to use

mkdir /opt/jira/index

Now build jira

/opt/jira/build.sh

Orion can't read WAR files so you need to uncompress it.

cd /opt/jira/dist-generic

unzip atlassian-jira-3.4.3.war

Now Change the permmissions on the jira directory and sub folders/files so you orion is the owner

chown orion.orion /opt/jira -R

Then run the startup script or reboot for it to run automatically!

su - orion -c /opt/orion/sbin/start_orion.sh

CONGRATUALTIONS YOU NOW HAVE A RUNNING JIRA SERVER!

These instructions were provided by:
Robert Mitchell
Merkle Inc.
ramitchell@merklenet.com

Labels

 
(None)