安装MYSQL5.6
因为目前jira(最新版本7.2.3)不支持mysql最新版5.7,所以只能安装mysql5.6版本:
如果已安装5.7,需要卸载并清除5.7:
sudo dpkg -l | grep mysql
sudo apt-get purge 上面命令显示的包
安装5.6版本:
sudo apt-get install software-properties-common
sudo add-apt-repository ‘deb http://archive.ubuntu.com/ubuntu trusty universe’
sudo apt-get update
sudo apt install mysql-server-5.6
查看安装结果:
sudo service mysql start
mysql -V
==>mysql Ver 14.14 Distrib 5.6.16, for debian-linux-gnu (x86_64) using EditLine wrapper
将mysql加入开机启动:
sudo update-rc.d mysql defaults
创建jira数据库
mysql -uroot -p’数据库root密码’
create database jira default character set utf8;
grant all on jira.* to jira@’%’ identified by ‘jirapassword’;
上面的密码自行设置好,记住。
下载安装jira 7.2.2
wget https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.2.2-x64.bin
chmod +x atlassian-jira-software-7.2.2-x64.bin
sudo ./atlassian-jira-software-7.2.2-x64.bin
This will install JIRA Software 7.2.2 on your computer.
OK [o, Enter], Cancel [c]
====>回车
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]
====> 1 回车
Install [i, Enter], Exit [e]
====> 回车
一路确认,直到安装完成,默认安装位置是/opt/atlassian/jira
安装后,jira自动启动了,下面是启动和关闭命令:
启动命令:sudo /opt/atlassian/jira/bin/startup.sh
关闭命令:sudo /opt/atlassian/jira/bin/shutdown.sh
设置jira
可以参考官方文档:https://confluence.atlassian.com/adminjiraserver072/administering-jira-applications-7-2-828787537.html
下载数据库连接插件mysql-connector-java-5.1.39-bin.jar,將mysql-connector-java-5.1.39-bin.jar放到jira插件目录:
cp mysql-connector-java-5.1.39-bin.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
然后重启一下jira:
sudo /opt/atlassian/jira/bin/shutdown.sh
sudo /opt/atlassian/jira/bin/startup.sh
打开浏览器,输入http://localhost:8080,进入设置页面,选择I’ll set if myself,然后下一步,设置数据库为mysql,输入用户名密码,下一步,输入Listence,去申请一个账号,可以有一个月的试用期,接着设置语言,然后就可以创建项目并使用了。
设置Jira开机启动
修改/etc/rc0.d/K01jira里面的start-jira.sh为startup.sh,stop-jira.sh为shutdown.sh