Install Infrastructure for Linux

With Infrastructure for Linux, not only can you monitor individual servers, you can also understand how your service performs as a whole. Infrastructure supports several Linux operating systems as well as Windows Server. Before installation, review the compatibility and requirements.

Infrastructure agent running modes

The Linux agent can run as root, privileged, or unprivileged user.

Mode Overview
Root

Installed by default. Runs as root and has total access to all the system metrics and inventory.

Privileged

Installed by including the NRIA_MODE environment variable set to PRIVILEGED. Runs as a non-privileged user named nri-agent that is created automatically during the installation process.

Normal users do not have READ access to all the system metrics, so the agent will not be able to report all the metrics of the root mode. However, privileged mode can collect more metrics than unprivileged mode, including most of the inventory. This is because at installation time, the /usr/bin/newrelic-infra executable is granted with CAP_SYS_PTRACE and CAP_DAC_READ_SEARCH kernel capabilities.

Unprivileged

Installed by including the NRIA_MODE environment variable set to UNPRIVILEGED. Runs as a non-privileged user named nri-agent that is created automatically during the installation process.

This mode is the most restricted. Normal users do not have READ access to all the system metrics, so the agent will not be able to report all the metrics of the root or privileged modes.

When deciding which run mode to use, consider how much data you want to be able to collect and analyze, or how much data you want to restrict.

Metrics and inventory provided
Mode Metrics and inventory
Root All of the documented data and instrumentation values.
Privileged

All of the values from root mode, except:

  • SELinux inventory: This depends on the semodule command, which requires root access.
  • Docker process metrics: These are not enabled by default. However, you can manually enable them by giving access rights to the nri-agent user.
Unprivileged

All of the values from privileged mode, except:

Process samples do not report these metrics:

  • File descriptor count
  • I/O read bytes per second
  • I/O read count per second
  • I/O total read bytes
  • I/O total read count
  • I/O total write bytes
  • I/O total write count
  • I/O write bytes per second
  • I/O write count per second

The following inventory sources are not reported:

  • config/sshd
  • kernel/sysctl
  • packages/rpm
  • packages/dpkg
  • services/pidfile on SysV-based distributions
Running integrations
As root, integrations will run as usual. When running as privileged or unprivileged user, integrations will execute properly, although some custom integrations (for example, built by customers or technical sales staff) that depend on access to root may need additional configuration.

On-Host integrations

In general, on-host integrations will run with the non-root agent as long as the nri-agent has permissions on the integration cache files.

The default path where the integration cache files are stored is /tmp. To change the path, set the environment variable NRIA_CACHE_PATH. In this situation, use the following instructions to target the provided cache path folder instead of /tmp.

On-host integrations Cache path folder
Apache
sudo chown nri-agent:nri-agent -R /tmp/nr-apache.json
Cassandra
sudo chown nri-agent:nri-agent -R /tmp/nr-integrations
MySQL
sudo chown nri-agent:nri-agent -R /tmp/nr-mysql.json
Nginx
sudo chown nri-agent:nri-agent -R /tmp/nr-nginx.json
Redis
sudo chown nri-agent:nri-agent -R /tmp/nr-redis.json

Custom integrations

If your custom integration doesn't require root privileges, then it’s compatible with the rootless mode. To run it, you just need to change the owner:group of the cache file as explained above.

If your integration requires to be executed with a privileged user, you can use the integration_user argument in the configuration integration.

Install the agent

To install the Infrastructure agent in Linux, follow the instructions for your package manager and desired user mode:

The hostname for your server cannot be localhost. Data will not be reported for servers with that name. Make sure the host name uses a unique name.

Once the agent is installed or updated, follow the common steps to start, stop, or check the Infrastructure agent status.

Install for Debian

