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:
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.
Invoke install mode by using one of these methods:
Run newrelic-install with the install command line option.
Run newrelic-install with no options and select the install option from the main menu when invoking the script.
At the prompt, enter your New Relic . This key will be inserted into any INI files created during the rest of the installation process.
If newrelic-install finds more than one version of PHP, select which version of PHP to use. You will not see this screen if the script only finds a single version of PHP.
To select only one version, enter the number indicating the version you want to use.
To select multiple versions, enter a comma- or space-separated list of numbers.
To select every version listed, enter the keyword all.
To exit the installation process, Enter 0.
For each directory selected, the script will attempt to install the agent in the proper place and report on each attempt.
중요
For PHP installations that allow multiple .ini files, the install script will copy a template file into place, if a modified one is not already installed. Make a note of the .ini files you will need to modify manually.
If the daemon was not installed by the package manager, install the daemon.
If this is an update or reinstall, the script provide a confirmation prompt before overwriting the old copy of the daemon.
If installation is successful, the script will show this final message:
New Relic is now installed on your system. Congratulations!
To activate the PHP agent, restart your web server.
If you are running PHP-FPM, you may also need to restart PHP-FPM separately before the agent will be active.
Note the name and location of the install archive file. This file will be located at /tmp/nrinstall-nnnn.tar and will contain both the install log and useful system information to help New Relic Technical Support with troubleshooting.
After you install New Relic successfully and restart your web server, you can begin gathering data about your applications. After a few minutes, data will begin to appear on your APM Summary page.
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.
이 문서가 설치하는데 도움이 되셨나요?
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.
This method is useful when you want to uninstall and upgrade. The uninstall does not remove important configuration files, such as your daemon configuration file. Also, it does not remove any newrelic.ini files that you have modified.
To uninstall New Relic using the install script, use either of these options:
Invoke newrelic-install with the uninstall option.
Run newrelic-install with no options, and select the uninstall option from the main menu when invoking the script.
To permanently uninstall New Relic from your system: Invoke newrelic-install with the purge option.
This will remove all the configuration files and any links created at installation time. This will not affect any configuration parameters placed in files such as php.in. Also, this will not remove the software packages installed on the system.