infrastructureエージェントの使用を開始する際に最も迅速な方法では、ガイド付きインストールを使用します。EUにお住まいの場合は、EUガイド付きインストールをお試しください。
ヒント
また、infrastructureエージェントを開始するには、設定管理ツールを使用することもできます。
ステップごとの説明
エージェントを手動でインストールできます。Infrastructureをインストールする前に、次の点を確認してください。
- 要件を見直します。
- 有効ながあります。
InfrastructureをLinuxでインストールするには、次の指示に従ってください。
設定ファイルを作成し、を追加します。
bash$echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.ymlディストリビューションのバージョン番号を特定します。
bash$cat /etc/os-releasebash$cat /etc/lsb-releasebash$cat /etc/os-releasebash$cat /etc/os-release | grep VERSION_IDNew RelicのGPGキーを有効にします。
bash$curl -fsSL https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/newrelic-infra.gpgDebian 13 ("trixie")
bash$curl -fsSL https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra-sha256.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/newrelic-infra.gpgbash$curl -fsSL https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/newrelic-infra.gpgyumは
gpgkeyの値を使用して、自動的にGPGキーをインストールします。bash$curl https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg -s | sudo gpg --import重要
zypperパッケージマネージャには、旧バージョンのSLESではGPGキーが予期したとおりに検証されない可能性があるという既知の問題があります。
Signature verification failedなどのエラーが発生した場合は、Infrastructureエージェントをバージョン1.44.0以降に更新してください。infrastructureエージェントリポジトリを追加します。
Debian 11 ("Bullseye")
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt bullseye main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listDebian 12 ("Bookworm")
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt bookworm main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listDebian 13 ("trixie")
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt trixie main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listUbuntu 18.04 LTS (Bionic Beaver)
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt bionic main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listUbuntu 20.04 LTS (Focal Fossa)
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt focal main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listUbuntu 20.10 (Groovy Gorilla)
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt groovy main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listUbuntu 21.04 (Hirsute Hippo)
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt hirsute main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listUbuntu 22.04 (Jammy Jellyfish)
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt/ jammy main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listUbuntu 24.04 (Noble Numbat)
bash$echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt/ noble main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.listAmazon Linux 2 (x86)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/amazonlinux/2/x86_64/newrelic-infra.repoAmazon Linux 2 (arm64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/amazonlinux/2/aarch64/newrelic-infra.repoAmazon Linux 2023 (x86)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/amazonlinux/2023/x86_64/newrelic-infra.repoAmazon Linux 2023 (arm64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/amazonlinux/2023/aarch64/newrelic-infra.repoCentOS, RHEL, Oracle Linux 7.x (x86)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repoCentOS RHEL, Oracle Linux 7.x (arm64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/aarch64/newrelic-infra.repoCentOS, RHEL, RockyLinux, AlmaLinux, and Oracle Linux 8.x (x86)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repoCentOS, RHEL, RockyLinux, AlmaLinux, and Oracle Linux 8.x (arm64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/aarch64/newrelic-infra.repoRockyLinux, AlmaLinux and RHEL 9.x (x86)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/9/x86_64/newrelic-infra.repoRockyLinux, AlmaLinux and RHEL 9.x (arm64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/9/aarch64/newrelic-infra.repoRockyLinux, AlmaLinux and RHEL 10.x (x86_64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/10/x86_64/newrelic-infra.repoRockyLinux, AlmaLinux and RHEL 10.x (arm64)
bash$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/10/aarch64/newrelic-infra.repoSLES 12.5 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.5/x86_64/newrelic-infra.repoSLES 12.5 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/12.5/aarch64/newrelic-infra.repoSLES 15.2 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.2/x86_64/newrelic-infra.repoSLES 15.2 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.2/aarch64/newrelic-infra.repoSLES 15.3 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.3/x86_64/newrelic-infra.repoSLES 15.3 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.3/aarch64/newrelic-infra.repoSLES 15.4 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.4/x86_64/newrelic-infra.repoSLES 15.4 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.4/aarch64/newrelic-infra.repoSLES 15.5 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.5/x86_64/newrelic-infra.repoSLES 15.5 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.5/aarch64/newrelic-infra.repoSLES 15.6 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.6/x86_64/newrelic-infra.repoSLES 15.6 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.6/aarch64/newrelic-infra.repoSLES 15.7 (x86)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.7/x86_64/newrelic-infra.repoSLES 15.7 (ARM)
bash$sudo curl -o /etc/zypp/repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/zypp/sles/15.7/aarch64/newrelic-infra.repoリポジトリを更新します:
bash$sudo apt-get updatebash$sudo apt-get updatebash$sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'bash$sudo zypper -n ref -r newrelic-infranewrelic-infraパッケージをルート(デフォルト)または特権、非特権ユーザーモードでインストールします。各実行モードの詳細については、Linuxエージェントの実行モードを参照してください。
Debian and
Ubuntu:bash$sudo apt-get install newrelic-infra -y
Amazon Linux,
CentOS,
Rocky Linux,
RHEL,
AlmaLinux & Oracle Linux:bash$sudo yum install newrelic-infra -y
SLES:
bash$sudo zypper -n install newrelic-infra
libcapライブラリをインストールし、
NRIA_MODE環境変数をPRIVILEGEDに設定します。
Debian and
Ubuntu:bash$sudo apt-get install libcap2-binbash$sudo NRIA_MODE="PRIVILEGED" apt-get install newrelic-infra
Amazon Linux,
CentOS,
Rocky Linux,
RHEL,
AlmaLinux & Oracle Linux:bash$sudo yum install libcapbash$sudo NRIA_MODE="PRIVILEGED" yum install newrelic-infra
SLES:
bash$sudo zypper install libcap-progsbash$sudo NRIA_MODE="PRIVILEGED" zypper install newrelic-infra
libcapライブラリをインストールし、
NRIA_MODE環境変数をUNPRIVILEGEDに設定します。
Debian and
Ubuntu:bash$sudo apt-get install libcap2-binbash$sudo NRIA_MODE="UNPRIVILEGED" apt-get install newrelic-infra
Amazon Linux,
CentOS,
Rocky Linux,
RHEL,
AlmaLinux & Oracle Linux:bash$sudo yum install libcapbash$sudo NRIA_MODE="UNPRIVILEGED" yum install newrelic-infra
SLES:
bash$sudo zypper install libcap-progsbash$sudo NRIA_MODE="UNPRIVILEGED" zypper install newrelic-infra
infrastructureエージェントをインストールまたはアップデートした後、エージェントのステータスを開始、停止、または確認できます。
エージェントの更新
標準的な手順に従って、infrastructureエージェントをアップデートしてください。
sudoを使用してエージェントのインストールもしくはアップデートを行う場合、-E引数を使用して環境変数の無視を許可するか、NRIA_MODE直後のsudo環境変数を指定します。
$export NRIA_MODE="SET_MODE_HERE"または
$sudo -E YOUR_PACKAGE_MANAGER_UPDATE_COMMAND次のステップ
トラフィックが生成されてから数分待ってから、New Relic UIでホストを確認します。データが表示されない場合、必要に応じてトラブルシューティングプロセスに従ってください。
重要
インストール対象サーバーのホスト名にlocalhostは使用できません。ホスト名がlocalhostのサーバーに対して、データはレポートされません。必ず、ホスト名には固有の名前をつけましょう。
必須の設定オプションは、license_key設定だけです。これは、インストレーション手順の一環として作成されます。次の設定も可能です。
- ホストデータを使用してアラートイベントのトラブルシューティングを行う方法を説明します。
- カスタムアトリビュートを追加して、Infrastructureデータに注釈を付けます。
- AWSアカウントを接続します(お使いのサーバーがAmazon EC2上で稼働している場合)。
- ログフォワーディングを有効にします。
- 他のNew Relic Infrastructureインテグレーションを追加して、外部サービスからデータを収集します。