前言

我们的目标是编译安装最新版本的nftables而非yum内的0.8,因为0.8是17年的版本了,GoEdge的需求版本是0.9以上

环境:

centos7系统
一、安装环境
安装依赖<code>libmnl 、libnftnl</code>编译安装最新版

yum -y install gcc libtool
git clone https://git.netfilter.org/libmnl/
cd libmnl/
git checkout libmnl-1.0.4
./autogen.sh
./configure
make
make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
cd ..
git clone https://git.netfilter.org/libnftnl/
cd libnftnl/
./autogen.sh
./configure
make 
make install

安装Configure编译所需要的包

yum install -y yasm libuuid-devel libblkid-devel libudev-devel cryptopp-devel fuse-devel libunwind-devel libedit-devel libatomic_ops-devel snappy-devel leveldb-devel libaio-devel xfsprogs-devel boost* bison flex

二、编译安装nftables

cd /root
yum -y install asciidoc gmp-devel
git clone git://git.netfilter.org/nftables
cd nftables
./autogen.sh
./configure
make
make install
nft -v

转载来自 记录安装nftables最新版过程 - HIM的博客

Last modification:February 2, 2023
如果觉得我的文章对你有用,请随意赞赏