12
12
13
13
Learn how to upgrade NGINX Agent.
14
14
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
18
16
19
17
To upgrade NGINX Agent, follow these steps:
20
18
@@ -41,43 +39,48 @@ To upgrade NGINX Agent, follow these steps:
41
39
sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::=" --force-confold"
42
40
` ` `
43
41
42
+ # # Upgrade NGINX Agent to a Specific Version
44
43
44
+ To upgrade NGINX Agent to a specific ** v2.x version** , follow these steps:
45
45
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:
49
47
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 NGINX Agent and log in.
51
49
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 you can restore the environment in case of issues during the upgrade:
53
51
54
52
- ` /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` .
58
54
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.
66
56
57
+ - Debian, Ubuntu, Deb-Based
58
+
67
59
` ` ` 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 "
70
62
` ` `
71
-
72
- - Debian, Ubuntu, Deb-Based
73
-
63
+
64
+ Example (to upgrade to version 2.41.1~noble):
65
+
74
66
` ` ` 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"
77
68
` ` `
78
69
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
+ ` ` `
80
81
82
+ 1. Verify the installed version:
83
+
81
84
` ` ` shell
82
- sudo systemctl start nginx-agent
85
+ sudo nginx-agent --version
83
86
` ` `
0 commit comments