Install Infrastructure for Linux

With Infrastructure for Linux, you can monitor not only individual servers, but understand how your service performs as a whole. Infrastructure supports Amazon Linux, CentOS, Debian, RHEL, and Ubuntu as well as Windows Server; before installation, review the Compatibility and requirements.

To install Infrastructure with a configuration management tool, see the documentation on Ansible, Chef, and Puppet.

Install the agent

To install the agent, follow the instructions for your package manager:

Install with apt (Debian or Ubuntu)

To install the Infrastructure agent on Debian or Ubuntu:

  1. Review the agent requirements and supported operating systems.

  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. Create the agent's apt repo using the command for your distribution version:

    Debian

    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

    Debian 10 ("Buster")

    printf "deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt buster main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list
    Ubuntu

    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
  5. Update your apt cache:

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

    sudo apt-get install newrelic-infra -y

Wait a minute, then view your server in the Infrastructure UI. If no data appears after waiting a few minutes, see No data appears.

Install with yum (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.

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

    echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml
  3. Create the agent's yum repo:

    Amazon Linux, 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
    
  4. Update your yum cache:

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

    sudo yum install newrelic-infra -y

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.

Configure the agent

The only required configuration option is the license_key setting, which is created as part of the installation procedures. You may also want to add custom attributes to annotate your Infrastructure data, or connect your AWS account if your servers are hosted on Amazon EC2.

To manually start, stop, or restart the agent, see Start, stop, restart, and check agent status.

Update the agent

To update to the latest Infrastructure agent version, replace the agent with the latest version using your preferred update or install process. For more about checking agent versions and updating the agent, see Update the agent.

For more help

Join the discussion about New Relic Infrastructure in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.