Our PHP agent auto-instruments your code so you can start monitoring applications. Follow this procedure to install New Relic's PHP agent for APM using AWS Linux 2, RedHat, or CentOS. Exception: If you have an earlier version installed, upgrade the agent instead.
Install the agent Even though the package name for New Relic's PHP agent refers to PHP 5, the package works for all supported PHP versions .
Make sure you have your New Relic license key accessible.
Use either of the following ways to obtain the installation package:
Tell the package manager (rpm
) about the New Relic repository For 32-bit systems, run:
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm
For 64-bit systems, run:
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
Download the rpm file from New Relic Install the agent and daemon using your preferred package manager:
yum 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 Replace X.X.X.X
with the most recent PHP agent version number when you run this command:
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 Replace X.X.X.X
with the most recent PHP agent version number when you run this command:
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
Run the newrelic-install
script and follow the instructions.
sudo newrelic-install install
Restart your web server (Apache, NGINX, PHP-FPM, etc.).
Generate traffic to your application, and wait a few minutes for it to send data to New Relic. Then, check your app's performance in the UI .