上海閔行區(qū)租房價格杭州seo搜索引擎優(yōu)化
一、升級準(zhǔn)備
- Jira 管理界面執(zhí)行升級檢查
- 下載升級包,使用原操作方式相同的方式安裝。我這里原來的版本是通過
./atlassian-jira-software-9.11.2-x64.bin
安裝的,接下來下載atlassian-jira-software-9.11.3-x64.bin的安裝文件 - 停止 Jira,bin/stop-jira.sh
- 使用
mysqldump -u root -p --all-databases | gzip > mysqldump.20231110.sql.gz
備份完整的數(shù)據(jù)庫 - 使用命令
ll /opt/atlassian/jira/atlassian-jira/WEB-INF/lib | grep mysql
檢查之前的數(shù)據(jù)庫驅(qū)動文件版本,并復(fù)制一份做好備份 - 檢查之前修改過的文件,并保留文件內(nèi)容,在新版本安裝后,將變動的內(nèi)容復(fù)制進(jìn)去,不要整個文件覆蓋。我這邊改過setenv.sh,startup.sh,server.xml
二、執(zhí)行升級操作
執(zhí)行以下命令開始執(zhí)行升級操作。注意中間幾個命令的選擇,升級的話,可以按照以下記錄核對一步步做即可。
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# 這里提示默認(rèn)目錄位置,記得按回車確認(rèn),我以為后臺已經(jīng)在執(zhí)行,瞎等了半天
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.
# 我選擇了備份默認(rèn)目錄,這樣子如果失敗了,還有地方可以還原,根據(jù)文件多少,這里需要等等。輸入 y,按回車
Back up Jira home directory?
Yes [y, Enter], No [n]
yChecking for local modifications.List of modifications made within Jira directories.# 記住下面改動過的文件內(nèi)容,安裝完了之后去確認(rèn)文件內(nèi)容,除了setenv.sh、startup.sh和需要修改,本次升級,server.xml文件中變更點(diǎn)還在,數(shù)據(jù)庫驅(qū)動包也還在
The following provides a list of file modifications within the
atlassian-jira directory.Modified files:bin/setenv.shconf/server.xmlbin/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 runningUpgrade 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 管理界面中運(yùn)行健康檢查,確保所有服務(wù)都正常
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.# 在提示升級的管理界面中確認(rèn)兼容性
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.# 使用工具備份數(shù)據(jù)庫,前面已經(jīng)做過了
3. Back up the database
Back up the Jira database using your database's native backup tools.# 確認(rèn)上面的都做了,就輸入 y,按回車
Have you completed all these steps?
Yes [y], No [n, Enter]
y
# 確認(rèn)是否升級,輸入 u,按回車
Your existing Jira installation is about to be upgraded! Do you want to proceed?
Upgrade [u, Enter], Exit [e]
uYour instance of Jira is currently being upgraded.
Checking if Jira has been shutdown...
Backing up the Jira installation directoryBacking up the Jira home directoryDeleting the previous Jira installation directory...Extracting files .../opt/atlassian/jira/bin/tcnative-1.dllThe file already exists.# 確認(rèn)覆蓋,輸入 y,按回車
Would you like Setup to overwrite it?
Yes [y], Yes to All [ya], No [n], No to All [na]
yPlease 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]
nInstallation 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 ...
至此,升級安裝過程已經(jīng)完成
三、升級后文件檢查
- 改
/opt/atlassian/jira/bin/setevn.sh
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}"
修改自己想要的參數(shù)
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}"
- 改
/opt/atlassian/jira/bin/startup.sh
,使用80端口啟動Tomcat。最后一行
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
改成
exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@"
原來authbind的安裝配置的文章請參考我的在 Linux 以非 root 用戶將 Tomcat 運(yùn)行在 80 端口上
- 改
/opt/atlassian/jira/conf/server.xml
文件,確認(rèn)監(jiān)聽80端口,注意Connector port=
參數(shù)值即可
<Connector port="80" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>
- 數(shù)據(jù)庫連接驅(qū)動文件檢查
# 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
四、啟動服務(wù)后檢查
所有自定義配置的文件內(nèi)容確認(rèn)完了之后,進(jìn)入 /opt/atlassian/jira
目錄,執(zhí)行 bin/start-jira.sh
啟動服務(wù),然后有一個升級后啟動的過程,耐心等待。
我在啟動過程中,有提示 server.xml 文件內(nèi)容不對,我核實(shí)了端口號是對的,直接忽略警告繼續(xù)啟動了。
啟動成功后,登錄管理界面,會提示需要重建索引,按照提示操作即可。
至此,升級完成。如果一切正常后,可以刪除過程中自動備份的目錄文件,我這邊兩個文件共占用 1GB 的空間。
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)