Skip to content

Instantly share code, notes, and snippets.

@mfdj
Last active August 30, 2017 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfdj/0a3a031ce973e1f31260d48dd709e063 to your computer and use it in GitHub Desktop.
Save mfdj/0a3a031ce973e1f31260d48dd709e063 to your computer and use it in GitHub Desktop.
Install New Relic PHP extension on macOS
# Grabbed archive from https://download.newrelic.com/php_agent/release/ and decompressed
gzip -dc newrelic-php*.tar.gz | tar xf -
cd newrelic-php*/
# manually edited newrelic-install to not use sudo because it's contrary to how Homebrew (and thus most of my system) behaves
# Homebrew'd PHP doesn't use PHP's typical extensions folder so I created it manually (note path is dependent on php version)
mkdir -p /usr/local/Cellar/php70/7.0.17_9/lib/php/extensions/no-debug-non-zts-20151012
# run install script with custom paths (since /usr/bin is not writeable because of macOS "system integrity protection")
NR_INSTALL_INITFILE=/usr/local/bin/newrelic-daemon-service NR_INSTALL_DAEMONPATH=/usr/local/bin/newrelic-daemon ./newrelic-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment