1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS8だとSNMP TRAPを受けられない件(net-snmp-perlの最新版をビルドする)

Last updated at Posted at 2020-12-02

2021.1.12 追記

CentOS8.3.2011になってから?
普通にdnf install net-snmp-perlで取ってこれるので下は無視してOK。
なんかバグっている時は参考にしてください。


タイトルまんま。
CentOS8ではyumnet-snmp-perlを持ってくることはできない。
ZABBIXのTrapレシーバはPerlで書かれており、これがないとお話にならない。

以下、RPMビルド手順の覚書。
ところどころ間違っているかもしれないから注意

適当なユーザで最新版ソースを持ってくる

$ mkdir Net-SNMP
$ cd $_
$ git clone https://git.centos.org/centos-git-common.git
$ git clone https://git.centos.org/rpms/net-snmp.git
$ cd net-snmp/
#### 持ってくるソースを確認
$ git tag
#### チェックアウト
$ git checkout imports/c8/net-snmp-5.8-14.el8_2.1

ビルドする

$ sh ../centos-git-common/get_sources.sh
#### できてるか確認。net-snmp-5.8.tar.gzかなんかあるはず
$ ls -l SOURCES/
$ rpmbuild --define "%_topdir `pwd`" --define '%netsnmp_check 0' -ba SPECS/net-snmp.spec 

ビルドにコケたらこれを見て。

ビルドにはこれらが必要だった

$ sudo dnf install bzip2-devel chrpath mariadb-connector-c-debel perl-generators python3-devel python3-setuptools perl-ExtUtils-Embed

インストール!!!

$ cd RPMS/x86_64/
$ sudo dnf install net-snmp-agent-libs-5.8-14.el8.x86_64.rpm net-snmp-devel-5.8-14.el8.x86_64.rpm net-snmp-5.8-14.el8.x86_64.rpm net-snmp-utils-5.8-14.el8.x86_64.rpm net-snmp-libs-5.8-14.el8.x86_64.rpm  net-snmp-perl-5.8-14.el8.x86_64.rpm  --enablerepo epel

たぶんこれでOKなはず

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?