Skip to content

Commit 14d6e21

Browse files
Update instructions for upgrading NGINX Agent (#648)
* Update instructions for upgrading NGINX Agent * PR feedback Co-authored-by: Jon Torre <[email protected]> * PR feedback Co-authored-by: Jon Torre <[email protected]> * PR feedback Co-authored-by: Jon Torre <[email protected]> --------- Co-authored-by: Jon Torre <[email protected]>
1 parent af2a366 commit 14d6e21

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

content/agent/installation-upgrade/upgrade.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ type:
1212

1313
Learn 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

1917
To 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 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 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 you can restore the environment 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

Comments
 (0)