1212
1313Learn how to upgrade NGINX Agent.
1414
15- ## Upgrade NGINX Agent from version v2.31.0 or greater
16-
17- {{< note >}} Starting from version v2.31.0, NGINX Agent will automatically restart itself during an upgrade. {{< /note >}}
15+ ## Upgrade NGINX Agent
1816
1917To upgrade NGINX Agent, follow these steps:
2018
@@ -41,43 +39,48 @@ To upgrade NGINX Agent, follow these steps:
4139 sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::=" --force-confold"
4240 ` ` `
4341
42+ # # Upgrade NGINX Agent to a Specific Version
4443
44+ To upgrade the NGINX Agent to a specific ** v2.x version** , follow these steps:
4545
46- # # Upgrade NGINX Agent from a version less than v2.31.0
47-
48- To upgrade NGINX Agent, take the following steps:
46+ # ### Steps to Upgrade:
4947
50- 1. Open an SSH connection to the server where you’ve installed NGINX Agent and log in.
48+ 1. Open an SSH connection to the server running the NGINX Agent and log in.
5149
52- 1. Make a backup copy of the following locations to ensure that you can successfully recover if the upgrade has issues:
50+ 1. Back up the following files and directories to ensure recovery in case of issues during the upgrade:
5351
5452 - ` /etc/nginx-agent`
55- - ` config_dirs` values for any configuration specified in ` /etc/nginx-agent/nginx-agent.conf`
56-
57- 1. Stop NGINX Agent:
53+ - Any ` config_dirs` directory specified in ` /etc/nginx-agent/nginx-agent.conf` .
5854
59- ` ` ` shell
60- sudo systemctl stop nginx-agent
61- ` ` `
62-
63- 1. Install the updated version of NGINX Agent:
64-
65- - CentOS, RHEL, RPM-Based
55+ 1. Perform the version-controlled upgrade.
6656
57+ - Debian, Ubuntu, Deb-Based
58+
6759 ` ` ` shell
68- sudo yum -y makecache
69- sudo yum update -y nginx-agent
60+ sudo apt-get update
61+ sudo apt-get install -y nginx-agent= < specific-version > -o Dpkg::Options::= " --force-confold "
7062 ` ` `
71-
72- - Debian, Ubuntu, Deb-Based
73-
63+
64+ Example (to upgrade to version 2.41.1~noble):
65+
7466 ` ` ` shell
75- sudo apt-get update
76- sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::=" --force-confold"
67+ sudo apt-get install -y nginx-agent=2.41.1~noble -o Dpkg::Options::=" --force-confold"
7768 ` ` `
7869
79- 1. Start NGINX Agent:
70+ - CentOS, RHEL, RPM-Based
71+
72+ ` ` ` shell
73+ sudo yum install -y nginx-agent-< specific-version>
74+ ` ` `
75+
76+ Example (to upgrade to version ` 2.41.1` ):
77+
78+ ` ` ` shell
79+ sudo yum install -y nginx-agent-2.41.1
80+ ` ` `
8081
82+ 1. Verify the installed version:
83+
8184 ` ` ` shell
82- sudo systemctl start nginx-agent
85+ sudo nginx-agent --version
8386 ` ` `
0 commit comments