PHP agent installation: Tar file

You can install New Relic for PHP from compressed tar archives. This method can be used on any supported platform. However, for Redhat or CentOS it is more common to use the RPM package, and on Ubuntu or Debian it is more common to use the Debian package.

Downloading the tar distribution

Unlike other installation options, installing from tar archives does not require any special repository setup. All you need to do is download the archive and follow these instructions.

Download the appropriate tar distribution file from the New Relic website. For example, for SmartOS download newrelic-php5-X.X.X.X-solaris.tar.gz or for Alpine Linux download newrelic-php5-X.X.X.X-linux-musl.tar.gz.

Installing and upgrading

With tar file installation, the steps for first time installation and for upgrading are the same. Replace X.X.X.X with the correct New Relic version. To install or upgrade the agent:

  1. Download the appropriate tar file from the New Relic website and save it to a local disk in some convenient location.
  2. Decompress and extract the archive:
    gzip -dc newrelic-php5-X.X.X.X-OS.tar.gz | tar xf -
  3. Change to the newly created directory:
    cd newrelic-php5-X.X.X.X-OS
  4. Run the installation script:
    ./newrelic-install
  5. Change the default application name to a meaningful name.
  6. Restart your web server (Apache, Nginx, PHP-FPM, etc.).
  7. Wait a few minutes for your application to send data to New Relic.

Then, check your app's performance in the New Relic UI.

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 support.newrelic.com.