Openvpn安装解读openvpn-install.sh

环境

Centos

openvpn-install.sh 代码中,执行如下代码,安装 openvpn server

yum install -y epel-release
yum install -y openvpn iptables openssl wget ca-certificates curl tar 'policycoreutils-python*'

Tips:

如果熟悉代码,可以删除已安装的包,或不需要的包,比如 tar 、 iptables

easy-rsa 用于加密

如果没有安装,则会从 Github 上下载源码进行编辑安装,注意网络

local version="3.1.2"
wget -O ~/easy-rsa.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v${version}/EasyRSA-${version}.tgz
mkdir -p /etc/openvpn/easy-rsa
tar xzf ~/easy-rsa.tgz --strip-components=1 --no-same-owner --directory /etc/openvpn/easy-rsa