2021.1.12 追記
CentOS8.3.2011になってから?
普通にdnf install net-snmp-perl
で取ってこれるので下は無視してOK。
なんかバグっている時は参考にしてください。
タイトルまんま。
CentOS8ではyum
でnet-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なはず