Install Jira on Linux (A Work In Progress Guide)

***** OFFICIAL JIRA INSTALL GUIDE ******

https://confluence.atlassian.com/adminjiraserver073/installing-jira-applications-861253011.html

***** PRE INSTALL ******

  1. Determine your Linux environment.
    Find the server version on Linux (from http://www.digitalfaq.com/forum/web-tech/3809-ssh-command-linux.html)• Find Linux version:

    $ cat /proc/version

    output example:

    Linux version 3.13.0-96-generic (buildd@lcy01-09) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016

    • find 32 or 64 bit.

    $ uname -a

    output example:

    Linux myserverinstance 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  2. Download Jira based on your Linux needs.
    https://www.atlassian.com/software/jira/download
  3. Find if you have a pre-existing Jira install.
    In our case we had an old outdated version.
    (How to search using SSH via siteground.)
    • Note: you may need to login using the root user.
    • Make sure you’re at root directory of the server .

    find . -name "*jira*"

    • In my case, I found a folder containing the old jira data and renamed it.
    • I also deleted previous jira usernames and groups.
    • And I switched to that folder.

  4. If there are old files, rename the folder ( common ssh commands at Media Temple )
    $ mv atlassian atlassian_old
  5. Upload to your server
    $ scp /local-computer-directory/atlassian-jira-software-7.3.6-x64.bin root@23.253.235.50:/var/
  6. Move it to the designed directory (if necessary)
    $ mv /var/www/chosendirectory/atlassian-jira-software-7.3.6-x64.bin /var/atlassian-jira-software-7.3.6-x64.bin

    Also, check the file moved correctly and directory contents by using:

    $ ls -l

***** INSTALL ******

1. Give the file the correct permissions

chmod a+x atlassian-jira-software-7.3.6-x64.bin

2. Run the installer

$ sudo ./atlassian-jira-software-X.X.X-x64.bin

• It will start to unpack the JRE and start the installer.
Unpacking JRE … Starting Installer …
• It will ask you if you want to install Jira on your computer
This will install JIRA Software 7.3.6 on your computer. OK [o, Enter], Cancel [c]
• Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing JIRA installation [3]
(I chose the express option.)
• Verify the default settings details on where JIRA Software will be installed and the settings that will be used.Installation Directory: /opt/atlassian/jiraHome Directory: /var/atlassian/application-data/jiraHTTP Port: 8080RMI Port: 8005Install as service: Yes y
Details on where JIRA Software will be installed and the settings that will be used.Installation Directory: /opt/atlassian/jiraHome Directory: /var/atlassian/application-data/jiraHTTP Port: 8080RMI Port: 8005Install as service: Yes Install [i, Enter], Exit [e]
• start Jira (y/n)?
• It says it’s available at JIRA Software 7.3.6 can be accessed at http://localhost:8080

***** SETUP ******

***** DATABASE SETUP *****
https://confluence.atlassian.com/adminjiraserver073/connecting-jira-applications-to-mysql-861253043.html
1. Double check that the user doesn’t exist.

SELECT User, Host, Password FROM mysql.user;

2. Create a new userhttps://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

Create Database UserCREATE USER 'jiradbuser'@'localhost' IDENTIFIED BY 'YOURPASSWORDHERE';
CREATE DATABASE jiradb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON * . * TO 'jiradbuser'@'localhost';
SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jiradbuser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jiradbuser'@'55.555.555.55' IDENTIFIED BY 'YOURPASSWORD';
flush privileges;

Edit the my.cnf file (my.ini on Windows operating systems) in your MySQL server. (Refer to MySQL Option Files for detailed instructions on editing my.cnf and my.ini.)Locate the [mysqld]section in the file, and add or modify the following parameters:

find . -name myFile.txt

https://confluence.atlassian.com/adminjiraserver073/connecting-jira-applications-to-mysql-861253043.html

Upload file

$ scp /local-computer-directory/mysql-connector-java-5.1.42-bin.jar root@55.555.555.55:/opt/atlassian/jira/lib

**** Hmm. Not working. **** 

• Check server listening ports# sudo netstat -plnt
• Check if Jira is runninghttps://confluence.atlassian.com/jirakb/how-to-check-the-jira-application-is-running-794499415.html
• Check from the server
# ps -ef | grep JIRA
/opt/atlassian/jira/jre//bin/java – Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties – Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms384m -Xmx768m – Djava.awt.headless=true -Datlassian.standalone=JIRA – Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true – Dmail.mime.decodeparameters=true – Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -XX:+PrintGCDateStamps – XX:-OmitStackTraceInFastThrow -Datlassian.plugins.startup.options= – Djdk.tls.ephemeralDHKeySize=2048 – Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar – Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira – Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap startroot     13745 26042  0 13:19 pts/0    00:00:00 grep –color=auto JIRA

Where should I upload it on the server?
• find if jira is on your server:

$ find . -name "*jira*"What about web access

Check if Jira is running
https://confluence.atlassian.com/jirakb/how-to-check-the-jira-application-is-running-794499415.html

Start / Stop Jira
https://confluence.atlassian.com/kb/changing-port-that-your-atlassian-application-listens-on-834000041.html

sudo ./opt/atlassian/jira/bin/start-jira.sh
sudo ./opt/atlassian/jira/bin/stop-jira.sh
sudo ./opt/atlassian/jira/bin/shutdown.sh

Download Jira Logs to your local computer

scp root@55.555.555.55:/opt/atlassian/jira/logs/catalina.out /local-computer-directory/downloadscp root@55.555.555.55:/opt/atlassian/jira/conf/server.xml /local-computer-directory
ps -ef | grep JIRA

Display All users

getent passwd

Display All users with a username

getent passwd | grep username

All groups:

$ getent group

All groups with a specific user:

$ getent group | grep username

Delete User

userdel newuser

Remove User Directory

rm -rf /home/newuser

Leave a Reply

Your email address will not be published. Required fields are marked *