Jira Data Center(非集群)升级操作

一、升级准备

  1. Jira 管理界面执行升级检查
  2. 下载升级包,使用原操作方式相同的方式安装。我这里原来的版本是通过./atlassian-jira-software-9.11.2-x64.bin安装的,接下来下载atlassian-jira-software-9.11.3-x64.bin的安装文件
  3. 停止 Jira,bin/stop-jira.sh
  4. 使用mysqldump -u root -p --all-databases | gzip > mysqldump.20231110.sql.gz备份完整的数据库
  5. 使用命令ll /opt/atlassian/jira/atlassian-jira/WEB-INF/lib | grep mysql检查之前的数据库驱动文件版本,并复制一份做好备份
  6. 检查之前修改过的文件,并保留文件内容,在新版本安装后,将变动的内容复制进去,不要整个文件覆盖。我这边改过setenv.sh,startup.sh,server.xml

二、执行升级操作

执行以下命令开始执行升级操作。注意中间几个命令的选择,升级的话,可以按照以下记录核对一步步做即可。

bash 复制代码
root@localhost:/home/ubuntu# ./atlassian-jira-software-9.11.3-x64.bin 
Unpacking JRE ...
Starting Installer ...

# 询问是否安装指定版本,输入o,按回车
This will install Jira Software 9.11.3 on your computer.
OK [o, Enter], Cancel [c]
o
Click Next to continue, or Cancel to exit Setup.

Choose the appropriate installation or upgrade option.
Please choose one of the following:
# 这里询问安装方式,我们是升级,所以输入3,按回车
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2], Upgrade an existing Jira installation [3, Enter]
3

# 这里提示默认目录位置,记得按回车确认,我以为后台已经在执行,瞎等了半天
Existing installation directory:
[/opt/atlassian/jira]

Back up Jira home directory
The upgrade process will automatically back up your Jira installation
directory. You can also choose to back up your existing Jira home directory.
Both directories are backed up as zip archive files in their respective
parent directory locations.

We strongly recommend choosing this option in the unlikely event that you
experience problems with the upgrade and may require these backups to
restore your existing Jira installation.

If you have many attachments in your Jira home directory, the zip archive of
this directory may consume a significant amount of disk space.
# 我选择了备份默认目录,这样子如果失败了,还有地方可以还原,根据文件多少,这里需要等等。输入 y,按回车
Back up Jira home directory?
Yes [y, Enter], No [n]
y

Checking for local modifications.

List of modifications made within Jira directories.

# 记住下面改动过的文件内容,安装完了之后去确认文件内容,除了setenv.sh、startup.sh和需要修改,本次升级,server.xml文件中变更点还在,数据库驱动包也还在
The following provides a list of file modifications within the
atlassian-jira directory.

Modified files:
        bin/setenv.sh
        conf/server.xml
        bin/startup.sh
Removed files:
        (none)
Added files:
        atlassian-jira/WEB-INF/lib/mysql-connector-java-8.0.30.jar

[Enter]


Checking if your instance of Jira Software is running

Upgrade checklist
Complete these steps to have a smooth upgrade experience. If you need more
details, see
https://docs.atlassian.com/jira/jadm-docs-0911/Preparing+for+the+upgrade.

# 在 Jira 管理界面中运行健康检查,确保所有服务都正常
1. Run a Jira health check
Run a Jira health check to verify that you're ready to upgrade. Make sure
that checks related to the license and database have passed, but you can
also fix other detected problems.

# 在提示升级的管理界面中确认兼容性
2. Check app compatibility
Make sure your apps are compatible with the Jira version you're upgrading
to. Disable all incompatible apps, so they don't affect your upgrade.

# 使用工具备份数据库,前面已经做过了
3. Back up the database
Back up the Jira database using your database's native backup tools.

# 确认上面的都做了,就输入 y,按回车
Have you completed all these steps?
Yes [y], No [n, Enter]
y
# 确认是否升级,输入 u,按回车
Your existing Jira installation is about to be upgraded! Do you want to proceed?
Upgrade [u, Enter], Exit [e]
u

Your instance of Jira is currently being upgraded.
Checking if Jira has been shutdown...
Backing up the Jira installation directory
                                                                           
Backing up the Jira home directory
                                                                           
Deleting the previous Jira installation directory...

Extracting files ...
                                                                           
/opt/atlassian/jira/bin/tcnative-1.dll

The file already exists.

# 确认覆盖,输入 y,按回车
Would you like Setup to overwrite it?
Yes [y], Yes to All [ya], No [n], No to All [na]
y

Please wait a few moments while Jira Software is configured.

# 询问是否启动新版本的 Jira,这里选择否,因为后面还需要检查自定义的配置文件,所以输入 n,按回车
Installation of Jira Software 9.11.3 is complete
Start Jira Software 9.11.3 now?
Yes [y], No [n, Enter]
n

Installation of Jira Software 9.11.3 is complete
Your installation of Jira Software 9.11.3 is now ready.
Custom modifications
Your previous Jira installation contains customisations (eg server.xml) that
must be manually transferred. Refer to our documentation more information:
http://docs.atlassian.com/jira/jadm-docs-0911/Upgrading+JIRA+applications+manually#UpgradingJIRAapplicationsmanually-configuringnewjiraasold3.4MigrateyourexistingJIRAconfigurationsovertoyournewJIRAinstallation
Finishing installation ...

至此,升级安装过程已经完成

三、升级后文件检查

  1. /opt/atlassian/jira/bin/setevn.sh
bash 复制代码
JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JVM_CODE_CACHE_ARGS} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMEND
ED_ARGS} ${JVM_EXTRA_ARGS} ${JIRA_HOME_MINUSD} ${START_JIRA_JAVA_OPTS}"

修改自己想要的参数

bash 复制代码
JAVA_OPTS="-j*******.jar -Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JVM_CODE_CACHE_ARGS} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMEND
ED_ARGS} ${JVM_EXTRA_ARGS} ${JIRA_HOME_MINUSD} ${START_JIRA_JAVA_OPTS}"
  1. /opt/atlassian/jira/bin/startup.sh,使用80端口启动Tomcat。最后一行
bash 复制代码
exec "$PRGDIR"/"$EXECUTABLE" start "$@"

改成

bash 复制代码
exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@"

原来authbind的安装配置的文章请参考我的在 Linux 以非 root 用户将 Tomcat 运行在 80 端口上

  1. /opt/atlassian/jira/conf/server.xml 文件,确认监听80端口,注意Connector port=参数值即可
xml 复制代码
<Connector port="80" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
                   maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
                   maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
                   acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>
  1. 数据库连接驱动文件检查
bash 复制代码
# ll /opt/atlassian/jira/atlassian-jira/WEB-INF/lib | grep mysql
-rw-r--r-- 1 root root  2513563 Nov 10 09:23 mysql-connector-java-8.0.30.jar

四、启动服务后检查

所有自定义配置的文件内容确认完了之后,进入 /opt/atlassian/jira 目录,执行 bin/start-jira.sh 启动服务,然后有一个升级后启动的过程,耐心等待。

我在启动过程中,有提示 server.xml 文件内容不对,我核实了端口号是对的,直接忽略警告继续启动了。

启动成功后,登录管理界面,会提示需要重建索引,按照提示操作即可。

至此,升级完成。如果一切正常后,可以删除过程中自动备份的目录文件,我这边两个文件共占用 1GB 的空间。

bash 复制代码
rm -f /opt/atlassian/jira-9.11.2-back.zip
rm -f /var/atlassian/application-data/jira-9.11.2-back.zip

五、官方参考资料

Upgrading Jira (manual)

相关推荐
龙智DevSecOps解决方案3 天前
工作管理实战指南:利用Jira、Confluence等Atlassian工具打破信息孤岛,增强团队协作【含免费指南】
atlassian·jira·工作管理
龙智DevSecOps解决方案15 天前
一站式协作平台Jira新功能解读:AI驱动、个性化设置、灵活自定义等,助力项目管理更高效
人工智能·atlassian·jira
钉钉项目Teambition1 个月前
Jira Cloud涨价5%-20%,钉钉项目Teambition成优选替代
钉钉·jira·teambition
Wninacc3 个月前
jira敏捷开发管理工具视频教程Confluence工作流协同开发(2024)
java·javascript·eclipse·敏捷流程·jira
龙智DevSecOps解决方案3 个月前
龙智Atlassian解决方案实践案例:集成Jira、Confluence、JSM,助力某汽车行业客户实现高效项目管理
车载系统·atlassian·jira
龙智DevSecOps解决方案4 个月前
Atlassian Intelligence工具集解析:从自然语言到JQL处理,从虚拟代理到AI摘要、编辑器中的生成式AI等,全方位提升团队协作效率
人工智能·atlassian·软件需求·jira
baidu_169924414 个月前
JIRA的高级搜索JIRA Query Language(JQL)详解
jira
龙智DevSecOps解决方案4 个月前
Jira实践案例分享:小米集团如何通过API请求优化、数据治理与AI智能客服等,实现Jira系统的高效运维
运维·人工智能·jira
联蔚盘云4 个月前
DevOps CMDB平台整合Jira工单
运维·devops·jira
007php0075 个月前
如何生成自定义二维码和实现安全便捷的扫码登录功能以及对接企业微信API
java·开发语言·经验分享·redis·笔记·git·功能测试·jmeter·其他·nginx·安全·百度·ajax·ci/cd·docker·微信·架构·golang·系统架构·单元测试·centos·github·jenkins·php·erlang·企业微信·postman·sass·课程设计·微信公众平台·safari·facebook·oneapi·twitter·composer·jira·paddle·新浪微博·lvs·segmentfault·微信开放平台