Upgrade NGINX Agent Package

Learn how to upgrade NGINX Agent

Upgrade the NGINX Agent

To upgrade the NGINX Agent, take the following steps:

  1. Open an SSH connection to the server where you’ve installed the NGINX Agent and log in.

  2. Make a backup copy of the following locations to ensure that you can successfully recover if the upgrade has issues:

    • /etc/nginx-agent
    • config_dirs values for any configuration specified in /etc/nginx-agent/nginx-agent.conf
  3. Stop the NGINX Agent:

    sudo systemctl stop nginx-agent
    
  4. Install the updated version of the NGINX Agent:

    • CentOS, RHEL, RPM-Based

      sudo yum -y makecache
      sudo yum update -y nginx-agent
      
    • Debian, Ubuntu, Deb-Based

      sudo apt-get update
      sudo apt-get install -y --only-upgrade nginx-agent -o Dpkg::Options::="--force-confold"
      
  5. Start the NGINX Agent:

    sudo systemctl start nginx-agent