add support for ubuntu 24
This commit is contained in:
parent
c3c968e335
commit
4da54b1c34
|
|
@ -5,7 +5,7 @@
|
|||
#set -u
|
||||
|
||||
|
||||
#CyberPanel installer script for CentOS 7, CentOS 8, CloudLinux 7, AlmaLinux 8, RockyLinux 8, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, openEuler 20.03 and openEuler 22.03
|
||||
#CyberPanel installer script for CentOS 7, CentOS 8, CloudLinux 7, AlmaLinux 8, RockyLinux 8, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, Ubuntu 24.04, openEuler 20.03 and openEuler 22.03
|
||||
#For whoever may edit this script, please follow:
|
||||
#Please use Pre_Install_xxx() and Post_Install_xxx() if you want to something respectively before or after the panel installation
|
||||
#and update below accordingly
|
||||
|
|
@ -269,14 +269,14 @@ 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
|
||||
Server_OS="RockyLinux"
|
||||
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04" /etc/os-release ; then
|
||||
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10|Ubuntu 22.04|Ubuntu 24.04" /etc/os-release ; then
|
||||
Server_OS="Ubuntu"
|
||||
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, 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, RockyLinux 8, AlmaLinux 9, 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, Ubuntu 24.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, Ubuntu 24.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, RockyLinux 8, AlmaLinux 9, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
@ -1086,7 +1086,8 @@ else
|
|||
apt install -y --allow-downgrades libgnutls30=3.6.13-2ubuntu1.3
|
||||
fi
|
||||
|
||||
if [[ "$Server_OS_Version" = "22" ]] ; then
|
||||
if [[ "$Server_OS_Version" = "22" || "$Server_OS_Version" = "24" ]] ; then
|
||||
# Ubuntu 22.04 and 24.04 use different MariaDB package names
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y dnsutils net-tools htop telnet libcurl4-gnutls-dev libgnutls28-dev libgcrypt20-dev libattr1 libattr1-dev liblzma-dev libgpgme-dev libcurl4-gnutls-dev libssl-dev nghttp2 libnghttp2-dev idn2 libidn2-dev libidn2-0-dev librtmp-dev libpsl-dev nettle-dev libgnutls28-dev libldap2-dev libgssapi-krb5-2 libk5crypto3 libkrb5-dev libcomerr2 libldap2-dev virtualenv git socat vim unzip zip libmariadb-dev-compat libmariadb-dev
|
||||
Check_Return
|
||||
else
|
||||
|
|
@ -1124,7 +1125,7 @@ Retry_Command "pip install --default-timeout=3600 virtualenv"
|
|||
|
||||
Download_Requirement
|
||||
|
||||
if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then
|
||||
if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" || "$Server_OS_Version" = "24" ]] ; then
|
||||
python3 -m venv /usr/local/CyberPanel
|
||||
Check_Return
|
||||
else
|
||||
|
|
@ -1147,6 +1148,9 @@ Retry_Command "pip install --default-timeout=3600 -r /usr/local/requirments.txt"
|
|||
|
||||
if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then
|
||||
cp /usr/bin/python3.10 /usr/local/CyberCP/bin/python3
|
||||
elif [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "24" ]] ; then
|
||||
# Ubuntu 24.04 uses Python 3.12
|
||||
cp /usr/bin/python3.12 /usr/local/CyberCP/bin/python3
|
||||
fi
|
||||
|
||||
rm -rf cyberpanel
|
||||
|
|
@ -1870,7 +1874,7 @@ rm -f /root/cyberpanel/cert_conf
|
|||
Post_Install_Required_Components() {
|
||||
Debug_Log2 "Finalization..,80"
|
||||
|
||||
if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then
|
||||
if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" || "$Server_OS_Version" = "24" ]] ; then
|
||||
python3 -m venv /usr/local/CyberCP
|
||||
Check_Return
|
||||
else
|
||||
|
|
@ -1894,6 +1898,9 @@ Retry_Command "pip install --default-timeout=3600 -r /usr/local/requirments.txt"
|
|||
|
||||
if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then
|
||||
cp /usr/bin/python3.10 /usr/local/CyberCP/bin/python3
|
||||
elif [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "24" ]] ; then
|
||||
# Ubuntu 24.04 uses Python 3.12
|
||||
cp /usr/bin/python3.12 /usr/local/CyberCP/bin/python3
|
||||
else
|
||||
if [[ "$Server_OS_Version" = "9" ]] || [[ "$Server_OS_Version" = "8" ]] || [[ "$Server_OS_Version" = "20" ]]; then
|
||||
echo "PYTHONHOME=/usr" > /usr/local/lscp/conf/pythonenv.conf
|
||||
|
|
|
|||
Loading…
Reference in New Issue