Merge pull request #1579 from master3395/v2.5.5-dev

Enhance OS detection and support for AlmaLinux 10 and additional Ubun…
This commit is contained in:
Master3395
2025-10-09 22:09:41 +02:00
committed by GitHub
14 changed files with 285 additions and 28 deletions

View File

@@ -55,13 +55,13 @@ elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
Server_OS="CloudLinux" Server_OS="CloudLinux"
elif grep -q -E "Rocky Linux" /etc/os-release ; then elif grep -q -E "Rocky Linux" /etc/os-release ; then
Server_OS="RockyLinux" 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 22.04.5|Ubuntu 24.04.3|Ubuntu 25.04|Ubuntu 25.10" /etc/os-release ; then
Server_OS="Ubuntu" Server_OS="Ubuntu"
elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then
Server_OS="openEuler" Server_OS="openEuler"
else else
echo -e "Unable to detect your system..." 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, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n" echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, Ubuntu 22.04.5, Ubuntu 24.04.3, Ubuntu 25.04, Ubuntu 25.10, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
exit exit
fi fi

View File

@@ -12,13 +12,13 @@ elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
Server_OS="CloudLinux" Server_OS="CloudLinux"
elif grep -q -E "Rocky Linux" /etc/os-release ; then elif grep -q -E "Rocky Linux" /etc/os-release ; then
Server_OS="RockyLinux" 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 22.04.5|Ubuntu 24.04.3|Ubuntu 25.04|Ubuntu 25.10" /etc/os-release ; then
Server_OS="Ubuntu" Server_OS="Ubuntu"
elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then
Server_OS="openEuler" Server_OS="openEuler"
else else
echo -e "Unable to detect your system..." 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, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n" echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, Ubuntu 22.04.5, Ubuntu 24.04.3, Ubuntu 25.04, Ubuntu 25.10, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
exit exit
fi fi

View File

@@ -92,10 +92,11 @@ bash <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.5.5-dev/c
## 🔧 **Fixed Issues:** ## 🔧 **Fixed Issues:**
### **✅ AlmaLinux 9 Support** ### **✅ AlmaLinux 9/10 Support**
- Fixed `aspell` and `libc-client` dependency issues - Fixed `aspell` and `libc-client` dependency issues
- Proper package handling for AlmaLinux 9 - Proper package handling for AlmaLinux 9/10
- Smart fallback for missing packages - Smart fallback for missing packages
- Comprehensive AlmaLinux 10 compatibility fixes
### **✅ Modular Architecture** ### **✅ Modular Architecture**
- Each module under 500 lines (as requested) - Each module under 500 lines (as requested)

View File

@@ -70,7 +70,7 @@ Fast • Secure • Scalable — Simplify hosting management with style.
| OS family | Recommended / Supported | | OS family | Recommended / Supported |
| -------------------------- | ----------------------: | | -------------------------- | ----------------------: |
| Ubuntu 24.04, 22.04, 20.04 | ✅ Recommended | | Ubuntu 25.10, 25.04, 24.04.3, 24.04, 22.04.5, 22.04, 20.04 | ✅ Recommended |
| Debian 13, 12, 11 | ✅ Supported | | Debian 13, 12, 11 | ✅ Supported |
| AlmaLinux 10, 9, 8 | ✅ Supported | | AlmaLinux 10, 9, 8 | ✅ Supported |
| RockyLinux 9, 8 | ✅ Supported | | RockyLinux 9, 8 | ✅ Supported |

View File