To install the Infrastructure agent on Debian:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Enable New Relic's GPG key:

    curl -s https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  4. Determine the distribution version number:

    cat /etc/os-release
  5. Create the agent's apt repo using the command for your distribution version:

    Debian 7 ("Wheezy")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt wheezy main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Debian 8 ("Jessie")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt jessie main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Debian 9 ("Stretch")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt stretch main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  6. Update your apt cache:

    sudo apt-get update
  7. Run the install script:

    sudo apt-get install newrelic-infra -y

Generate some traffic and wait a few minutes, then view your hosts in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for Ubuntu

To install the Infrastructure agent on Ubuntu:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Enable New Relic's GPG key:

    curl https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  4. Determine the distribution version number:

    cat /etc/lsb-release 
  5. Create the agent's apt repo using the command for your distribution version:

    Ubuntu 12 ("Precise")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt precise main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 14 ("Trusty")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt trusty main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 16 ("Xenial")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 18 ("Bionic")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt bionic main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  6. Update your apt cache:

    sudo apt-get update
  7. Run the install script:

    sudo apt-get install newrelic-infra -y

Generate some traffic and wait a few minutes, then view your hosts in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for Amazon Linux, CentOS, or RHEL

To install the Infrastructure agent on Amazon Linux, CentOS, or RHEL (Red Hat Enterprise Linux):

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Determine the distribution version number:

    cat /etc/os-release
  4. Create the agent's yum repo:

    Amazon Linux
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
    Amazon Linux 2
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
    CentOS 5, RHEL 5
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/5/x86_64/newrelic-infra.repo
    CentOS 6, RHEL 6
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
    CentOS 7, RHEL 7
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo

    CentOS 8, RHEL 8
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repo
  5. Update your yum cache:

    sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
  6. Run the install script:

    sudo yum install newrelic-infra -y

Generate some traffic and wait a few minutes, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for SUSE Linux Enterprise Server (SLES)

To install the Infrastructure agent on SLES:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Determine the distribution version number:

    cat /etc/os-release | grep VERSION_ID
  4. Import the New Relic GPG key:

    sudo rpm --import https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
  5. Create the agent's Zypper repo:

    SLES 11.4
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/11.4/x86_64/newrelic-infra.repo
    SLES 12.1
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.1/x86_64/newrelic-infra.repo 
    SLES 12.2
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.2/x86_64/newrelic-infra.repo 
    SLES 12.3
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.3/x86_64/newrelic-infra.repo 
    SLES 12.4
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.4/x86_64/newrelic-infra.repo  
  6. Update your Zypper repos:

     sudo zypper -n ref -r newrelic-infra
  7. Run the install script:

    sudo zypper -n install newrelic-infra

Generate some traffic and wait a few minutes, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install using configuration management tools

To install Infrastructure with a configuration management tool, see the documentation for:

Install for Docker containers on instrumented hosts

See Docker instrumentation for Infrastructure.

To run as a privileged user, you will need to set the NRIA_MODE environment variable to PRIVILEGED during the installation process and also have the libcap library installed in your system (as shown in the following install steps).

If you are using the sudo command to install or update the agent, use the -E argument to allow bypassing the environment variables, or specify the NRIA_MODE environment variable just after the sudo command.

Install for Debian

To install the Infrastructure agent on Debian:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml 
  3. Enable New Relic's GPG key:

    curl -s https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  4. Determine the distribution version number:

    cat /etc/os-release  
  5. Create the agent's apt repo using the command for your distribution version:

    Debian 7 ("Wheezy")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt wheezy main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Debian 8 ("Jessie")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt jessie main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Debian 9 ("Stretch")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt stretch main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  6. Update your apt cache:

    sudo apt-get update
  7. Install the libcap library.

    sudo apt-get install libcap2-bin
  8. Run the install script:

     sudo NRIA_MODE="PRIVILEGED" apt-get install newrelic-infra  

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE=”PRIVILEGED”
                   sudo -E apt-get dist-upgrade

Generate some traffic and wait a few minutes, then view your hosts in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for Ubuntu

