如何在亚马逊 linux 上安装新的遗物

问题描述

我已经将 newrelic 文件解压到 amazon linux 上,并且有 installer.sh 和 config_defaults.sh

我在参数存储中有许可证密钥,我可以调用

我使用以下命令安装 newrelic

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

APPIKEY 来自参数存储的地方。 但是当我做 sudo systemctl start newrelic-infra

我收到错误信息

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"

如何让代理识别许可证密钥?

解决方法

您似乎正在按照手动或辅助 tarball 安装流程在 Amazon Linux 2 主机上安装基础设施代理。请注意,并非所有功能和集成都适用于该设置。

New Relic 在 Web 界面中提供了 linux 软件包和逐步安装(请参阅 New Relic One Web 中的“添加更多数据”)。

Amazon Linux 2 的标准安装步骤是:

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

以下是解释不同安装方案的 documentation
您可以在 Explorers Hub 上从社区获得更多支持。