diff --git a/content/agent/installation-upgrade/upgrade.md b/content/agent/installation-upgrade/upgrade.md index 50477e94b..cd11db359 100644 --- a/content/agent/installation-upgrade/upgrade.md +++ b/content/agent/installation-upgrade/upgrade.md @@ -12,9 +12,7 @@ type: Learn how to upgrade NGINX Agent. -## Upgrade NGINX Agent from version v2.31.0 or greater - -{{< note >}} Starting from version v2.31.0, NGINX Agent will automatically restart itself during an upgrade. {{< /note >}} +## Upgrade NGINX Agent To upgrade NGINX Agent, follow these steps: @@ -41,43 +39,48 @@ To upgrade NGINX Agent, follow these steps: sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::="--force-confold" ``` +## Upgrade NGINX Agent to a Specific Version +To upgrade NGINX Agent to a specific **v2.x version**, follow these steps: -## Upgrade NGINX Agent from a version less than v2.31.0 - -To upgrade NGINX Agent, take the following steps: +#### Steps to Upgrade: -1. Open an SSH connection to the server where you’ve installed NGINX Agent and log in. +1. Open an SSH connection to the server running NGINX Agent and log in. -1. Make a backup copy of the following locations to ensure that you can successfully recover if the upgrade has issues: +1. Back up the following files and directories to ensure you can restore the environment in case of issues during the upgrade: - `/etc/nginx-agent` - - `config_dirs` values for any configuration specified in `/etc/nginx-agent/nginx-agent.conf` - -1. Stop NGINX Agent: + - Any `config_dirs` directory specified in `/etc/nginx-agent/nginx-agent.conf`. - ```shell - sudo systemctl stop nginx-agent - ``` - -1. Install the updated version of NGINX Agent: - - - CentOS, RHEL, RPM-Based +1. Perform the version-controlled upgrade. + - Debian, Ubuntu, Deb-Based + ```shell - sudo yum -y makecache - sudo yum update -y nginx-agent + sudo apt-get update + sudo apt-get install -y nginx-agent= -o Dpkg::Options::="--force-confold" ``` - - - Debian, Ubuntu, Deb-Based - + + Example (to upgrade to version 2.41.1~noble): + ```shell - sudo apt-get update - sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::="--force-confold" + sudo apt-get install -y nginx-agent=2.41.1~noble -o Dpkg::Options::="--force-confold" ``` -1. Start NGINX Agent: + - CentOS, RHEL, RPM-Based + + ```shell + sudo yum install -y nginx-agent- + ``` + + Example (to upgrade to version `2.41.1`): + + ```shell + sudo yum install -y nginx-agent-2.41.1 + ``` +1. Verify the installed version: + ```shell - sudo systemctl start nginx-agent + sudo nginx-agent --version ```