How to Install New Relic Infrastructure on Linux?


In this post, I will tell you how to install New Relic Infrastructure on Linux.

New Relic Infrastructure is a flexible and dynamic monitoring tool that can keep track of your entire infrastructure. Surveillance of cloud services, or the dedicated resources, or the containers running in an orchestrated environment is possible with the New Relic Infrastructure.

You can monitor all the host data on one page due to the modern UI of the infrastructure. The real-time data collection accelerates the function of modern operations teams.

Moreover, you can create custom queries to get a better understanding of your data. All the custom charts, tables and other visual presentation of data helps make the New Relic Infrastructure a powerful monitoring tool.

In this post, we will be looking at how to install and configure New Relic Infrastructure on your server.

Compatibility and requirements for New Relic Infrastructure

Ensure your system is compatible before installing the New Relic Infrastructure.

Processor architectures

New Relic Infrastructure supports only x86 processors.

  • Linux: 64-bit architecture
  • Windows: 32-bit and 64-bit architecture

ARM processors are not supported.

Operating systems

Install New Relic Infrastructure on Linux Operating System Requirement

Unique hostname

The hostname of each server must be unique to avoid the inaccurate metrics.

When there are few servers combined in a single hostname, you have to make sure that each server has a separate name.

Use the optional “display_name” setting to override the default hostnames.


To install the infrastructure, you have to give permissions:

Linux: The agents run ad install as root. However, you have the option to choose privileged or unprivileged run modes.

Windows: The agent must be installed from the administrator account, and it requires admin privileges to run.

Network access

Infrastructure has to have access to certain domains and ports in order to report data to New Relic.

Container software

Infrastructure supports Docker versions 1.12 or higher.

CPU, memory, and disk usage

There load depends on the host’s workload, specifically on the number of processes running on the host. Basically, the infrastructure collects event data from each individual process, hence, if there are more process, then there is more data to collect.

However, there are benchmarks for most common type of hosts. You can read in detail here.


New Relic Infrastructure include integrations for:

  • Amazon Web Services (AWS)
  • Google Cloud Platform (GCP)
  • Microsoft Azure
  • Kubernetes
  • Popular services like Apache, StatsD, NGINX, Redis, and many more
  • Prometheus (not included in compute units (CUs) pricing for Infrastructure Pro)

Supported browsers

New Relic supports the two most recent desktop versions for these browsers:

  • Google Chrome: Linux, macOS, Windows
  • Microsoft Edge: Windows
  • Mozilla Firefox: Linux, macOS, Windows
  • Safari: macOS

Where to find your License Key?

The New Relic license key is a 40-character hexadecimal string that we provide when you sign up for a New Relic account. We use license keys to differentiate your account from others. Every type of account has one (regardless of your subscription).

The license key provided by the New Relic is a 40-character hexadecimal secure string. Each New Relic key is unique, and works as an identifier of the account. 

You can view your New Relic key at:

  1. Sing in into your New Relic account
  2. Locate the drop-down menu, and open the “Account Settings”.
  3. Navigate to the Account information setting on the right side of the summary page.
  4. Copy the License key from there
  5. Use the key during the installation and updates

How to Install New Relic Infrastructure?

Step 1: Add the license key to newrelic-infra.yml file.

echo "license_key: <LICENSE_KEY>" >> /etc/newrelic-infra.yml

Step 2: Add the repository for newrelic.

Note: The command varies depending on the OS Distribution and releases version. The repo download link can be found here:

Step 3: Install newrelic-Infra package

For Ubuntu:

apt-get install newrelic-infra -y

For Centos:

yum install newrelic-infra -y

Note: By default, newrelic runs as root user which gives it all the privileges to read the log files and integrations.

New Relic Installation

Step 4: Start the service.

systemctl newrelic-infra start

/etc/init.d/newrelic-infra start

initctl start newrelic-infra

service newrelic-infra start
New Relic Installation on Linux

Step 5: Test log forwarding function

Infrastructure is successfully installed and running. We have to test the log forwarding functionality now.

To do this, simply create a yml file in /etc/newrelic-infra/logging.d/ and add the below code:


- name: "Testing log forwarding from ServerGuy"

file: /var/log/test.log

Note: Since it is a YAML file, make sure to use spaces for intending.

Now, echo any string to the log file path you provided. In the above case, it is /var/log/test.log

echo "Testing Log Forwarding from ServerGuy" >> /var/log/test.log

Login to the New Relic Dashboard to check if the logs have been forwarded.

Now after yo install New Relic Infrastructure on Linux, you can integrate it with the Nginx.

Integrating Nginx to New Relic Infrastructure

Once the log forwarding is confirmed, we can proceed to integrate newrelic-infra with the services.

Note: All the integrations are separate packages installed using the default package manager.

For Nginx, install the integration nri-nginx.

yum install nri-nginx -y
Installing New Relic on Linux OS

First, we need to make sure that the Nginx module “http_stub_status_module” is enabled on the server.

Simply execute the below command and check the output.

nginx -V 2>&1 | grep --color "with-http_stub_status_module"
Configuring New Relic on Linux

Note: All the integrations will have a configurable YAML file in /etc/newrelic-infra/integrations.d/

To configure the integration, we need to edit the Nginx conf file and add the below entry to the VirtualHost within the server block.

location = /basic_status {



Make sure that a status page as shown in the screenshot below appears when calling the server’s $HOSTNAME/basic_status or $IP/basic_status.

image4 install new relic

Edit the integration’s config file in /etc/newrelic-infra/integrations.d/nginx-config.yml

Update the value from:



status_url: http://{{SERVER_IP/HOSTNAME}}/basic_status

Login to and go to

Infrastructure -> Third-party Services -> Nginx

to test the configurations.

How much does the New Relic cost?

There are two plans for New Relic. The cost of Essential New Relic starts from $7.2 per month. This is for the organization that only requires the essential features, without any integration.

The pro plan costs $14.4 per month. This is for large organizations that need advanced monitoring and integrations.

Wrap Up

Hope this article helped you, and you can install New Relic Infrastructure on Linux without any issue.

However, if any problem arise, leave it in the comment box.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new modules, and more. 100% Magento Goodness, a promise!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

We can help you. Right now.

Fast growing merchants depend ServerGuy for high-performance hosting. Experience counts. Let's get started.

Talk to a sales representative

USA / Worldwide




Core Web Vitals Book COver

Is your website ready for Core Web Vitals?

Take this FREE book with you and optimize your store for speed.

Learn all about new Google new ranking factors and get that top ranking.