Created
March 29, 2013 10:05
-
-
Save haman29/5270009 to your computer and use it in GitHub Desktop.
Newrelic sysmond と Newrelic php5 をインストールするシェルスクリプト的なもの ref: http://qiita.com/items/849926f63fc11c0a8a6f
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
# リポジトリ登録 | |
$ rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm |
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
# Install | |
$ yum install -y newrelic-sysmond | |
# Set license key | |
$ nrsysmond-config --set license_key=${YOUR_LICENCE_KEY} | |
# Start daemon | |
$ /etc/init.d/newrelic-sysmond start |
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
# install | |
$ yum install -y newrelic-php5 | |
# licence key の設定 | |
$ newrelic-install install | |
New Relic PHP Agent Installation (interactive mode) | |
=================================================== | |
In order for the New Relic agent to function correctly it requires a license | |
key. Please enter that key now. If you do not have your license key handy you | |
can add it to your INI file(s) later. Please be aware that the license key you | |
specify here will be installed in the default INI files, and will be the key | |
used for any virtual host or directory / application that does not over-ride | |
the key on a per-host or per-directory basis. This is only relevant if you run | |
a multi-tenant site. Please contact support@newrelic.com if you run such a | |
site and have any questions. | |
If you are upgrading from a previous version please leave this blank. Please | |
also note that the key you enter here will not replace any existing key in | |
your INI file(s). It applies only to newly created INI files or INI files that | |
have not been modified by this script before. | |
Enter New Relic license key (or leave blank): ${YOUR_LICENCE_KEY} | |
Found a valid PHP in : /usr/bin | |
PHP Version : 5.3.20 | |
Module API version : 20090626 | |
Module directory : /usr/lib64/php/modules | |
Zend Thread Safety : no | |
CLI ini directory : /etc/php.d | |
Install Status : OK | |
New Relic is now installed on your system. Congratulations! | |
The last step before you will start seeing data in your account is to restart | |
your web server or servers, or whatever environment hosts the PHP you wish to | |
monitor. For example, you may need to restart Apache or nginx, or if you are | |
using php-fpm and FastCGI, you will need to restart php-fpm. If you installed | |
New Relic into multiple locations you may have multiple PHP hosts to restart. | |
If everything is working properly you should see the following two log files: | |
/var/log/newrelic/newrelic-daemon.log | |
/var/log/newrelic/php_agent.log | |
Now you should create a simple test php script that contains the line: | |
<?php phpinfo(); ?> | |
and point your browser at the test script, and you should see the New Relic | |
extension and its settings. If you still do not see those log files or data in | |
your account please contact our support staff at support@newrelic.com and be | |
sure to include the following file in your bug report: | |
/tmp/nrinstall-20130320-123815-25851.tar | |
Thank you for choosing New Relic! | |
# newrelicの記述を確認する | |
$ php -r "phpinfo();" | grep newrelic |
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
sudo su - | |
rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm | |
yum install -y newrelic-sysmond newrelic-php5 | |
nrsysmond-config --set license_key=${YOUR_LICENCE_KEY} | |
/etc/init.d/newrelic-sysmond start | |
sed -ie "s/REPLACE_WITH_REAL_KEY/${YOUR_LICENCE_KEY}/g" /etc/php.d/newrelic.ini | |
/etc/init.d/httpd graceful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment