Created
July 4, 2015 18:29
-
-
Save sobanvuex/398683b4249f2fab5b15 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# variables | |
PHP_API=${PHP_API:-$(php-config --extension-dir | cut -d '-' -f 4)} | |
PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR:-$(php-config --extension-dir)} | |
# repository | |
wget -O - https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - | |
echo "deb http://apt.newrelic.com/debian/ newrelic non-free" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update -qq | |
sudo apt-get install newrelic-php5 | |
# install | |
cp /usr/lib/newrelic-php5/agent/x64/newrelic-$PHP_API-zts.so $PHP_EXTENSION_DIR/newrelic.so | |
# enable | |
echo "extension = newrelic.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment