How to Install New Relic Application Performance Monitoring
I installed the free New Relic PHP monitoring tool on my own server (mainly for the free t-shirt!). The free account provides you with information on traffic, performance, and state (up or down). New Relic also offers monitoring for many other software/services — MySQL, Apache, Java, etc. — and has paid features as well for those seeking a deeper experience.
The following directions will guide you through the installation of New Relic application monitoring on a CentOS server. Other Linux OS servers will be similar, but not exactly the same. If you’re interested in installing New Relic’s server monitoring package, check out my next article.
Sign up for a New Relic account
- Visit New Relic, click on the “Create my Free Account” button and fill in the form.
- After sign up, click on “Account Settings” and on the right hand side under Account Information: License you will find your license. Copy and paste this key into a text doc for later use.
Identify whether you are using a 32 or 64 bit OS.
- From the command line, run
- This will report whether you are running 32 or 64 bit. A 32 bit server will return text including “i686″ and/or “i386″ in the command output. A 64 bit server will have “x86_64″ somewhere in the output.
New Relic download and install
- Match the output to one of the following rpm options and run one of the following rpm commands to update your repository. This will allow you to install the new relic resource monitor:
32 bit: rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm
64 bit: rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
- Download and install New Relic:
yum install newrelic-php5
- The New Relic install script will request your license; paste it from the text file you saved earlier.
- It will then tell you where it detects your PHP installations, it will likely detect multiple installations, you will want the one located in:
Start and check New Relic
- Restart your web server. If you are running Apache on a CentOS machine (as most ServInt VPS customers are), simply run the command:
- Start the new relic agent by executing:
- You should then add it to chkconfig so that it starts on boot:
chkconfig newrelic-daemon on
To check the installation you can use these commands:
This will show that newrelic-daemon is running
This will show that the php module is installed
This will show that newrelic-daemon is set to start on boot
And, as always, if you are having trouble with your New Relic installation and you’re a ServInt customer, open up a ticket in your customer Portal and we’ll be glad to help.