• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Use the newrelic-install script for PHP

The interactive newrelic-install script simplifies installing PHP applications in New Relic. It works with multiple PHP installations as well as installations in non-standard locations. Running it will:

  • Copy the correct PHP modules into place.
  • Install sample ini files.
  • Configure the New Relic proxy daemon.

Importante

Be sure to review the information about working with multiple installations and non-standard locations before running the script.

Find the installer script

The installer script location depends on how you installed the New Relic PHP agent.

  • Via system package manager: The installation script is in the /usr/bin directory.
  • Via a tarball: The installation script is in the directory where you extracted the tar archive file. The script in the tar distribution includes installation steps otherwise handled by the package manager.

Work with multiple PHP installations

For newrelic-install to correctly detect multiple installations, ensure your PATH environment variable is correctly set. The newrelic-install script can only install the agent for versions it can find.

If you want to...

Do this...

Specify additional directories

Use the NR_INSTALL_PATH environment variable with a colon-separated list.

Override NR_INSTALL_PATH and PATH

Specify a set of directories in the NR_INSTALL_PHPLIST environment variable as a colon-separated list. These directories must contain either the command line version of PHP or the php-config script.

Invoke the installer script

The script has two modes: install and uninstall. If you invoke it with no arguments, you will be prompted to select a mode.

From the command line, run the script at its location:

  • Via system package manager: /usr/bin/newrelic-install
  • Via a tar archive directory: ./newrelic-install

Use the install mode

Follow this process to install New Relic.

Use the install_daemon mode

To install the daemon without the agent, use PHP agent 9.2 or higher. Run newrelic-install with the install_daemon command line option.

This is useful if the daemon runs on a different host or in a different container than the PHP application. For example, this may happen with agent install on containers.

Este documento ajudou você na instalação?

Troubleshoot your PHP installation

If there were problems with the installation process, review No data appears and other troubleshooting docs before contacting New Relic for support. Be sure to attach your archive file to any bug report, as well as the output of the phpinfo() function produced by your web server.

Uninstall mode

You can uninstall New Relic but keep valuable config files (useful when upgrading), or permanently uninstall New Relic from your system.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.