login and create new rellic account
Add new relic repository to ubuntu
Update the local package list:
install newrelic php agent
root@-s-4vcpu-8gb-blr1-01:/etc/php#
Finish installing the agent:
Configure your license key and application name
-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
-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
Edit newrelic php conf ini
nano /etc/php/7.4/fpm/conf.d/
;newrelic.enabled = true
newrelic.license = “REPLACE_WITH_REAL_KEY”
Restart your application
restart newrelic agent if necessary
uninstall new relic php agent
Troubleshooting errors
ERROR: unsupported version ‘8.0.3’ of PHP found at:
/usr/bin
Ignoring this particular instance of PHP.
Remove php 8 fpm
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 not receiving data
new relic- APm