diff --git a/cyberpanel.sh b/cyberpanel.sh index 67b02bbdb..4a93694f5 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -88,7 +88,7 @@ log_info "CyberPanel installation started" log_info "Log file: $LOG_FILE" log_info "Debug log file: $DEBUG_LOG_FILE" -#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 @@ -99,7 +99,7 @@ log_info "Debug log file: $DEBUG_LOG_FILE" #Set_Default_Variables() ---> set some default variable for later use #Check_Root() ---> check for root #Check_Server_IP() ---> check for server IP and geolocation at country level -#Check_OS() ---> check system , support on CentOS 7/8, RockyLinux 8, AlmaLinux 8, Ubuntu 18/20, openEuler 20.03/22.03 and CloudLinux 7, 8 is untested. +#Check_OS() ---> check system , support on CentOS 7/8, RockyLinux 8, AlmaLinux 8, Ubuntu 18/20/22/24, openEuler 20.03/22.03 and CloudLinux 7, 8 is untested. #Check_Virtualization() ---> check for virtualizaon , #LXC not supported# , some edit needed on OVZ #Check_Panel() ---> check to make sure no other panel is installed #Check_Process() ---> check no other process like Apache is running @@ -513,7 +513,7 @@ if [ -z "$XDG_CURRENT_DESKTOP" ]; then echo -e "Desktop OS not detected. Proceeding\n" else echo "$XDG_CURRENT_DESKTOP defined appears to be a desktop OS. Bailing as CyberPanel is incompatible." - echo -e "\nCyberPanel is supported on server OS types only. Such as Ubuntu 18.04 x86_64, Ubuntu 20.04 x86_64, Ubuntu 20.10 x86_64, Ubuntu 22.04 x86_64, CentOS 8.x, AlmaLinux 8.x and CloudLinux 7.x...\n" + echo -e "\nCyberPanel is supported on server OS types only. Such as Ubuntu 18.04 x86_64, Ubuntu 20.04 x86_64, Ubuntu 20.10 x86_64, Ubuntu 22.04 x86_64, Ubuntu 24.04 x86_64, CentOS 8.x, AlmaLinux 8.x and CloudLinux 7.x...\n" exit fi @@ -534,14 +534,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 @@ -1284,7 +1284,7 @@ Debug_Log2 "Setting up repositories for CN server...,1" Download_Requirement() { for i in {1..50} ; do - if [[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "9" ]]; then + if [[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "24" ]] || [[ "$Server_OS_Version" = "9" ]]; then wget -O /usr/local/requirments.txt "${Git_Content_URL}/${Branch_Name}/requirments.txt" else wget -O /usr/local/requirments.txt "${Git_Content_URL}/${Branch_Name}/requirments-old.txt" @@ -1325,7 +1325,7 @@ if [[ "$Server_OS" = "CentOS" ]] || [[ "$Server_OS" = "openEuler" ]] ; then dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel MariaDB-server MariaDB-client MariaDB-devel curl-devel git platform-python-devel tar socat python3 zip unzip bind-utils gpgme-devel openssl-devel Check_Return - elif [[ "$Server_OS_Version" = "20" ]] || [[ "$Server_OS_Version" = "22" ]] ; then + elif [[ "$Server_OS_Version" = "20" ]] || [[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "24" ]] ; then dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git python3-devel tar socat python3 zip unzip bind-utils gpgme-devel Check_Return fi @@ -1340,7 +1340,7 @@ 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 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 @@ -1375,8 +1375,8 @@ echo -e "Creating CyberPanel virtual environment..." # First ensure the directory exists mkdir -p /usr/local/CyberPanel -if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then - echo -e "Ubuntu 22.04 detected, using python3 -m venv..." +if [[ "$Server_OS" = "Ubuntu" ]] && ([[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "24" ]]) ; then + echo -e "Ubuntu 22.04/24.04 detected, using python3 -m venv..." if python3 -m venv /usr/local/CyberPanel 2>&1; then echo -e "Virtual environment created successfully" else @@ -2120,8 +2120,8 @@ echo -e "Creating CyberCP virtual environment..." # First ensure the directory exists mkdir -p /usr/local/CyberCP -if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then - echo -e "Ubuntu 22.04 detected, using python3 -m venv..." +if [[ "$Server_OS" = "Ubuntu" ]] && ([[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "24" ]]) ; then + echo -e "Ubuntu 22.04/24.04 detected, using python3 -m venv..." if python3 -m venv /usr/local/CyberCP 2>&1; then echo -e "Virtual environment created successfully" else @@ -2176,10 +2176,11 @@ else echo -e "Django is properly installed" fi -if [[ "$Server_OS" = "Ubuntu" ]] && [[ "$Server_OS_Version" = "22" ]] ; then +if [[ "$Server_OS" = "Ubuntu" ]] && ([[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "24" ]]) ; then + # Ubuntu 24.04 ships with Python 3.12, but using 3.10 for compatibility with CyberPanel cp /usr/bin/python3.10 /usr/local/CyberCP/bin/python3 else - if [[ "$Server_OS_Version" = "9" ]] || [[ "$Server_OS_Version" = "8" ]] || [[ "$Server_OS_Version" = "20" ]]; then + if [[ "$Server_OS_Version" = "9" ]] || [[ "$Server_OS_Version" = "8" ]] || [[ "$Server_OS_Version" = "20" ]] || [[ "$Server_OS_Version" = "24" ]]; then echo "PYTHONHOME=/usr" > /usr/local/lscp/conf/pythonenv.conf else # Uncomment and use the following lines if necessary for other OS versions diff --git a/install/install.py b/install/install.py index 8f3d91675..f0be3d2dc 100644 --- a/install/install.py +++ b/install/install.py @@ -1654,7 +1654,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; # lscpdSelection = 'lscpd-0.3.1' # if os.path.exists('/etc/lsb-release'): # result = open('/etc/lsb-release', 'r').read() - # if result.find('22.04') > -1: + # if result.find('22.04') > -1 or result.find('24.04') > -1: # lscpdSelection = 'lscpd.0.4.0' # else: # lscpdSelection = 'lscpd.aarch64' @@ -1669,7 +1669,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; lscpdSelection = 'lscpd-0.3.1' if os.path.exists('/etc/lsb-release'): result = open('/etc/lsb-release', 'r').read() - if result.find('22.04') > -1: + if result.find('22.04') > -1 or result.find('24.04') > -1: lscpdSelection = 'lscpd.0.4.0' else: lscpdSelection = 'lscpd.aarch64' @@ -1679,7 +1679,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; lscpdSelection = 'lscpd-0.3.1' if os.path.exists('/etc/lsb-release'): result = open('/etc/lsb-release', 'r').read() - if result.find('22.04') > -1: + if result.find('22.04') > -1 or result.find('24.04') > -1: lscpdSelection = 'lscpd.0.4.0'