背景
需要在centos服务器上通过vpn连接到一个网络,之后再进行网络通讯。
安装过程
安装基础依赖项
yum install gcc
yum install gcc-c++
yum install openssl*
yum install pam-devel.x86_64
安装lzo
lzo 下载地址: http://www.oberhumer.com/opensource/lzo/download/
wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
tar -xvzf lzo-2.10.tar.gz
cd lzo-2.10
./configure
make&&make install
安装openvpn
openvpn 下载地址: https://build.openvpn.net/downloads/releases
wget https://build.openvpn.net/downloads/releases/openvpn-2.5.0.tar.gz
tar -xvzf openvpn-2.5.0.tar.gz
cd openvpn-2.5.0
./configure --prefix=/usr/local/ --with-lzo-headers=/usr/local/include --with-lzo-lib=/usr/local/lib
make&&make install
查看结果
openvpn --version
链接vpn
openvpn --daemon --config xxxx.ovpn --log-append /var/log/openvpn.log