Skip to content

Commit

Permalink
修改几个bug
Browse files Browse the repository at this point in the history
epel源的问题
  • Loading branch information
91yun committed May 3, 2016
1 parent f0f1c74 commit 3049c78
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions vpn_centos_pptpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ function installVPN(){
#判断centos版本
yum install redhat-lsb -y
yum install wget vim curl -y
yum install epel-release
ver1str="lsb_release -rs | awk -F '.' '{ print \$1}'"
ver1=$(eval $ver1str)
if [ "$ver1" == "6" ]; then
rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
elif [ "$ver1" == "5" ]; then
rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
elif [ "$ver1" == "7" ]; then
rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
if [ "$ver1" == "7" ]; then
#centos7要安装iptables把默认防火墙关了。
yum install iptables-services -y
systemctl stop firewalld.service
systemctl disable firewalld.service
yum install iptables-services -y
#centos7需要加这个权限,否则不会开机自动执行
chmod +x /etc/rc.d/rc.local
fi
Expand All @@ -35,7 +31,7 @@ function installVPN(){



rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm
#rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm
yum install -y ppp pptpd

#写配置文件
Expand Down

0 comments on commit 3049c78

Please sign in to comment.