To install the Infrastructure agent on Ubuntu:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml 
  3. Enable New Relic's GPG key:

    curl https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  4. Determine the distribution version number:

     cat /etc/lsb-release
  5. Create the agent's apt repo using the command for your distribution version:

    Ubuntu 12 ("Precise")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt precise main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 14 ("Trusty")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt trusty main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 16 ("Xenial")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 18 ("Bionic")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt bionic main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  6. Update your apt cache:

    sudo apt-get update
  7. Install the libcap library.

    sudo apt-get install libcap2-bin
  8. Run the install script:

    sudo NRIA_MODE="PRIVILEGED" apt-get install newrelic-infra
    

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE=”PRIVILEGED” sudo -E apt-get dist-upgrade

Generate some traffic and wait a few minutes, then view your hosts in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for Amazon Linux, CentOS, or RHEL

To install the Infrastructure agent on Amazon Linux, CentOS, or RHEL (Red Hat Enterprise Linux):

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Determine the distribution version number:

    cat /etc/os-release  
  4. Create the agent's yum repo:

    Amazon Linux
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
    Amazon Linux 2
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo 
    CentOS 5, RHEL 5
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/5/x86_64/newrelic-infra.repo  
    CentOS 6, RHEL 6
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
    CentOS 7, RHEL 7
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo    

    CentOS 8, RHEL 8
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repo
  5. Update your yum cache:

    sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
  6. Install the libcap library.

    sudo yum install libcap
  7. Run the install script:

    sudo NRIA_MODE="PRIVILEGED" yum install newrelic-infra 

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE="PRIVILEGED"
    sudo -E yum upgrade

Generate some traffic and wait a few minutes, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for SUSE Linux Enterprise Server (SLES)

To install the Infrastructure agent on SLES:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Determine the distribution version number:

    cat /etc/os-release | grep VERSION_ID  
  4. Import the New Relic GPG key:

    sudo rpm --import https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
  5. Create the agent's Zypper repo:

    SLES 11.4
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/11.4/x86_64/newrelic-infra.repo
    SLES 12.1
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.1/x86_64/newrelic-infra.repo
    SLES 12.2
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.2/x86_64/newrelic-infra.repo
    SLES 12.3
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.3/x86_64/newrelic-infra.repo 
    SLES 12.4
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.4/x86_64/newrelic-infra.repo 
  6. Update your Zypper repos:

    sudo zypper -n ref -r newrelic-infra
  7. Install the libcap library.

    sudo zypper install libcap-progs
  8. Run the install script:

    sudo NRIA_MODE="PRIVILEGED" zypper install newrelic-infra  

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE=”PRIVILEGED”
    sudo -E zypper update newrelic-infra

Generate some traffic and wait a few minutes, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install using configuration management tools

To install Infrastructure with a configuration management tool, see the documentation for:

Install for Docker containers on instrumented hosts

See Docker instrumentation for Infrastructure.

To run as unprivileged user, you will need to set the NRIA_MODE environment variable to UNPRIVILEGED during the installation process.

If you are using the sudo command to install or update the agent, use the -E argument to allow bypassing the environment variables, or specify the NRIA_MODE environment variable just after the sudo command.

Install for Debian

To install the Infrastructure agent on Debian:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Enable New Relic's GPG key:

    curl -s https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  4. Determine the distribution version number:

    cat /etc/os-release 
  5. Create the agent's apt repo using the command for your distribution version:

    Debian 7 ("Wheezy")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt wheezy main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Debian 8 ("Jessie")
     printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt jessie main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Debian 9 ("Stretch")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt stretch main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  6. Update your apt cache:

    sudo apt-get update
  7. Run the install script:

    sudo NRIA_MODE="UNPRIVILEGED" apt-get install newrelic-infra 

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE="UNPRIVILEGED"
    sudo -E apt-get dist-upgrade

Generate some traffic and wait a few minutes, then view your hosts in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for Ubuntu

