ZABBIX 3.2 Agent コンパイルインストール手順(CentOS7 + Raspberry Pi3)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
目次~
#Contents
*概要 [#f0caed9a]
**前提 [#fdd6a5e9]
Raspberry Pi 3(ARMv7)向けのZabbix Agentはパッケージが存...
**環境 [#d91ab439]
|Hardware|Raspberry Pi 3 Model B|
|CPU|ARMv7 Processor rev 4 (v7l)|
|OS|CentOS Linux release 7.2.1511 (Core) |
|ZABBIX|zabbix-3.2.2|
*導入手順 [#vdba311d]
**環境準備 [#r2b518f2]
初期状態ではコンパイラが含まれていないため、gccのパッケー...
yum install gcc
========================================================...
Package Arch Ver...
========================================================...
Installing:
gcc armv7hl 4.8...
Installing for dependencies:
cpp armv7hl 4.8...
libatomic armv7hl 4.8...
libgomp armv7hl 4.8...
libmpc armv7hl 1.0...
mpfr armv7hl 3.1...
Updating for dependencies:
libgcc armv7hl 4.8...
Transaction Summary
========================================================...
Install 1 Package (+5 Dependent packages)
Upgrade ( 1 Dependent package)
**ユーザ作成 [#d211f429]
エージェントプログラムを稼動させる専用のユーザを作成する。
groupadd -g 300 zabbix
useradd -u 300 -g zabbix -d /var/empty -s /sbin/nologin ...
**ディレクトリ作成 [#y4589b3e]
デーモンを動作させる上で必要なディレクトリを作成する。
mkdir /etc/zabbix
mkdir /var/run/zabbix
mkdir /var/log/zabbix
touch /var/log/zabbix/zabbix_agent.log
chown -fR zabbix.zabbix /var/run/zabbix
chown -fR zabbix.zabbix /var/log/zabbix
**コンパイル [#k1af3a09]
Zabbixのソースコードは、configure内にエージェントのソース...
tar xfvz zabbix-3.2.2.tar.gz
cd zabbix-3.2.2
configureオプションでエージェントのコンパイルのみを指定す...
./configure --enable-agent
make
make install
設定ファイルを所定位置に配置する
cd /usr/local/src/zabbix
cp ./misc/conf/zabbix_agentd.conf /etc/zabbix/
**サービス登録 [#jf01f674]
systemd向けの設定は同梱されていないため、手動で作成する。
cat <<EOF > /usr/lib/systemd/system/zabbix-agent.service
[Unit]
Description=Zabbix Agentd
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/zabbix_agentd -c /etc/zabbi...
PIDFile=/var/run/zabbix/zabbix_agentd.pid
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
自動起動を設定。
systemctl enable zabbix-agent.service
**起動 [#a1221e20]
エージェントを起動する。
systemctl start zabbix-agent.service
systemctl status zabbix-agent.service
*参考 [#g78487f0]
**エラー [#jeb79709]
configure実行時に以下のエラーが出る場合、gccが導入されて...
yumでgccのパッケージをインストールする。~
# ./configure --enable-agent
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
configure: Configuring Zabbix 3.2.2
checking whether make sets $(MAKE)... (cached) yes
checking build system type... armv7l-unknown-linux-gnuea...
checking host system type... armv7l-unknown-linux-gnueab...
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/zabbix-3.2.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
終了行:
目次~
#Contents
*概要 [#f0caed9a]
**前提 [#fdd6a5e9]
Raspberry Pi 3(ARMv7)向けのZabbix Agentはパッケージが存...
**環境 [#d91ab439]
|Hardware|Raspberry Pi 3 Model B|
|CPU|ARMv7 Processor rev 4 (v7l)|
|OS|CentOS Linux release 7.2.1511 (Core) |
|ZABBIX|zabbix-3.2.2|
*導入手順 [#vdba311d]
**環境準備 [#r2b518f2]
初期状態ではコンパイラが含まれていないため、gccのパッケー...
yum install gcc
========================================================...
Package Arch Ver...
========================================================...
Installing:
gcc armv7hl 4.8...
Installing for dependencies:
cpp armv7hl 4.8...
libatomic armv7hl 4.8...
libgomp armv7hl 4.8...
libmpc armv7hl 1.0...
mpfr armv7hl 3.1...
Updating for dependencies:
libgcc armv7hl 4.8...
Transaction Summary
========================================================...
Install 1 Package (+5 Dependent packages)
Upgrade ( 1 Dependent package)
**ユーザ作成 [#d211f429]
エージェントプログラムを稼動させる専用のユーザを作成する。
groupadd -g 300 zabbix
useradd -u 300 -g zabbix -d /var/empty -s /sbin/nologin ...
**ディレクトリ作成 [#y4589b3e]
デーモンを動作させる上で必要なディレクトリを作成する。
mkdir /etc/zabbix
mkdir /var/run/zabbix
mkdir /var/log/zabbix
touch /var/log/zabbix/zabbix_agent.log
chown -fR zabbix.zabbix /var/run/zabbix
chown -fR zabbix.zabbix /var/log/zabbix
**コンパイル [#k1af3a09]
Zabbixのソースコードは、configure内にエージェントのソース...
tar xfvz zabbix-3.2.2.tar.gz
cd zabbix-3.2.2
configureオプションでエージェントのコンパイルのみを指定す...
./configure --enable-agent
make
make install
設定ファイルを所定位置に配置する
cd /usr/local/src/zabbix
cp ./misc/conf/zabbix_agentd.conf /etc/zabbix/
**サービス登録 [#jf01f674]
systemd向けの設定は同梱されていないため、手動で作成する。
cat <<EOF > /usr/lib/systemd/system/zabbix-agent.service
[Unit]
Description=Zabbix Agentd
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/zabbix_agentd -c /etc/zabbi...
PIDFile=/var/run/zabbix/zabbix_agentd.pid
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
自動起動を設定。
systemctl enable zabbix-agent.service
**起動 [#a1221e20]
エージェントを起動する。
systemctl start zabbix-agent.service
systemctl status zabbix-agent.service
*参考 [#g78487f0]
**エラー [#jeb79709]
configure実行時に以下のエラーが出る場合、gccが導入されて...
yumでgccのパッケージをインストールする。~
# ./configure --enable-agent
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
configure: Configuring Zabbix 3.2.2
checking whether make sets $(MAKE)... (cached) yes
checking build system type... armv7l-unknown-linux-gnuea...
checking host system type... armv7l-unknown-linux-gnueab...
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/zabbix-3.2.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
ページ名: