1. Upgrade preparation
- Jira management interface performs upgrade check
- Download the upgrade package and install it using the same method as the original operation. The original version I have here is installed through
./atlassian-jira-software-9.11.2-x64.bin
. Next, download the installation of atlassian-jira-software-9.11.3-x64.bin. File, download address https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-9.11.3-x64.bin - Stop Jira, bin/stop-jira.sh
- Use
mysqldump -u root -p --all-databases | gzip > mysqldump.20231110.sql.gz
to back up the complete database - Use the command
ll /opt/atlassian/jira/atlassian-jira/WEB-INF/lib | grep mysql
to check the previous database driver file version and make a copy for backup - Check previously modified files and retain the file contents. After the new version is installed, copy the changed contents into it without overwriting the entire file. I changed setenv.sh, startup.sh, server.xml here
2. Perform upgrade operation
Execute the following command to start the upgrade operation. Pay attention to the selection of the few commands in the middle. If you want to upgrade, you can check it step by step according to the following records.
root@localhost:/home/ubuntu# ./atlassian-jira-software-9.11.3-x64.bin Unpacking JRE... Starting Installer... # Ask whether to install the specified version, enter o and press Enter 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: # Here we ask about the installation method. We are upgrading, so enter 3 and press Enter. Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2], Upgrade an existing Jira installation [3, Enter] 3 # This prompts the default directory location. Remember to press Enter to confirm. I thought the background was already executing, so I waited for a long time. 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. # I chose to back up the default directory so that if it fails, there is still a place to restore. Depending on the number of files, you need to wait here. Enter y and press Enter Back up Jira home directory? Yes [y, Enter], No [n] y Checking for local modifications. List of modifications made within Jira directories. # Remember the contents of the changed files below. After installation, confirm the contents of the files. Except for setenv.sh, startup.sh and other modifications that need to be made, in this upgrade, the change points in the server.xml file are still there, and the database driver package is also still there. 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. # Run a health check in the Jira management interface to ensure that all services are normal 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. # Confirm compatibility in the management interface that prompts for upgrade 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. # Use tools to back up the database, which has been done before 3. Back up the database Back up the Jira database using your database's native backup tools. # Confirm that you have done all the above, enter y and press Enter Have you completed all these steps? Yes [y], No [n, Enter] y # Confirm whether to upgrade, enter u and press Enter 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. # Confirm overwriting, enter y and press Enter 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. # Ask whether to start a new version of Jira. Select No here because you need to check the customized configuration file later, so enter n and press Enter. 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 customizations (eg server.xml) that must be manually transferred. Refer to our documentation for more information: http://docs.atlassian.com/jira/jadm-docs-0911/Upgrading + JIRA + applications + manually #UpgradingJIRAapplicationsmanually-configuringnewjiraasold3.4MigrateyourexistingJIRAconfigurationsovertoyournewJIRAinstallation Finishing installation...
At this point, the upgrade installation process has been completed
3. File check after upgrade
- Change
/opt/atlassian/jira/bin/setenv.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}"
Modify the parameters you want
JAVA_OPTS="-javaagent:/opt/atlassian*****agent.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}"
- Change
/opt/atlassian/jira/bin/startup.sh
to use port 80 to start Tomcat. the last line
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Change to
exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@"
For the original installation and configuration article of authbind, please refer to my article on running Tomcat on port 80 as a non-root user in Linux.
- Change the
/opt/atlassian/jira/conf/server.xml
file and confirm that it is listening on port 80. Pay attention to theConnector port=
parameter value.
<Connector port="80" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^ & amp;#x5c; & amp;#x60; & amp;quot; & amp;lt;"> >" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>
- Database connection driver file check
# 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
4. Check after starting the service
After confirming the contents of all custom configuration files, enter the /opt/atlassian/jira
directory and execute bin/start-jira.sh
to start the service, and then there will be an upgrade Please wait patiently during the startup process.
During the startup process, I was prompted that the content of the server.xml file was incorrect. I verified that the port number was correct and ignored the warning and continued the startup.
After successful startup, log in to the management interface and you will be prompted to rebuild the index. Just follow the prompts.
At this point, the upgrade is complete. If everything is normal, you can delete the directory files automatically backed up during the process. The two files here occupy a total of 1GB of space.
rm -f /opt/atlassian/jira-9.11.2-back.zip rm -f /var/atlassian/application-data/jira-9.11.2-back.zip
5. Official reference materials
Upgrading Jira (manual)