-
-
Save jentanbernardus/a5a9045cc15e068613a31e51783b1c06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# need to be run as root | |
# Add NewRelic repo | |
wget -O - https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - | |
# sure the new repo on the list | |
# /etc/apt/sources.list.d/newrelic.list and set it to contain the line: | |
deb http://apt.newrelic.com/debian/ newrelic non-free | |
apt-get update | |
# install newrelic-agent for php | |
apt-get install newrelic-php5 | |
newrelic-install install # (type in 56369fcf27cde80124b486e6515f0956783f2f9c the license key on the prompt) | |
# single PHP application on server | |
# change global newrelic.appname in /etc/php5/fpm/conf.d/newrelic.ini | |
vi /etc/php5/fpm/conf.d/newrelic.ini | |
# multiple PHP application on server (nginx/php-fpm combo) | |
# we can just use nginx in-directory settings | |
# https://docs.newrelic.com/docs/php/per-directory-settings | |
# edit individual nginx config | |
location / { | |
fastcgi_param PHP_VALUE "newrelic.appname=Application Name"; | |
... | |
} | |
# restart php-fpm | |
/etc/init.d/php5-fpm stop && sleep 1 && /etc/init.d/php5-fpm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment