awslamp

Install New Relic for PHP

New Relic is a real-time Web application that runs in cloud, on-premise, or hybrid environments. Follow these steps to configure New Relic for PHP.

  • Download the latest tarball from https://download.newrelic.com/php_agent/release/.

  • Uncompress it in your machine:

      $ tar -xzf newrelic-php5-X.Y.Z-linux.tar.gz
    
  • Run the New Relic install script:

      $ cd newrelic-php5-X.Y.Z-linux
      $ sudo ./newrelic-install
    
  • Check that the module was correctly installed at /opt/bitnami/php/lib/php/extensions/newrelic.so.

  • Add the newrelic.so module in the PHP configuration file at /opt/bitnami/php/etc/php.ini, at the end:

      extension=newrelic.so
    
  • Check that it was properly added by running php -m and verifying that the New Relic extension is enabled.

  • Restart services.

      $ sudo /opt/bitnami/ctlscript.sh restart
    
  • Check that the New Relic service is running:

      $ sudo /etc/init.d/newrelic-daemon status
      New Relic Daemon: newrelic-daemon is running
    
Last modification December 21, 2022