How to use newRelic for your website: – Part – I

Create (or) login in NewRelic:

1. Create account if doesn’t exist :

2. Login, if you have account already:

Username : <UserName>     , Password : <Password>

List of NewRelic Product:

Hit following URL on your browser ( &login with your credentials. After successful login, the page redirect you to land on product listing page. Here you will get list of products which you like to set up first for your website ?

Install New Relic APM (Application performance management) on Ubuntu:

1. Select New Relic APM (Here i am choosing APM, depend on your requirement plz choose)

2. Select your Agent (I select PHP)

3. Choose your “Agent” based on your requirement.

4. Select “Get your license key” button. Copy the KEY & keep with you.

5. Select Your Environment (Where you want to install NewRelic APM ? Like Redhat, Ubuntu, CentOs , Debian , etc). Here I am going to choose Ubuntu.

Execute below commands on your Server (Ubuntu ):

Now login your ubutu server & execute below command. Please refer NewRelic APM page. Key and few details may change according to the user. Please mentioned detail I got it for my account.

6. Get the key:

>wget -O – | sudo apt-key add –

7. Add NewRelic repository:

>sudo sh -c ‘echo “deb 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

9. Add your PHP license key:

When you execute above 2 command , the system will ask you to enter the Generated key. After enter & submit the key value will be store dinto newrelic.ini file. If not added then you do below manual process

We can add either into newrelic.ini or php.ini.

>open /etc/php/<YOUR PHP VERSION>/cli/conf.d/newrelic.ini

newrelic.license=”<YOUR KEY HERE>”

10. Stop and Start nginx, php-fpm, etc.

11. Once after you restart the service, your application will start send the data to NewRelic server.

12. After some time (just wait for approx 5min). You can able to track the details on newRelic APM dashboard section.

13. newrelic-php5

The package name was kept as newrelic-php5 but it will support latest PHP version.

14. Verify sudo vi /etc/apt/sources.list.d/newrelic.list is present or not . & Not empty . If not then installation is failed

sudo vi /etc/apt/sources.list.d/newrelic.list


sudo vi /etc/apt/sources.list.d/newrelic-infra.list

newrelic path you can also get it from your phpinfo.php

15. After successful installation go to newRelic APM dashboard & check.

stay secure !!! and stay awake !!!