Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
510 views
in Technique[技术] by (71.8m points)

bash - How to install new relic on amazon linux

I have have unzipped newrelic files onto amazon linux and have both the installer.sh and config_defaults.sh

I have the license key in the parameter store which I am able to call

I install newrelic with the following command

sudo ./installer.sh GENERATE_CONFIG=true LICENSE_KEY=$APIKEY
sudo systemctl start newrelic-infra # to start the service

Where APPIKEY comes from the parameter store. However when I do sudo systemctl start newrelic-infra

I get error message

level=error msg="can't load configuration file" component="New Relic Infrastructure Agent" error="no license key, please add it to agent's config file or NRIA_LICENSE_KEY environment variable"

How can I make the agent recognize the license key?

question from:https://stackoverflow.com/questions/65916364/how-to-install-new-relic-on-amazon-linux

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems you are installing the infrastructure agent on a Amazon Linux 2 host by following the manual or assisted tarball installation flow. Note that not all features and integrations are available with that setup.

New Relic provides linux packages and a step by step installation in the web interface (see "Add more data" in the New Relic One web).

The standard installation steps for Amazon Linux 2 would be:

echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml && 

sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo && 

sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' && 

sudo yum install newrelic-infra -y

Here's the documentation explaining the different install scenarios.
You can get additional support from the community on the Explorers Hub.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...