Sunday, December 23, 2018

JIRA on FreeBSD

1. Download Jira .tar.gz version from Atlassian’s website.

2. sftp the file to your server.
# sftp -i "aws-domo.pem" ec2-user@exxx.amazonaws.com
# sftp> put atlassian-jira-software-7.13.0-x64.bin
# sftp> ! (to exit from the sftp)
Bingoo!

3. Install tomcat-native
# pkg install openjdk8 tomcat-native
OR
# pkg install openjdk
# java -version

4. create a user for JIRA
# adduser
# adduser

Username: jira
Full name: JIRA psuedo-user
Uid (Leave empty for default): 71
Login group [jira]: 
Login group is jira. Invite jira into other groups? []: 
Login class [default]: 
Shell (sh csh tcsh zsh rzsh git-shell nologin) [sh]: 
Home directory [/home/jira]: /usr/local/jira
Home directory permissions (Leave empty for default): 
Use password-based authentication? [yes]: no
Lock out the account after creation? [no]: no
Username   : jira
Password   : <disabled>
Full Name  : JIRA psuedo-user
Uid        : 71
Class      : 
Groups     : jira 
Home       : /usr/local/jira
Home Mode  : 
Shell      : /bin/sh
Locked     : no
OK? (yes/no): yes
adduser: INFO: Successfully added (jira) to the user database.

5. Install MySQL server (jira need this)
GRANT ALL PRIVILEGES ON *.* TO 'jira'@'localhost' IDENTIFIED BY 's@ydrfD34FEds';
exit
# mysql -u jira -p
CREATE DATABASE jira;

6. JIRA Setup
Extract the .tar.gz we downloaded from Atlassian
root@freebsd:/usr/home/ec2-user # tar xzvf atlassian-jira-software-7.13.0.tar.gz
# mv atlassian-jira-software-7.13.0-standalone /usr/local/share/jira
# mkdir /usr/local/jira

# cd /usr/local/share/jira 
# chown jira:jira logs temp work

#!/bin/sh

#
# PROVIDE: jira
# REQUIRE: DAEMON 
# KEYWORD: shutdown

. /etc/rc.subr

load_rc_config jira

JAVA_HOME="/usr/local/openjdk8"
JRE_HOME="/usr/local/openjdk8/jre"
JIRA_INSTALL="/usr/local/share/jira"
JIRA_HOME="/usr/local/jira"

jira_enable=${jira_enable:-"NO"}
jira_user=${jira_user:-"jira"}

name=jira
rcvar=jira_enable

procname="java"
pidfile="/var/run/jira.pid"

start_cmd="jira_start"
stop_cmd="jira_stop"

jira_start()
{
 su -l ${jira_user} -c "export JAVA_HOME=${JAVA_HOME};export JRE_HOME=${JRE_HOME};export JIRA_HOME=${JIRA_HOME};${JIRA_INSTALL}/bin/catalina.sh start || err 1 'Error triggering JIRA startup'"
}

jira_stop()
{
 su -l ${jira_user} -c "export JAVA_HOME=${JAVA_HOME};export JRE_HOME=${JRE_HOME};export JIRA_HOME=${JIRA_HOME};${JIRA_INSTALL}/bin/catalina.sh stop 10 -force || err 1 'Error triggering JIRA shutdown'"
}

run_rc_command "$1"
Change your directories as required.
Save that to /usr/local/etc/rc.d/jira and we’ll need to make it executable with `

# chmod u-w,ugo+x /usr/local/etc/rc.d/jira
# sysrc jira_enable="YES"
# /usr/local/etc/rc.d/jira start or service jira start

Display IPv4 related open ports
# sockstat -4 -l
Make a port forward in the router, and point your browser at http://xxx:8080

Congratulation!

5 comments:

  1. followed the steps, starting jira got some problem, it tried to run export, but command not found

    tomcat@jira:/usr/local % /usr/local/etc/rc.d/jira start
    export: Command not found.
    export: Command not found.
    export: Command not found.

    `sMMMMMMMMMMMMMM+
    MMMMMMMMMMMMMM
    :sdMMMMMMMMMMM
    MMMMMM
    `sMMMMMMMMMMMMMM+ MMMMMM
    MMMMMMMMMMMMMM +MMMMM
    :sMMMMMMMMMMM MMMMM
    MMMMMM `UOJ
    `sMMMMMMMMMMMMM+ MMMMMM
    MMMMMMMMMMMMMM +MMMMM
    :sdMMMMMMMMMM MMMMM
    MMMMMM `UOJ
    MMMMMM
    +MMMMM
    MMMMM
    `UOJ

    Atlassian Jira
    Version : 8.8.1


    If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-088/Troubleshooting+installation


    Server startup logs are located in /usr/local/tomcat/logs/catalina.out
    Using CATALINA_BASE: /usr/local/tomcat
    Using CATALINA_HOME: /usr/local/tomcat
    Using CATALINA_TMPDIR: /usr/local/tomcat/temp
    Using JRE_HOME: /usr/local
    Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
    Using CATALINA_PID: /usr/local/tomcat/work/catalina.pid
    Tomcat started.

    ReplyDelete
    Replies
    1. Easy Busy: Jira On Bsd >>>>> Download Now

      >>>>> Download Full

      Easy Busy: Jira On Bsd >>>>> Download LINK

      >>>>> Download Now

      Easy Busy: Jira On Bsd >>>>> Download Full

      >>>>> Download LINK Fc

      Delete
  2. at this time, trying to access jira setup via :8080, got error saying

    Setup: We can't locate your JIRA home directory.

    ReplyDelete
  3. this is fixed, changed jira user profile to use sh, I had csh which doesn't support export

    all are working now.

    ReplyDelete
  4. Easy Busy: Jira On Bsd >>>>> Download Now

    >>>>> Download Full

    Easy Busy: Jira On Bsd >>>>> Download LINK

    >>>>> Download Now

    Easy Busy: Jira On Bsd >>>>> Download Full

    >>>>> Download LINK 51

    ReplyDelete