PHP agent installation: RedHat and CentOS

This procedure is for installing New Relic's PHP agent using RedHat or CentOS. For procedures to install the monitoring agent for New Relic Servers, see Server monitor installation: RedHat and CentOS.

As part of the installation process, change the default application name to a meaningful name.

Obtaining the installation package

There are two ways to obtain the installation package:

Tell the package manager (rpm) about the New Relic repository

For 32-bit systems, run:

sudo rpm -Uvh

For 64-bit systems, run:

sudo rpm -Uvh
Download the rpm file from the New Relic website

For 32-bit systems, download these three files from the 32-bit packages:

  • newrelic-php5-common-X.X.X.X-1.noarch.rpm
  • newrelic-daemon-X.X.X.X-1.i386.rpm
  • newrelic-php5-X.X.X.X-1.i386.rpm

For 64-bit systems, download these three files from the 64-bit packages:

  • newrelic-php5-common-X.X.X.X-1.noarch.rpm
  • newrelic-daemon-X.X.X.X-1.x86_64.rpm
  • newrelic-php5-X.X.X.X-1.x86_64.rpm

Installing the agent

These commands apply only to first-time installations. If you have an earlier version of New Relic installed, see Upgrading the agent.

After obtaining the installation package, install the agent using your package manager and the install script:

  1. Install the agent and daemon using your preferred package manager:

    sudo yum install newrelic-php5

    The first time you install New Relic for PHP, yum prompts you to accept the New Relic public key. New Relic's key ID is 548C16BF.

    32-bit rpm
    rpm -i newrelic-php5-common-X.X.X.X-1.noarch.rpm newrelic-daemon-X.X.X.X-1.i386.rpm newrelic-php5-X.X.X.X-1.i386.rpm
    64-bit rpm
    rpm -i newrelic-php5-common-X.X.X.X-1.noarch.rpm newrelic-daemon-X.X.X.X-1.x86_64.rpm newrelic-php5-X.X.X.X-1.x86_64.rpm

    If yum and rpm do not work with your server config, install from the binary tarball.

  2. Run the newrelic-install script and follow the instructions:

    sudo newrelic-install install
  3. Restart your web server (Apache, Nginx, PHP-FPM, etc.).

  4. Wait a few minutes for your application to send data to New Relic. Then, check your app's performance in the New Relic UI.

If no data appears, see troubleshooting instructions. For more information about installing the PHP agent, see PHP install script, or see the configuration section in New Relic for PHP to configure your agent.

For more help

Additional documentation resources include:

Join the discussion about PHP 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