Shrew VPN 编译安装

来源:互联网 发布:mac shift切换中英文 编辑:程序博客网 时间:2024/05/18 08:54

首先当然是下载源码包:https://www.shrew.net/download/ike

cd ~wget https://www.shrew.net/download/ike/ike-2.2.1-release.tgztar -xvf ./ike-2.2.1-release.tgzcd ./ike
一个好的习惯是先看一下安装说明

$lsCMakeCache.txt       CMakeLists.txt  install_manifest.txt  package     sitesCMakeFiles           CONTRIB.TXT     LICENSE.TXT           <span style="color:#FF0000;">README.TXT</span>  sourcecmake_install.cmake  docs            Makefile              script      TODO.TXT$cat README.TXT...REQUIREMENTS================================================================================This section describes the basic requirements used to compile this software. Inmost cases, development versions of the dependencies will need to be installed.These could be available as pre-compiled packages or compiled directly fromsource.<strong>Minimum(最小安装要求)</strong>--------------------------------------------------------------------------------c++ compilerstock c libsstock c includespthread supportlex or flexlibeditbison >= 2.3cmake >= 2.4opsenssl >= 0.9.x<strong>Optional(可选)</strong>--------------------------------------------------------------------------------TrollTech QT >= 4.2      //GUI界面必需openldap >= 2.0          //ldap认证The Trolltech QT toolkit version 4.2.x or higher is also required if you planto build the QT client front end applications. The openldap support is onlyuseful if you plan to use iked to facilitate VPN client gateway connectivityand require xauth support via an external LDAP database....================================================================================OPTIONS(安装选项)================================================================================In addition to the standard CMake options such as CMAKE_INSTALL_PREFIX, a fewadditional build parameters may be specified. Here is a brief list ...DEBUG   Enable Debug SymbolsTESTS   Enable Library Tests BuildQTGUI   Enable Client QT GUINATT    Enable Nat Traversal SupportLDAP    Enable LDAP Authentication SupportETCDIR  Custom etc configuration install pathBINDIR  Custim user bin install pathSBINDIR Custim user sbin install pathLIBDIR  Custom user lirbrary install pathMANDIR  Custom man page install pathKRNINC  Kernel include pathFor example: enter the following to build and install the software with a fewcommon options enabled ...<strong>//安装方法示例cmake -DDEBUG=YES -DQTGUI=YES -DNATT=YES -DLDAP=YESmakemake install</strong>

好了,现在明白需要做的准备,下面开始正式编译安装过程(CentOS 6.5):

yum -y groupinstall "develop*"yum -y install cmakeyum -y install libedit bison opsenssl#yum -y install qt4                   //如需GUI界面cd ./ikecmake -DDEBUG=YES -DQTGUI=YES -DNATT=YES -DLDAP=NO -DETCDIR=/etc //(不指定默认将配置文件安装到/usr/etc)make && make installmv /etc/iked.conf.sample /etc/iked.conf

在Centos 5上面将缺少libedit的包,需要先手动编译安装libedit:

wget http://thrysoee.dk/editline/libedit-20140620-3.1.tar.gztar -xvf libedit-20140620-3.1.tar.gzcd ./libedit-20140620-3.1make && make installecho '/usr/local/lib' >> /etc/ld.so.confldconfig

成功安装后启动iked。然后运行qikea进入图形配置界面。

vpn连接配置文件将储存在~/.ike/sites目录下。

ikec为cli下的连接程序,使用方法为

ikec -r [config] -u [user] -p [password] -a
注意配置文件必需存在,不然程序会出错退出。

0 0
原创粉丝点击