New Relic Setup in Server
In this Article , i am sharing you, how you can New Relic Setup in Server . First, i have describe how you can install and setup at New relic at Centos server.
Before start install, Please read below articles:
- https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-redhat-centos
- https://foxutech.com/how-to-setup-new-relic-server/
- https://www.techbrown.com/configure-new-relic-server-monitoring-centos-7.shtml
Please follow below steps for setup the new relic at server.
Step1: Add the New Relic Repository to your server.
First, you have add new relic package to your server software repository.
So, run below command at your server terminal.
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
Step2: Install the New Relic Packages
Second, you have to install newrelic package from add repository
Step3: Add Lienence Key
sudo yum install newrelic-sysmond
Step 3: Add Licence Key
Now need to add your licence key at server. Your can find your licence at your new relic account.Please login on your new relic account,then browser right corner and click on your user icon and now on the right section, you will the your licence key.
Copy this licence key .Now, you have to login your server at again and run below command for add licence key to your server
sudo nrsysmond-config --set license_key=YOUR_LICENCE_KEY
Example:
sudo nrsysmond-config --set license_key=927858b9bde31345614d8ddsss3d656e6cf1e1be
Step 4: Start the New Relic Daemon
Now, you have to start new relic using below command
sudo /etc/init.d/newrelic-sysmond start
Step 5 :New Relic PHP Agent Installation
After daemon start you have install New relic php extension using below code:
sudo yum install newrelic-php5
Here i have install php 5 new relic extension
Step 6: Run the newrelic-install script and follow below instructions.
sudo newrelic-install install
Step 7: Add license key to php
when running newrelic-install install that time asking to add license key and the license key
Step8: Set newrelic.appname in your newrelic.ini file
Now, you have to ser App name at server, which will show on your New relic account.
Goto /etc/php.d/ and find newrelic.ini
Open this files and add APP name which you have want
sudo nano newrelic.ini
Add APP name at newrelic.ini
newrelic.appname = "Centos PHP Application"
Step 9: Restart your web server
sudo apachectl restart
Step 10: Restart New relic
sudo /etc/init.d/newrelic-sysmond restart
Finally
After 30mins-1hrs, YOUR APPLICATION will be new new relic panel.