• Skip to main content
  • Skip to primary sidebar
  • Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / tutorials / new relic php agent install in 3 steps

new relic php agent install in 3 steps

Table of Contents

Toggle
  • login and create new rellic account
  • Add new relic repository to ubuntu
  • Update the local package list:
  • install newrelic php agent
  • Finish installing the agent:
  • Configure your license key and application name
  • Edit newrelic php conf ini
  • Restart your application
  • restart newrelic agent if necessary
  • uninstall new relic php agent
  • Troubleshooting errors
  • Remove php 8 fpm
  • new relic php not receiving data

login and create new rellic account

prerequisites:
>> install new relic infrastructure agent

Add new relic repository to ubuntu

echo ‘deb http://apt.newrelic.com/debian/ newrelic non-free’ | sudo tee /etc/apt/sources.list.d/newrelic.list
truest the key
wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add –

Update the local package list:

sudo apt-get update
new relic php fpm monitor

install newrelic php agent

sudo apt-get -y install newrelic-php5
works for php but not works for php 8
remove if old with config file
sudo apt-get -y remove –purge newrelic-php5
Please restart your Web server(s) to complete installation.
root@-s-4vcpu-8gb-blr1-01:/etc/php#

Finish installing the agent:

sudo NR_INSTALL_SILENT=1 newrelic-install install
root@-s-4vcpu-8gb-blr1-01:~# sudo NR_INSTALL_SILENT=1 newrelic-install install
Note: if you enter the license key while installing no need below steps, you can go app and php >> (skip installation and check the data)

Configure your license key and application name

sed -i -e “s/REPLACE_WITH_REAL_KEY/e28947ef70ff6b7baaf50291de3d341c8069NRAL/” \
-e “s/newrelic.appname[[:space:]]=[[:space:]].*/newrelic.appname=\”newwwww\”/” \
-e ‘$anewrelic.distributed_tracing_enabled=true’ \
$(php -r “echo(PHP_CONFIG_FILE_SCAN_DIR);”)/newrelic.ini
REPLACE_WITH_REAL_KEY
Account 3034122
sed -i -e “s/3034122/e28947ef70ff6b7baaf50291de3d341c8069NRAL/” \
-e “s/newrelic.appname[[:space:]]=[[:space:]].*/newrelic.appname=\”newwwww\”/” \
-e ‘$anewrelic.distributed_tracing_enabled=true’ \
$(php -r “echo(PHP_CONFIG_FILE_SCAN_DIR);”)/newrelic.ini
newrelic installation 

Edit newrelic php conf ini

nano /etc/php/7.4/fpm/conf.d/

;newrelic.enabled = true

newrelic.license = “REPLACE_WITH_REAL_KEY”

 

/etc/phpX.Y/conf.d/newrelic.ini
cd /etc/php/7.4/fpm/conf.d/newrelic.ini
cat /etc/php/7.4/fpm/conf.d/newrelic.ini
cd /etc/php/7.4/conf.d/newrelic.ini
cat /etc/php/7.4/conf.d/newrelic.ini

Restart your application

service php7.4-fpm restart
Check for data
Listening for your data…
Data received successfully.

restart newrelic agent if necessary

service newrelic-infra restart
service newrelic-infra status
systemctl restart newrelic-daemon && systemctl restart php7.4-fpm

uninstall new relic php agent

sudo apt-get -y purge newrelic-php5
$ sudo apt-get autoremove

Troubleshooting errors

if you have php 7.4 and php 8 then remove php 8 or either one of them
apt-get purge php8.0
apt-get purge php8.1

ERROR: unsupported version ‘8.0.3’ of PHP found at:
/usr/bin
Ignoring this particular instance of PHP.

 

Remove php 8 fpm

apt-get purge php8.0-fpm  && apt-get auto-remove
sudo NR_INSTALL_SILENT=1 newrelic-install install

PHP Warning:  Module ‘newrelic’ already loaded in Unknown on line 0

remove new relic existing module

newrelic-25

newrelic in every php & apache directory.

 

new relic php fpm monitoring metrics

 

new relic php not receiving data

new relic- APm

 

php agent log
info: attempt daemon connection via ‘@newrelic’
2021-05-14 14:39:00.913 +0000 (24081 24081) info: New Relic 9.17.1.301  (“xigua” – “6498785b65c7”) [daemon=’@newrelic’  php=’8.0.3′ zts=no  sapi=’cli’  pid=24081 ppid=24045 uid=0 euid=0 gid=0 egid=0 backtrace=yes  startup=agent os=’Linux’ rel=’4.15.0-140-generic’ mach=’x86_64′  ver=’#144-Ubuntu SMP Fri Mar 19 14′ node=’-s-4vcpu-8gb-blr1-01′]
removing “php-wordpress” with run id  “BX_xROK_NpQYAC5MCk55UChgnov8AAMBAAAnIQEAAFzpAgROeVAlAwAKOS4xNy4xLjMwMQAULXMtNHZjcHUtOGdiLWJscjEtMDEADXBocC13b3JkcHJlc3M” for lack of activity  within 10m0s
warning: User instrumentation from opcache: missing ‘scripts’ key in status information

Primary Sidebar

tutorials

  • Core Java Tutorial Free online
  • HTML & CSS Tutorials
  • Php tutorials
  • ubuntu tutorials installation download issues etc
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • how to create a website free of cost on google
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • new relic mysql install integration - 2 ways fix problems
  • new relic php agent install in 3 steps
  • aws load balancer tutorial
  • git branches merge fetch pull conflicts

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy