adding alma linux 9.3 support
This commit is contained in:
parent
9cf05be18f
commit
be2c961a62
|
|
@ -263,6 +263,8 @@ elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then
|
|||
Server_OS="RedHat"
|
||||
elif grep -q "AlmaLinux-8" /etc/os-release ; then
|
||||
Server_OS="AlmaLinux"
|
||||
elif grep -q "AlmaLinux-9" /etc/os-release ; then
|
||||
Server_OS="AlmaLinux"
|
||||
elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
|
||||
Server_OS="CloudLinux"
|
||||
elif grep -q -E "Rocky Linux" /etc/os-release ; then
|
||||
|
|
@ -273,8 +275,8 @@ elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then
|
|||
Server_OS="openEuler"
|
||||
else
|
||||
echo -e "Unable to detect your system..."
|
||||
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
|
||||
Debug_Log2 "CyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]"
|
||||
echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, AlmaLinux 9, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
|
||||
Debug_Log2 "CyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, AlmaLinux 9, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
@ -864,7 +866,7 @@ EOF
|
|||
dnf config-manager --set-enabled PowerTools > /dev/null 2>&1
|
||||
dnf config-manager --set-enabled powertools > /dev/null 2>&1
|
||||
|
||||
|
||||
|
||||
# cat <<EOF >/etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo
|
||||
#[powertools-for-cyberpanel]
|
||||
#name=CentOS Linux \$releasever - PowerTools
|
||||
|
|
@ -1066,7 +1068,7 @@ else
|
|||
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y cron inetutils-ping
|
||||
Check_Return
|
||||
# Oracle Ubuntu ARM misses ping and cron
|
||||
# Oracle Ubuntu ARM misses ping and cron
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y locales
|
||||
locale-gen "en_US.UTF-8"
|
||||
|
|
@ -1184,11 +1186,11 @@ if ! grep -q "pid_max" /etc/rc.local 2>/dev/null ; then
|
|||
echo 1 > /sys/kernel/mm/ksm/run" >>/etc/rc.d/rc.local
|
||||
chmod +x /etc/rc.d/rc.local
|
||||
else
|
||||
if [[ -f /etc/rc.local ]] ; then
|
||||
if [[ -f /etc/rc.local ]] ; then
|
||||
echo -e "#!/bin/bash\n$(cat /etc/rc.local)" > /etc/rc.local
|
||||
else
|
||||
else
|
||||
echo "#!/bin/bash" > /etc/rc.local
|
||||
fi
|
||||
fi
|
||||
echo "echo 1000000 > /proc/sys/kernel/pid_max
|
||||
echo 1 > /sys/kernel/mm/ksm/run" >>/etc/rc.local
|
||||
chmod +x /etc/rc.local
|
||||
|
|
|
|||
68
install.sh
68
install.sh
|
|
@ -3,67 +3,73 @@
|
|||
OUTPUT=$(cat /etc/*release)
|
||||
if echo $OUTPUT | grep -q "CentOS Linux 7" ; then
|
||||
echo "Checking and installing curl and wget"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
SERVER_OS="CentOS"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
SERVER_OS="CentOS"
|
||||
elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then
|
||||
echo -e "\nDetecting Centos 8...\n"
|
||||
SERVER_OS="CentOS8"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
elif echo $OUTPUT | grep -q "CentOS Stream" ; then
|
||||
echo -e "\nDetecting CentOS Stream...\n"
|
||||
SERVER_OS="CentOS9"
|
||||
yum install wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
yum install wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
elif echo $OUTPUT | grep -q "Red Hat Enterprise Linux" ; then
|
||||
echo -e "\nDetecting Red Hat Enterprise Linux...\n"
|
||||
SERVER_OS="RHEL"
|
||||
yum install wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
|
||||
echo -e "\nDetecting AlmaLinux 8...\n"
|
||||
SERVER_OS="CentOS8"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
elif echo $OUTPUT | grep -q "AlmaLinux 9.3" ; then
|
||||
echo -e "\nDetecting AlmaLinux 9.3...\n"
|
||||
SERVER_OS="CentOS9"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
elif echo $OUTPUT | grep -q "CloudLinux 7" ; then
|
||||
echo "Checking and installing curl and wget"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
SERVER_OS="CloudLinux"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
SERVER_OS="CloudLinux"
|
||||
elif echo $OUTPUT | grep -q "CloudLinux 8" ; then
|
||||
echo "Checking and installing curl and wget"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
SERVER_OS="CloudLinux"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
SERVER_OS="CloudLinux"
|
||||
elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then
|
||||
apt install -y -qq wget curl
|
||||
SERVER_OS="Ubuntu"
|
||||
apt install -y -qq wget curl
|
||||
SERVER_OS="Ubuntu"
|
||||
elif echo $OUTPUT | grep -q "Ubuntu 20.04" ; then
|
||||
apt install -y -qq wget curl
|
||||
SERVER_OS="Ubuntu"
|
||||
apt install -y -qq wget curl
|
||||
SERVER_OS="Ubuntu"
|
||||
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
|
||||
apt install -y -qq wget curl
|
||||
SERVER_OS="Ubuntu"
|
||||
apt install -y -qq wget curl
|
||||
SERVER_OS="Ubuntu"
|
||||
elif echo $OUTPUT | grep -q "openEuler 20.03" ; then
|
||||
echo -e "\nDetecting openEuler 20.03...\n"
|
||||
SERVER_OS="openEuler"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
elif echo $OUTPUT | grep -q "openEuler 22.03" ; then
|
||||
echo -e "\nDetecting openEuler 22.03...\n"
|
||||
SERVER_OS="openEuler"
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
yum install curl wget -y 1> /dev/null
|
||||
yum update curl wget ca-certificates -y 1> /dev/null
|
||||
else
|
||||
|
||||
echo -e "\nUnable to detect your OS...\n"
|
||||
echo -e "\nCyberPanel is supported on Ubuntu 18.04, Ubuntu 20.04 Ubuntu 22.04, AlmaLinux 8 and CloudLinux 7.x...\n"
|
||||
exit 1
|
||||
echo -e "\nUnable to detect your OS...\n"
|
||||
echo -e "\nCyberPanel is supported on Ubuntu 18.04, Ubuntu 20.04 Ubuntu 22.04, AlmaLinux 8, AlmaLinux 9 and CloudLinux 7.x...\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f cyberpanel.sh
|
||||
rm -f install.tar.gz
|
||||
curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null
|
||||
|
||||
wget https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.3.5-a9/cyberpanel.sh
|
||||
|
||||
chmod +x cyberpanel.sh
|
||||
./cyberpanel.sh $@
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ def FetchCloudLinuxAlmaVersionVersion():
|
|||
return 'cl-89'
|
||||
elif (data.find('CloudLinux') > -1 or data.find('cloudlinux') > -1) and (data.find('8.8') > -1 or data.find('Anatoly Filipchenko') > -1):
|
||||
return 'cl-88'
|
||||
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('9.3') > -1 or data.find('Shamrock Pampas Cat') > -1):
|
||||
return 'al-93'
|
||||
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('8.9') > -1 or data.find('Midnight Oncilla') > -1):
|
||||
return 'al-88'
|
||||
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('8.7') > -1 or data.find('Stone Smilodon') > -1):
|
||||
|
|
@ -295,7 +297,7 @@ class InstallCyberPanel:
|
|||
|
||||
command = 'dnf install lsphp81* lsphp82* --exclude *imagick* -y --skip-broken'
|
||||
subprocess.call(command, shell=True)
|
||||
|
||||
|
||||
if self.distro == openeuler:
|
||||
command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* lsphp80* -y'
|
||||
subprocess.call(command, shell=True)
|
||||
|
|
@ -354,7 +356,7 @@ name = MariaDB
|
|||
baseurl = http://yum.mariadb.org/10.11/rhel8-amd64
|
||||
module_hotfixes=1
|
||||
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck=1
|
||||
gpgcheck=1
|
||||
"""
|
||||
WriteToFile = open(RepoPath, 'w')
|
||||
WriteToFile.write(RepoContent)
|
||||
|
|
|
|||
Loading…
Reference in New Issue