@@ -86,6 +86,11 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf" PACKAGE_MANAGER="dnf"
print_status "Detected: AlmaLinux 9" print_status "Detected: AlmaLinux 9"
elif echo $OUTPUT | grep -q "AlmaLinux 10" ; then
SERVER_OS="AlmaLinux10"
OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf"
print_status "Detected: AlmaLinux 10"
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
SERVER_OS="AlmaLinux8" SERVER_OS="AlmaLinux8"
OS_FAMILY="rhel" OS_FAMILY="rhel"
@@ -111,6 +116,26 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="yum" PACKAGE_MANAGER="yum"
print_status "Detected: Rocky Linux 8" print_status "Detected: Rocky Linux 8"
elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
SERVER_OS="Ubuntu2510"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 25.10"
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
SERVER_OS="Ubuntu2504"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 25.04"
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
SERVER_OS="Ubuntu24043"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 24.04.3"
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
SERVER_OS="Ubuntu22045"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 22.04.5"
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
SERVER_OS="Ubuntu2204" SERVER_OS="Ubuntu2204"
OS_FAMILY="debian" OS_FAMILY="debian"
@@ -133,7 +158,7 @@ detect_os() {
print_status "Detected: Debian GNU/Linux 11" print_status "Detected: Debian GNU/Linux 11"
else else
print_status "ERROR: Unsupported OS detected" print_status "ERROR: Unsupported OS detected"
print_status "Supported OS: AlmaLinux 8/9, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04, Debian 11/12" print_status "Supported OS: AlmaLinux 8/9/10, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04/22.04.5/24.04.3/25.04/25.10, Debian 11/12"
return 1 return 1
fi fi

View File

@@ -78,6 +78,11 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf" PACKAGE_MANAGER="dnf"
print_status "Detected: AlmaLinux 9" print_status "Detected: AlmaLinux 9"
elif echo $OUTPUT | grep -q "AlmaLinux 10" ; then
SERVER_OS="AlmaLinux10"
OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf"
print_status "Detected: AlmaLinux 10"
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
SERVER_OS="AlmaLinux8" SERVER_OS="AlmaLinux8"
OS_FAMILY="rhel" OS_FAMILY="rhel"
@@ -103,6 +108,26 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="yum" PACKAGE_MANAGER="yum"
print_status "Detected: Rocky Linux 8" print_status "Detected: Rocky Linux 8"
elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
SERVER_OS="Ubuntu2510"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 25.10"
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
SERVER_OS="Ubuntu2504"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 25.04"
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
SERVER_OS="Ubuntu24043"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 24.04.3"
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
SERVER_OS="Ubuntu22045"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 22.04.5"
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
SERVER_OS="Ubuntu2204" SERVER_OS="Ubuntu2204"
OS_FAMILY="debian" OS_FAMILY="debian"
@@ -125,7 +150,7 @@ detect_os() {
print_status "Detected: Debian GNU/Linux 11" print_status "Detected: Debian GNU/Linux 11"
else else
print_status "ERROR: Unsupported OS detected" print_status "ERROR: Unsupported OS detected"
print_status "Supported OS: AlmaLinux 8/9, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04, Debian 11/12" print_status "Supported OS: AlmaLinux 8/9/10, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04/22.04.5/24.04.3/25.04/25.10, Debian 11/12"
return 1 return 1
fi fi

View File

@@ -90,6 +90,11 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf" PACKAGE_MANAGER="dnf"
print_status "$GREEN" "Detected: AlmaLinux 9" print_status "$GREEN" "Detected: AlmaLinux 9"
elif echo $OUTPUT | grep -q "AlmaLinux 10" ; then
SERVER_OS="AlmaLinux10"
OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf"
print_status "$GREEN" "Detected: AlmaLinux 10"
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
SERVER_OS="AlmaLinux8" SERVER_OS="AlmaLinux8"
OS_FAMILY="rhel" OS_FAMILY="rhel"
@@ -115,6 +120,26 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="yum" PACKAGE_MANAGER="yum"
print_status "$GREEN" "Detected: Rocky Linux 8" print_status "$GREEN" "Detected: Rocky Linux 8"
elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
SERVER_OS="Ubuntu2510"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 25.10"
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
SERVER_OS="Ubuntu2504"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 25.04"
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
SERVER_OS="Ubuntu24043"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 24.04.3"
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
SERVER_OS="Ubuntu22045"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 22.04.5"
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
SERVER_OS="Ubuntu2204" SERVER_OS="Ubuntu2204"
OS_FAMILY="debian" OS_FAMILY="debian"
@@ -137,7 +162,7 @@ detect_os() {
print_status "$GREEN" "Detected: Debian GNU/Linux 11" print_status "$GREEN" "Detected: Debian GNU/Linux 11"
else else
print_status "$RED" "❌ Unsupported OS detected" print_status "$RED" "❌ Unsupported OS detected"
print_status "$YELLOW" "Supported OS: AlmaLinux 8/9, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04, Debian 11/12" print_status "$YELLOW" "Supported OS: AlmaLinux 8/9/10, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04/22.04.5/24.04.3/25.04/25.10, Debian 11/12"
return 1 return 1
fi fi

View File

@@ -76,6 +76,11 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf" PACKAGE_MANAGER="dnf"
print_status "Detected: AlmaLinux 9" print_status "Detected: AlmaLinux 9"
elif echo $OUTPUT | grep -q "AlmaLinux 10" ; then
SERVER_OS="AlmaLinux10"
OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf"
print_status "Detected: AlmaLinux 10"
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
SERVER_OS="AlmaLinux8" SERVER_OS="AlmaLinux8"
OS_FAMILY="rhel" OS_FAMILY="rhel"
@@ -101,6 +106,26 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="yum" PACKAGE_MANAGER="yum"
print_status "Detected: Rocky Linux 8" print_status "Detected: Rocky Linux 8"
elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
SERVER_OS="Ubuntu2510"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 25.10"
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
SERVER_OS="Ubuntu2504"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 25.04"
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
SERVER_OS="Ubuntu24043"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 24.04.3"
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
SERVER_OS="Ubuntu22045"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "Detected: Ubuntu 22.04.5"
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
SERVER_OS="Ubuntu2204" SERVER_OS="Ubuntu2204"
OS_FAMILY="debian" OS_FAMILY="debian"
@@ -123,7 +148,7 @@ detect_os() {
print_status "Detected: Debian GNU/Linux 11" print_status "Detected: Debian GNU/Linux 11"
else else
print_status "ERROR: Unsupported OS detected" print_status "ERROR: Unsupported OS detected"
print_status "Supported OS: AlmaLinux 8/9, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04, Debian 11/12" print_status "Supported OS: AlmaLinux 8/9/10, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04/22.04.5/24.04.3/25.04/25.10, Debian 11/12"
return 1 return 1
fi fi

View File

@@ -89,6 +89,11 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf" PACKAGE_MANAGER="dnf"
print_status "$GREEN" "Detected: AlmaLinux 9" print_status "$GREEN" "Detected: AlmaLinux 9"
elif echo $OUTPUT | grep -q "AlmaLinux 10" ; then
SERVER_OS="AlmaLinux10"
OS_FAMILY="rhel"
PACKAGE_MANAGER="dnf"
print_status "$GREEN" "Detected: AlmaLinux 10"
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
SERVER_OS="AlmaLinux8" SERVER_OS="AlmaLinux8"
OS_FAMILY="rhel" OS_FAMILY="rhel"
@@ -114,6 +119,26 @@ detect_os() {
OS_FAMILY="rhel" OS_FAMILY="rhel"
PACKAGE_MANAGER="yum" PACKAGE_MANAGER="yum"
print_status "$GREEN" "Detected: Rocky Linux 8" print_status "$GREEN" "Detected: Rocky Linux 8"
elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
SERVER_OS="Ubuntu2510"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 25.10"
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
SERVER_OS="Ubuntu2504"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 25.04"
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
SERVER_OS="Ubuntu24043"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 24.04.3"
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
SERVER_OS="Ubuntu22045"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 22.04.5"
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
SERVER_OS="Ubuntu2204" SERVER_OS="Ubuntu2204"
OS_FAMILY="debian" OS_FAMILY="debian"
@@ -136,7 +161,7 @@ detect_os() {
print_status "$GREEN" "Detected: Debian GNU/Linux 11" print_status "$GREEN" "Detected: Debian GNU/Linux 11"
else else
print_status "$RED" "❌ Unsupported OS detected" print_status "$RED" "❌ Unsupported OS detected"
print_status "$YELLOW" "Supported OS: AlmaLinux 8/9, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04, Debian 11/12" print_status "$YELLOW" "Supported OS: AlmaLinux 8/9/10, CentOS 8/9, Rocky Linux 8/9, Ubuntu 20.04/22.04/22.04.5/24.04.3/25.04/25.10, Debian 11/12"
return 1 return 1
fi fi

View File

@@ -169,6 +169,11 @@ class preFlightsChecks:
os_info = self.detect_os_info() os_info = self.detect_os_info()
return os_info['name'] == 'almalinux' and os_info['major_version'] == 9 return os_info['name'] == 'almalinux' and os_info['major_version'] == 9
def is_almalinux10(self):
"""Check if running on AlmaLinux 10"""
os_info = self.detect_os_info()
return os_info['name'] == 'almalinux' and os_info['major_version'] == 10
def is_ubuntu(self): def is_ubuntu(self):
"""Check if running on Ubuntu""" """Check if running on Ubuntu"""
os_info = self.detect_os_info() os_info = self.detect_os_info()
@@ -192,7 +197,7 @@ class preFlightsChecks:
if os_info['name'] == 'almalinux' and os_info['major_version'] == 9: if os_info['name'] == 'almalinux' and os_info['major_version'] == 9:
fixes.extend(['mariadb', 'services', 'litespeed', 'mysql_gpg']) fixes.extend(['mariadb', 'services', 'litespeed', 'mysql_gpg'])
elif os_info['name'] == 'almalinux' and os_info['major_version'] == 10: elif os_info['name'] == 'almalinux' and os_info['major_version'] == 10:
fixes.extend(['mariadb', 'services', 'litespeed']) fixes.extend(['mariadb', 'services', 'litespeed', 'mysql_gpg'])
elif os_info['name'] == 'rocky' and os_info['major_version'] >= 8: elif os_info['name'] == 'rocky' and os_info['major_version'] >= 8:
fixes.extend(['mariadb', 'services']) fixes.extend(['mariadb', 'services'])
elif os_info['name'] == 'rhel' and os_info['major_version'] >= 8: elif os_info['name'] == 'rhel' and os_info['major_version'] >= 8:
@@ -316,10 +321,10 @@ class preFlightsChecks:
if not installed: if not installed:
self.stdOut(f"Package {package} not available, trying alternatives...", 1) self.stdOut(f"Package {package} not available, trying alternatives...", 1)
# For AlmaLinux 9, try enabling PowerTools repository first # For AlmaLinux 9/10, try enabling PowerTools repository first
if self.distro == openeuler and os_info['name'] == 'almalinux' and os_info['major_version'] == '9': if self.distro == openeuler and os_info['name'] == 'almalinux' and os_info['major_version'] in ['9', '10']:
try: try:
self.stdOut("Enabling AlmaLinux 9 PowerTools repository...", 1) self.stdOut("Enabling AlmaLinux 9/10 PowerTools repository...", 1)
self.call("dnf config-manager --set-enabled powertools", self.distro, "Enable PowerTools", "Enable PowerTools", 1, 0, os.EX_OSERR) self.call("dnf config-manager --set-enabled powertools", self.distro, "Enable PowerTools", "Enable PowerTools", 1, 0, os.EX_OSERR)
# Try installing again with PowerTools enabled # Try installing again with PowerTools enabled
command = f"dnf install -y {package} {dev_package}" command = f"dnf install -y {package} {dev_package}"
@@ -746,6 +751,92 @@ class preFlightsChecks:
self.stdOut(f"Error in fix_debian_specific: {str(e)}", 0) self.stdOut(f"Error in fix_debian_specific: {str(e)}", 0)
return False return False
def fix_almalinux10_comprehensive(self):
"""Apply comprehensive AlmaLinux 10 fixes"""
if not self.is_almalinux10():
return
self.stdOut("Applying comprehensive AlmaLinux 10 fixes...", 1)
try:
# Update system packages
self.stdOut("Updating system packages...", 1)
command = "dnf update -y"
self.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
# Install essential build tools and dependencies
self.stdOut("Installing essential build tools...", 1)
command = "dnf groupinstall -y 'Development Tools'"
self.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = "dnf install -y epel-release"
self.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
# Install AlmaLinux 10 compatibility packages (same as AlmaLinux 9)
self.stdOut("Installing AlmaLinux 10 compatibility packages...", 1)
compat_packages = [
"libxcrypt-compat",
"libnsl",
"compat-openssl11",
"compat-openssl11-devel"
]
for package in compat_packages:
command = f"dnf install -y {package}"
self.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
# Install PHP dependencies that are missing (with AlmaLinux 10 compatibility)
self.stdOut("Installing PHP dependencies...", 1)
# Base packages that should work on all systems
base_deps = [
"ImageMagick", "ImageMagick-devel",
"gd", "gd-devel",
"libicu", "libicu-devel",
"oniguruma", "oniguruma-devel",
"aspell", "aspell-devel",
"freetype-devel",
"libjpeg-turbo-devel",
"libpng-devel",
"libwebp-devel",
"libXpm-devel",
"libzip-devel",
"libxml2-devel",
"openssl-devel",
"curl-devel",
"libxslt-devel",
"sqlite-devel",
"readline-devel",
"libedit-devel",
"pcre2-devel",
"re2c",
"libargon2-devel",
"libsodium-devel"
]
for package in base_deps:
command = f"dnf install -y {package}"
self.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
# Install MariaDB development packages
self.stdOut("Installing MariaDB development packages...", 1)
mariadb_deps = [
"mariadb-devel",
"mariadb-connector-c-devel"
]
for package in mariadb_deps:
command = f"dnf install -y {package}"
self.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
self.stdOut("✅ AlmaLinux 10 fixes applied successfully", 1)
except Exception as e:
self.stdOut(f"❌ Error applying AlmaLinux 10 fixes: {e}", 1)
return False
return True
def apply_os_specific_fixes(self): def apply_os_specific_fixes(self):
"""Apply OS-specific fixes based on detected OS""" """Apply OS-specific fixes based on detected OS"""
try: try:
@@ -1895,7 +1986,7 @@ class preFlightsChecks:
# Use compatible repository version for RHEL-based systems # Use compatible repository version for RHEL-based systems
# AlmaLinux 9 is compatible with el8 repositories # AlmaLinux 9 is compatible with el8 repositories
os_info = self.detect_os_info() os_info = self.detect_os_info()
if os_info['name'] in ['almalinux', 'rocky', 'rhel'] and os_info['major_version'] in ['8', '9']: if os_info['name'] in ['almalinux', 'rocky', 'rhel'] and os_info['major_version'] in ['8', '9', '10']:
command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm' command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm'
else: else:
command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm' command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm'
@@ -4441,7 +4532,7 @@ milter_default_action = accept
# Use compatible repository version for RHEL-based systems # Use compatible repository version for RHEL-based systems
# AlmaLinux 9 is compatible with el8 repositories # AlmaLinux 9 is compatible with el8 repositories
os_info = self.detect_os_info() os_info = self.detect_os_info()
if os_info['name'] in ['almalinux', 'rocky', 'rhel'] and os_info['major_version'] in ['8', '9']: if os_info['name'] in ['almalinux', 'rocky', 'rhel'] and os_info['major_version'] in ['8', '9', '10']:
repo_command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm' repo_command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm'
else: else:
repo_command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm' repo_command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm'
@@ -5498,9 +5589,11 @@ def main():
# Note: OS-specific fixes are now applied earlier in the installation process # Note: OS-specific fixes are now applied earlier in the installation process
# The installCyberPanel.Main() functionality has been integrated into the main installation flow # The installCyberPanel.Main() functionality has been integrated into the main installation flow
# Apply AlmaLinux 9 comprehensive fixes first if needed # Apply AlmaLinux 9/10 comprehensive fixes first if needed
if checks.is_almalinux9(): if checks.is_almalinux9():
checks.fix_almalinux9_comprehensive() checks.fix_almalinux9_comprehensive()
elif checks.is_almalinux10():
checks.fix_almalinux10_comprehensive()
# Install core services in the correct order # Install core services in the correct order
checks.installLiteSpeed(ent, serial) checks.installLiteSpeed(ent, serial)

View File

@@ -34,6 +34,8 @@ def FetchCloudLinuxAlmaVersionVersion():
return 'al-87' return 'al-87'
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('9.4') > -1 or data.find('9.3') > -1 or data.find('Shamrock Pampas') > -1 or data.find('Seafoam Ocelot') > -1 or data.find('VERSION="9.') > -1): elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('9.4') > -1 or data.find('9.3') > -1 or data.find('Shamrock Pampas') > -1 or data.find('Seafoam Ocelot') > -1 or data.find('VERSION="9.') > -1):
return 'al-93' return 'al-93'
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('10.0') > -1 or data.find('Purple Lion') > -1 or data.find('VERSION="10.') > -1):
return 'al-10'
elif data.find('CentOS Stream 9') > -1: elif data.find('CentOS Stream 9') > -1:
return 'el-9' return 'el-9'
elif data.find('CentOS Linux 9') > -1: elif data.find('CentOS Linux 9') > -1:
@@ -42,8 +44,6 @@ def FetchCloudLinuxAlmaVersionVersion():
return 'el-9' return 'el-9'
elif data.find('Red Hat Enterprise Linux 9') > -1: elif data.find('Red Hat Enterprise Linux 9') > -1:
return 'el-9' return 'el-9'
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('10.0') > -1 or data.find('Purple Lion') > -1 or data.find('VERSION="10.') > -1):
return 'al-100'
else: else:
return -1 return -1

View File

@@ -21,7 +21,7 @@ class UniversalOSFixes:
# Supported OS matrix # Supported OS matrix
self.supported_os = { self.supported_os = {
'ubuntu': ['24.04', '22.04', '20.04'], 'ubuntu': ['25.10', '25.04', '24.04.3', '24.04', '22.04.5', '22.04', '20.04'],
'debian': ['13', '12', '11'], 'debian': ['13', '12', '11'],
'almalinux': ['10', '9', '8'], 'almalinux': ['10', '9', '8'],
'rocky': ['9', '8'], 'rocky': ['9', '8'],

View File

@@ -206,11 +206,17 @@ detect_ubuntu() {
PACKAGE_MANAGER="apt" PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 22.04" print_status "$GREEN" "Detected: Ubuntu 22.04"
return 0 return 0
elif echo $OUTPUT | grep -q "Ubuntu 24.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
SERVER_OS="Ubuntu2404" SERVER_OS="Ubuntu2510"
OS_FAMILY="debian" OS_FAMILY="debian"
PACKAGE_MANAGER="apt" PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 24.04" print_status "$GREEN" "Detected: Ubuntu 25.10"
return 0
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
SERVER_OS="Ubuntu2504"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 25.04"
return 0 return 0
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
SERVER_OS="Ubuntu24043" SERVER_OS="Ubuntu24043"
@@ -218,6 +224,18 @@ detect_ubuntu() {
PACKAGE_MANAGER="apt" PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 24.04.3" print_status "$GREEN" "Detected: Ubuntu 24.04.3"
return 0 return 0
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
SERVER_OS="Ubuntu22045"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 22.04.5"
return 0
elif echo $OUTPUT | grep -q "Ubuntu 24.04" ; then
SERVER_OS="Ubuntu2404"
OS_FAMILY="debian"
PACKAGE_MANAGER="apt"
print_status "$GREEN" "Detected: Ubuntu 24.04"
return 0
fi fi
return 1 return 1
} }
@@ -311,7 +329,7 @@ detect_os() {
else else
print_status "$RED" "❌ Unable to detect your OS..." print_status "$RED" "❌ Unable to detect your OS..."
print_status "$YELLOW" "Supported operating systems:" print_status "$YELLOW" "Supported operating systems:"
echo -e "• Ubuntu: 18.04, 20.04, 20.10, 22.04, 24.04, 24.04.3" echo -e "• Ubuntu: 18.04, 20.04, 20.10, 22.04, 22.04.5, 24.04, 24.04.3, 25.04, 25.10"
echo -e "• Debian: 11, 12, 13" echo -e "• Debian: 11, 12, 13"
echo -e "• AlmaLinux: 8, 9, 10" echo -e "• AlmaLinux: 8, 9, 10"
echo -e "• RockyLinux: 8, 9" echo -e "• RockyLinux: 8, 9"

View File

@@ -10,10 +10,30 @@ if echo $OUTPUT | grep -q "AlmaLinux 9" ; then
echo -e "\nDetecting AlmaLinux 9...\n" echo -e "\nDetecting AlmaLinux 9...\n"
SERVER_OS="AlmaLinux9" SERVER_OS="AlmaLinux9"
PKG_MGR="dnf" PKG_MGR="dnf"
elif echo $OUTPUT | grep -q "AlmaLinux 10" ; then
echo -e "\nDetecting AlmaLinux 10...\n"
SERVER_OS="AlmaLinux10"
PKG_MGR="dnf"
elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then
echo -e "\nDetecting AlmaLinux 8...\n" echo -e "\nDetecting AlmaLinux 8...\n"
SERVER_OS="AlmaLinux8" SERVER_OS="AlmaLinux8"
PKG_MGR="yum" PKG_MGR="yum"
elif echo $OUTPUT | grep -q "Ubuntu 25.10" ; then
echo -e "\nDetecting Ubuntu 25.10...\n"
SERVER_OS="Ubuntu2510"
PKG_MGR="apt"
elif echo $OUTPUT | grep -q "Ubuntu 25.04" ; then
echo -e "\nDetecting Ubuntu 25.04...\n"
SERVER_OS="Ubuntu2504"
PKG_MGR="apt"
elif echo $OUTPUT | grep -q "Ubuntu 24.04.3" ; then
echo -e "\nDetecting Ubuntu 24.04.3...\n"
SERVER_OS="Ubuntu24043"
PKG_MGR="apt"
elif echo $OUTPUT | grep -q "Ubuntu 22.04.5" ; then
echo -e "\nDetecting Ubuntu 22.04.5...\n"
SERVER_OS="Ubuntu22045"
PKG_MGR="apt"
elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then
echo -e "\nDetecting Ubuntu 22.04...\n" echo -e "\nDetecting Ubuntu 22.04...\n"
SERVER_OS="Ubuntu2204" SERVER_OS="Ubuntu2204"
@@ -28,8 +48,8 @@ elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then
PKG_MGR="yum" PKG_MGR="yum"
else else
echo -e "\nUnsupported OS detected. This script supports:\n" echo -e "\nUnsupported OS detected. This script supports:\n"
echo -e "AlmaLinux: 8, 9\n" echo -e "AlmaLinux: 8, 9, 10\n"
echo -e "Ubuntu: 20.04, 22.04\n" echo -e "Ubuntu: 20.04, 22.04, 22.04.5, 24.04.3, 25.04, 25.10\n"
echo -e "CentOS: 8\n" echo -e "CentOS: 8\n"
exit 1 exit 1
fi fi