Sunday 8 September 2013

New Relic Setup on Ubuntu 12.04

In this article I will show you how to setup New Relic on Ubuntu 12.04 on linode.
First Login on Newrelic website if you have an account unless Register with a email address.Then follow these steps : 
  1. Click on the Applications tab in the left sidebar on your dashboard.
  2. Choose your language.
  3. Click on Reveal license key button.
  4. Select your Environment to Debian-based (Debian, Ubuntu, etc)
  5. Then login to your server with root account
  6. Get the key :
    wget -O - http://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
  7. Add newrelic repository:
    sudo sh -c 'echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt/sources.list.d/newrelic.list'
  8. Install the package and configure it:  
    sudo apt-get update
    sudo apt-get install newrelic-php5
    sudo newrelic-install install
  9. Stop and start your services .i.e. Restart your web servers: httpd, apache2, nginx, php-fpm, etc.
  10. Then Go to your dashboard on New Relic and click on Connect to my application button and it will show the data on your dashboard in approximately 5 minutes.
Note : if you got any error while installation either Email support@newrelic.com or follow the instructions here https://newrelic.com/docs/php/new-relic-for-php#installation

In a default installation there should be no need to start the daemon manually using /etc/init.d/newrelic-daemon start. This is only needed in unique circumstances. The daemon should be started as needed by the agent when your web-server is restarted.

After a restart, do the following:
ps -aux | grep newrelic-daemon
If things are running you should see to processes named newrelic-daemon.

If these are not running then please locate your log files and send them to us. By default these files would be located at

/var/log/newrelic/php_agent.log
/var/log/newrelic/newrelic-daemon.log

No comments :

Post a Comment