To install the Infrastructure agent on Ubuntu:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml 
  3. Enable New Relic's GPG key:

    curl https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo apt-key add -
  4. Determine the distribution version number:

    cat /etc/lsb-release
  5. Create the agent's apt repo using the command for your distribution version:

    Ubuntu 12 ("Precise")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt precise main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 14 ("Trusty")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt trusty main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 16 ("Xenial")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu 18 ("Bionic")
    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt bionic main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
  6. Update your apt cache:

    sudo apt-get update
  7. Run the install script:

    sudo NRIA_MODE="UNPRIVILEGED" apt-get install newrelic-infra  

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE="UNPRIVILEGED"
    sudo -E apt-get dist-upgrade

Generate some traffic and wait a few minutes, then view your hosts in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for Amazon Linux, CentOS, or RHEL

To install the Infrastructure agent on Amazon Linux, CentOS, or RHEL (Red Hat Enterprise Linux):

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Determine the distribution version number:

    cat /etc/os-release 
  4. Create the agent's yum repo:

    Amazon Linux
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo 
    Amazon Linux 2
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
    CentOS 5, RHEL 5
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/5/x86_64/newrelic-infra.repo
    CentOS 6, RHEL 6
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
    CentOS 7, RHEL 7
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo 

    CentOS 8, RHEL 8
    sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repo
  5. Update your yum cache:

    sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
  6. Run the install script:

    sudo NRIA_MODE="UNPRIVILEGED" yum install newrelic-infra   

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE="UNPRIVILEGED"
    sudo -E yum upgrade

Generate some traffic and wait a few minutes, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install for SUSE Linux Enterprise Server (SLES)

To install the Infrastructure agent on SLES:

  1. Review the agent requirements and supported operating systems for 64-bit architectures.

  2. Create a configuration file, and add your license key:

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Determine the distribution version number:

    cat /etc/os-release | grep VERSION_ID   
  4. Import the New Relic GPG key:

    sudo rpm --import https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
  5. Create the agent's Zypper repo:

    SLES 11.4
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/11.4/x86_64/newrelic-infra.repo 
    SLES 12.1
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.1/x86_64/newrelic-infra.repo 
    SLES 12.2
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.2/x86_64/newrelic-infra.repo 
    SLES 12.3
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.3/x86_64/newrelic-infra.repo 
    SLES 12.4
    sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.4/x86_64/newrelic-infra.repo  
  6. Update your Zypper repos:

    sudo zypper -n ref -r newrelic-infra
  7. Run the install script:

    sudo NRIA_MODE="UNPRIVILEGED" zypper install newrelic-infra   

    Or, if the agent is already installed and you want to update to the last version in privileged mode:

    export NRIA_MODE="UNPRIVILEGED"
    sudo -E zypper update newrelic-infra

Generate some traffic and wait a few minutes, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install using configuration management tools

To install Infrastructure with a configuration management tool, see the documentation for:

Install for Docker containers on instrumented hosts

See Docker instrumentation for Infrastructure.

What's next?

The only required configuration option is the license_key setting, which is created as part of the installation procedures. You may also want to:

Switch running modes

From root to privileged/unprivileged

To switch the running mode from root to privileged or unprivileged, follow the installation/update instructions in this doc.

From privileged/unprivileged to any other mode

To change the running mode from privileged or unprivileged to any other mode:

  1. Follow these steps:

    Debian/Ubuntu

    dpkg --purge newrelic-infra

    OR

    sudo apt-get remove --purge newrelic-infra
    Centos/Suse/RedHat/Amazon
    rpm -e newrelic-infra

    OR

    sudo yum remove newrelic-infra

    OR

    sudo zypper rm newrelic-infra
  2. After making sure the agent is completely removed, reinstall the agent with the selected mode.

Update the agent

Follow standard procedures to update the Infrastructure agent.

For more help

Recommendations for learning more: