Add Oracle Linux
- Add support for Oracle Linux 8 and 7.
This commit is contained in:
parent
9e58aace48
commit
629b39d3b3
@ -41,6 +41,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -70,8 +71,8 @@ check_os() {
|
||||
*)
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
Ubuntu, Debian, CentOS/RHEL 7/8, Rocky Linux, AlmaLinux,
|
||||
Amazon Linux 2 or Alpine Linux
|
||||
Ubuntu, Debian, CentOS/RHEL, Rocky Linux, AlmaLinux,
|
||||
Oracle Linux, Amazon Linux 2 or Alpine Linux
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to set up and manage IKEv2 on Ubuntu, Debian, CentOS/RHEL,
|
||||
# Rocky Linux, AlmaLinux, Amazon Linux 2 and Alpine Linux
|
||||
# Script to set up and manage IKEv2 on Ubuntu, Debian, CentOS/RHEL, Rocky Linux,
|
||||
# AlmaLinux, Oracle Linux, Amazon Linux 2 and Alpine Linux
|
||||
#
|
||||
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC!
|
||||
#
|
||||
@ -52,6 +52,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -81,8 +82,8 @@ check_os() {
|
||||
*)
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
Ubuntu, Debian, CentOS/RHEL 7/8, Rocky Linux, AlmaLinux,
|
||||
Amazon Linux 2 or Alpine Linux
|
||||
Ubuntu, Debian, CentOS/RHEL, Rocky Linux, AlmaLinux,
|
||||
Oracle Linux, Amazon Linux 2 or Alpine Linux
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Quick start script to set up an IPsec VPN server on Ubuntu, Debian,
|
||||
# CentOS/RHEL, Rocky Linux, AlmaLinux, Amazon Linux 2 and Alpine Linux
|
||||
# Quick start script to set up an IPsec VPN server on Ubuntu, Debian, CentOS/RHEL,
|
||||
# Rocky Linux, AlmaLinux, Oracle Linux, Amazon Linux 2 and Alpine Linux
|
||||
# Works on any dedicated server or virtual private server (VPS)
|
||||
#
|
||||
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC!
|
||||
@ -77,6 +77,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -109,8 +110,8 @@ check_os() {
|
||||
*)
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
Ubuntu, Debian, CentOS/RHEL 7/8, Rocky Linux, AlmaLinux,
|
||||
Amazon Linux 2 or Alpine Linux
|
||||
Ubuntu, Debian, CentOS/RHEL, Rocky Linux, AlmaLinux,
|
||||
Oracle Linux, Amazon Linux 2 or Alpine Linux
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
@ -254,7 +255,8 @@ install_pkgs() {
|
||||
get_setup_url() {
|
||||
base_url="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master"
|
||||
sh_file="vpnsetup_ubuntu.sh"
|
||||
if [ "$os_type" = "centos" ] || [ "$os_type" = "rhel" ] || [ "$os_type" = "rocky" ] || [ "$os_type" = "alma" ]; then
|
||||
if [ "$os_type" = "centos" ] || [ "$os_type" = "rhel" ] || [ "$os_type" = "rocky" ] \
|
||||
|| [ "$os_type" = "alma" ] || [ "$os_type" = "ol" ]; then
|
||||
sh_file="vpnsetup_centos.sh"
|
||||
elif [ "$os_type" = "amzn" ]; then
|
||||
sh_file="vpnsetup_amzn.sh"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to uninstall IPsec VPN on Ubuntu, Debian, CentOS/RHEL,
|
||||
# Rocky Linux, AlmaLinux, Amazon Linux 2 and Alpine Linux
|
||||
# Script to uninstall IPsec VPN
|
||||
#
|
||||
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC!
|
||||
#
|
||||
@ -40,6 +39,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file"; then
|
||||
grep -qi rocky "$rh_file" && os_type=rocky
|
||||
grep -qi alma "$rh_file" && os_type=alma
|
||||
@ -64,8 +64,8 @@ check_os() {
|
||||
*)
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
Ubuntu, Debian, CentOS/RHEL 7/8, Rocky Linux, AlmaLinux,
|
||||
Amazon Linux 2 or Alpine Linux
|
||||
Ubuntu, Debian, CentOS/RHEL, Rocky Linux, AlmaLinux,
|
||||
Oracle Linux, Amazon Linux 2 or Alpine Linux
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to update Libreswan on Ubuntu, Debian, CentOS/RHEL, Rocky Linux,
|
||||
# AlmaLinux, Amazon Linux 2 and Alpine Linux
|
||||
# AlmaLinux, Oracle Linux, Amazon Linux 2 and Alpine Linux
|
||||
#
|
||||
# The latest version of this script is available at:
|
||||
# https://github.com/hwdsl2/setup-ipsec-vpn
|
||||
@ -42,6 +42,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -74,8 +75,8 @@ check_os() {
|
||||
*)
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
Ubuntu, Debian, CentOS/RHEL 7/8, Rocky Linux, AlmaLinux,
|
||||
Amazon Linux 2 or Alpine Linux
|
||||
Ubuntu, Debian, CentOS/RHEL, Rocky Linux, AlmaLinux,
|
||||
Oracle Linux, Amazon Linux 2 or Alpine Linux
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
@ -135,7 +136,8 @@ install_pkgs() {
|
||||
get_setup_url() {
|
||||
base_url="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras"
|
||||
sh_file="vpnupgrade_ubuntu.sh"
|
||||
if [ "$os_type" = "centos" ] || [ "$os_type" = "rhel" ] || [ "$os_type" = "rocky" ] || [ "$os_type" = "alma" ]; then
|
||||
if [ "$os_type" = "centos" ] || [ "$os_type" = "rhel" ] || [ "$os_type" = "rocky" ] \
|
||||
|| [ "$os_type" = "alma" ] || [ "$os_type" = "ol" ]; then
|
||||
sh_file="vpnupgrade_centos.sh"
|
||||
elif [ "$os_type" = "amzn" ]; then
|
||||
sh_file="vpnupgrade_amzn.sh"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to update Libreswan on CentOS/RHEL, Rocky Linux and AlmaLinux
|
||||
# Script to update Libreswan on CentOS/RHEL, Rocky Linux, AlmaLinux and Oracle Linux
|
||||
#
|
||||
# The latest version of this script is available at:
|
||||
# https://github.com/hwdsl2/setup-ipsec-vpn
|
||||
@ -45,6 +45,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -56,7 +57,11 @@ check_os() {
|
||||
exiterr "CentOS Linux 8 is EOL and not supported."
|
||||
fi
|
||||
else
|
||||
exiterr "This script only supports CentOS/RHEL 7/8, Rocky Linux and AlmaLinux."
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
CentOS/RHEL, Rocky Linux, AlmaLinux or Oracle Linux
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@ -162,6 +167,12 @@ install_pkgs_2() {
|
||||
rp1="$erp=*server-*optional*"
|
||||
rp2="$erp=*releases-optional*"
|
||||
rp3="$erp=[Pp]ower[Tt]ools"
|
||||
if [ "$os_type" = "ol" ] && [ "$os_ver" = "8" ]; then
|
||||
rp3="$erp=ol8_codeready_builder"
|
||||
fi
|
||||
if [ "$os_type" = "ol" ] && [ "$os_ver" = "7" ]; then
|
||||
rp2="$erp=ol7_optional_latest"
|
||||
fi
|
||||
[ "$os_type" = "rhel" ] && rp3="$erp=codeready-builder-for-rhel-8-*"
|
||||
if [ "$os_ver" = "7" ]; then
|
||||
(
|
||||
|
12
vpnsetup.sh
12
vpnsetup.sh
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script for automatic setup of an IPsec VPN server on Ubuntu, Debian,
|
||||
# CentOS/RHEL, Rocky Linux, AlmaLinux, Amazon Linux 2 and Alpine Linux
|
||||
# Script for automatic setup of an IPsec VPN server on Ubuntu, Debian, CentOS/RHEL,
|
||||
# Rocky Linux, AlmaLinux, Oracle Linux, Amazon Linux 2 and Alpine Linux
|
||||
# Works on any dedicated server or virtual private server (VPS)
|
||||
#
|
||||
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC!
|
||||
@ -77,6 +77,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -109,8 +110,8 @@ check_os() {
|
||||
*)
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
Ubuntu, Debian, CentOS/RHEL 7/8, Rocky Linux, AlmaLinux,
|
||||
Amazon Linux 2 or Alpine Linux
|
||||
Ubuntu, Debian, CentOS/RHEL, Rocky Linux, AlmaLinux,
|
||||
Oracle Linux, Amazon Linux 2 or Alpine Linux
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
@ -254,7 +255,8 @@ install_pkgs() {
|
||||
get_setup_url() {
|
||||
base_url="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master"
|
||||
sh_file="vpnsetup_ubuntu.sh"
|
||||
if [ "$os_type" = "centos" ] || [ "$os_type" = "rhel" ] || [ "$os_type" = "rocky" ] || [ "$os_type" = "alma" ]; then
|
||||
if [ "$os_type" = "centos" ] || [ "$os_type" = "rhel" ] || [ "$os_type" = "rocky" ] \
|
||||
|| [ "$os_type" = "alma" ] || [ "$os_type" = "ol" ]; then
|
||||
sh_file="vpnsetup_centos.sh"
|
||||
elif [ "$os_type" = "amzn" ]; then
|
||||
sh_file="vpnsetup_amzn.sh"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script for automatic setup of an IPsec VPN server on CentOS/RHEL,
|
||||
# Rocky Linux and AlmaLinux
|
||||
# Script for automatic setup of an IPsec VPN server on CentOS/RHEL, Rocky Linux,
|
||||
# AlmaLinux and Oracle Linux
|
||||
# Works on any dedicated server or virtual private server (VPS)
|
||||
#
|
||||
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC!
|
||||
@ -71,6 +71,7 @@ check_os() {
|
||||
if grep -qs "Red Hat" "$rh_file"; then
|
||||
os_type=rhel
|
||||
fi
|
||||
[ -f /etc/oracle-release ] && os_type=ol
|
||||
if grep -qs "release 7" "$rh_file"; then
|
||||
os_ver=7
|
||||
elif grep -qs "release 8" "$rh_file"; then
|
||||
@ -82,7 +83,11 @@ check_os() {
|
||||
exiterr "CentOS Linux 8 is EOL and not supported."
|
||||
fi
|
||||
else
|
||||
exiterr "This script only supports CentOS/RHEL 7/8, Rocky Linux and AlmaLinux."
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
CentOS/RHEL, Rocky Linux, AlmaLinux or Oracle Linux
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@ -197,8 +202,14 @@ install_vpn_pkgs_1() {
|
||||
rp2="$erp=*server-*optional*"
|
||||
rp3="$erp=*releases-optional*"
|
||||
rp4="$erp=[Pp]ower[Tt]ools"
|
||||
if [ "$os_type" = "ol" ] && [ "$os_ver" = "8" ]; then
|
||||
rp1="$erp=ol8_developer_EPEL"
|
||||
rp4="$erp=ol8_codeready_builder"
|
||||
fi
|
||||
if [ "$os_type" = "ol" ] && [ "$os_ver" = "7" ]; then
|
||||
rp3="$erp=ol7_optional_latest"
|
||||
fi
|
||||
[ "$os_type" = "rhel" ] && rp4="$erp=codeready-builder-for-rhel-8-*"
|
||||
|
||||
(
|
||||
set -x
|
||||
yum -y -q install nss-devel nspr-devel pkgconfig pam-devel \
|
||||
|
Loading…
Reference in New Issue
Block a user