- 安装依赖包
yum install autoconf automake gcc libtasn1-devel zlib zlib-devel trousers trousers-devel gmp-devel gmp xz texinfo libnl-devel libnl tcp_wrappers-libs tcp_wrappers-devel tcp_wrappers dbus dbus-devel ncurses-devel pam-devel readline-devel bison bison-devel flex gcc automake autoconf wget
2. 安装nettle
cd /usr/local/src
wget http://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gztar zxf nettle-2.7.1.tar.gz && cd nettle-2.7.1./configure && make && make install
cd ..
3.安装unbound:
yum install expat-devel
wget http://unbound.nlnetlabs.nl/downloads/unbound-1.4.22.tar.gztar zxf unbound-1.4.22.tar.gz && cd unbound-1.4.22./configure --prefix=/usr --sysconfdir=/etc && make && make install
cd ..
echo ‘/usr/local/lib‘ > /etc/ld.so.conf.d/local-libraries.conf && ldconfig
生成配置文件:unbound-anchor -a "/etc/unbound/root.key"
4.安装 gnutls
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.15.tar.xztar xvf gnutls-3.2.15.tar.xz
cd gnutls-3.2.15
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig ./configure –enable-shared
./configure && make && make install
cd ..
5.安装 LibNL:
wget http://www.carisma.slowglass.com/~tgr/libnl/files/libnl-3.2.24.tar.gztar xvf libnl-3.2.24.tar.gz
cd libnl-3.2.24./configure && make && make install
cd ..
6.安装 Ocserv:
wget ftp://ftp.infradead.org/pub/ocserv/ocserv-0.8.1.tar.xztar xvf ocserv-0.8.1.tar.xz && cd ocserv-0.8.1./configure --prefix=/usr --sysconfdir=/etc && make && make install