Installing New Relic on cPanel/WHM with EasyApache 4 isn’t as easy as it could be.
Here’s a quick and easy working solution that works for us.
Firstly, lets install the New Relic software
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
Then install the agent
sudo yum install newrelic-php5 sudo newrelic-install install
Secondly, we need to set the PHP installation locations before running the New Relic Installer
NR_INSTALL_PATH=/opt/cpanel/ea-php71/root/usr/bin; export NR_INSTALL_PATH newrelic-install
Run the installer, on the 3rd page, make sure you select the option relavent to your PHP path.
If you have PHP 7.0, or 5.6, replace ea-php71 with the version relevant to you.
If you have multiple PHP installations, you could repeat this last step until they all have New Relic installed.
The New Relic documentation says restart your web server. So go ahead and do that. If you are using PHP-FPM for some or all of your sites, you will also need to restart PHP-FPM
It might be a good idea to edit the .user.ini files in your domain directories and see an application name for New Relic.
newrelic.appname = "www.limewebdevelopment.com"