1、源码安装

  1. 解决依赖问题
configure: error: lzo enabled but missing

wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz
tar -zxvf lzo-2.09.tar.gz
cd lzo-2.09
./configure
make && make install
configure: error: libpam required but missing

yum install pam-devel.x86_64
另外还需要 openssl, openssl-devel 这两个包,如果没安装的话,根据报错,安装该依赖包

yum install openssl openssl-devel
  1. 编译安装
wget https://swupdate.openvpn.org/community/releases/openvpn-2.3.11.tar.gz
tar -zxvf openvpn-2.3.11.tar.gz
./configure --prefix=/usr/local/openvpn
make && make install
%23%23%23%23%201%E3%80%81%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85%0A%0A1.%20%E8%A7%A3%E5%86%B3%E4%BE%9D%E8%B5%96%E9%97%AE%E9%A2%98%0A%0A%60%60%60%0Aconfigure%3A%20error%3A%20lzo%20enabled%20but%20missing%0A%0Awget%20http%3A%2F%2Fwww.oberhumer.com%2Fopensource%2Flzo%2Fdownload%2Flzo-2.09.tar.gz%0Atar%20-zxvf%20lzo-2.09.tar.gz%0Acd%20lzo-2.09%0A.%2Fconfigure%0Amake%20%26%26%20make%20install%0A%60%60%60%0A%0A%60%60%60%0Aconfigure%3A%20error%3A%20libpam%20required%20but%20missing%0A%0Ayum%20install%20pam-devel.x86_64%0A%60%60%60%0A%0A%60%60%60%0A%E5%8F%A6%E5%A4%96%E8%BF%98%E9%9C%80%E8%A6%81%20openssl%2C%20openssl-devel%20%E8%BF%99%E4%B8%A4%E4%B8%AA%E5%8C%85%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%B2%A1%E5%AE%89%E8%A3%85%E7%9A%84%E8%AF%9D%EF%BC%8C%E6%A0%B9%E6%8D%AE%E6%8A%A5%E9%94%99%EF%BC%8C%E5%AE%89%E8%A3%85%E8%AF%A5%E4%BE%9D%E8%B5%96%E5%8C%85%0A%0Ayum%20install%20openssl%20openssl-devel%0A%60%60%60%0A%0A%0A2.%20%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85%0A%60%60%60%0Awget%20https%3A%2F%2Fswupdate.openvpn.org%2Fcommunity%2Freleases%2Fopenvpn-2.3.11.tar.gz%0Atar%20-zxvf%20openvpn-2.3.11.tar.gz%0A.%2Fconfigure%20--prefix%3D%2Fusr%2Flocal%2Fopenvpn%0Amake%20%26%26%20make%20install%0A%60%60%60%0A%0A