strongSwan的编译安装

基于全新安装的ubuntu 18.04系统。

# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l


首先安装必要的编译工具:

# apt-get update
# apt-get install build-essential
# apt-get install autoconf

如果没有显示的禁用GNU MP(libgmp)加密插件,需要安装libgmp库,GMP插件目前是默认启用的。

# apt-get install libgmp-dev

安装strongSwan编译需要用到的工具,Makefile将使用一下工具生成部分C语言文件,所以必须要configure之前安装这些工具,以免Makefile找不到这些工具的路径。

# apt-get install gperf
# apt-get install flex
# apt-get install bison

例如src/starter/Makefile,如果系统没有gperf工具,configure生成的Makefile文件中GPERF变量为空,导致keywords.c文件为空文件。可在安装gperf之后,重新configure一下,另外要删除之前产生的keywords.c空文件。

GPERF = /usr/bin/gperf

keywords.c: $(srcdir)/keywords.txt keywords.h
        $(AM_V_GEN) \
        $(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@

克隆clone代码:

$ git clone git://git.strongswan.org/strongswan.git

采用默认的configure,不加选项:
$ ./configure

 strongSwan will be built with the following plugins
-----------------------------------------------------
libstrongswan: aes des rc2 sha2 sha1 md5 mgf1 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem fips-prf gmp curve25519 xcbc cmac hmac
libcharon:     attr kernel-netlink resolve socket-default stroke vici updown xauth-generic counters
libtnccs:     
libtpmtss:  

最后执行编译安装

$ make install

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值