環境
CentOS 6.x 32 位/64 位
XEN/KVM/OpenVZ
步驟
依次執行下列命令

#wget http://www.hi-vps.com/shell/vpn_centos6.sh
#chmod a+x vpn_centos6.sh

安裝 Centos6.2PPTPVPN 指令碼

#bash vpn_centos6.sh

執行完後有 1 、 2 、 3 種英文,對應如下中文意思。

1. 安裝 VPN 服務
2. 修復 VPN
3. 新增 VPN 使用者

我們要安裝 PPTP vpn,當然輸入 1,然後 enter 鍵了。等待安裝完成,就會出現賬號和密碼啦,預設賬號是 vpn,密碼是一串隨機數字,自己用的話就不用加賬號和密碼了,複製下來備用吧。安裝完成如下:
 

DKMS: add Completed.
Module build for the currently running kernel was skipped
since the kernel source for this kernel does not seem to be
installed.
kernel_ppp_mppe-1.0.2-3dkms.noarch
warning: ppp-2.4.5-17.0.rhel6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 862acc42: NOKEY
Preparing…                ########################################### [100%]
   1:ppp                    ########################################### [100%]
warning: pptpd-1.3.4-2.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 862acc42: NOKEY
Preparing…                ########################################### [100%]
   1:pptpd                  ########################################### [100%]
mknod: “/dev/ppp”: 檔案已存在
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
Starting pptpd:                                            [  OK  ]
VPN service is installed, your VPN username is vpn, VPN password is 7OXoJ0V1