环境搭建

#下载jdk-8u131-linux-x64.rpm
#http://www.jb51.net/softs/551517.html
#http://haixi.hbhdjy.com:8080/201704/tools/jdk-linux-x64.rpm

#如果直接rpm安装如下会出现错误
root@0535coder:~# rpm -ivh jdk-linux-x64.rpm
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: Failed dependencies:
/bin/basename is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/cat is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/cp is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/gawk is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/grep is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/ln is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/ls is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/mkdir is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/mv is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/pwd is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/rm is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/sed is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/sort is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/touch is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/cut is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/dirname is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/expr is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/find is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/tail is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/tr is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/usr/bin/wc is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64
/bin/sh is needed by jdk1.8.0_131-2000:1.8.0_131-fcs.x86_64

#需要安装alien
apt-get install alien -y
#将rpm转换位deb,完成后会生成一个 jdk1.8.0-131_1.8.0131-1_amd64.deb
alien jdk-linux-x64.rpm
#安装
dpkg -i jdk1.8.0-131_1.8.0131-1_amd64.deb

#安装成功验证
root@0535coder:~# java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-3-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

#mysql相关操作
root@0535coder:~# mysql -V
mysql Ver 15.1 Distrib 10.1.21-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

#创建jira数据库和jira用户
mysql -uroot -p'root' -e "create database jira;grant all on jira.* to 'jira'@'%' identified by 'jirapasswd';"

#测试jira连接mysql
mysql -ujira -pjirapasswd #连接成功

#安装jira
wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.4.1-x64.bin
#使用默认安装,一直回车,安装完成会启动jira
chmod a+x atlassian-jira-software-7.4.1-x64.bin
./atlassian-jira-software-7.4.1-x64.bin

/opt/atlassian/jira/bin/stop-jira.sh # 停止jira
/opt/atlassian/jira/bin/start-jira.sh # 启动jira

#破解流程,尝试过会导致jira打不开
root@0535coder:~/桌面# mv atlassian-extras-3.2.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
root@0535coder:~/桌面# mv atlassian-extras-decoder-v2-3.2.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
root@0535coder:~/桌面# mv mysql-connector-java-5.1.42-bin.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/

其中atlassian-extras-2.jar是用来替换原来的atlassian-extras-2.jar文件,用作破解jira系统的。
而mysql-connector-java-5.1.42-bin.jar是用来连接mysql数据库的驱动软件包
重新启动jira,访问ip:8080
langguage可以选择语言,默认支持中文,选择自己安装,然后继续
配置域名访问http://jira.aniu.so/jira

安装参考网址:
https://yq.aliyun.com/articles/141089
http://www.cnblogs.com/ilanni/p/6200875.html