Merge pull request #1418 from momohammadi/stable

Fix: Resolve #1332 by detecting AlmaLinux or Rocky Linux and enabling…
This commit is contained in:
Usman Nasir 2025-03-20 15:49:57 +05:00 committed by GitHub
commit 43fb01de6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 186 additions and 67 deletions

View File

@ -20,7 +20,7 @@
<div class="col-sm-12">
<div class="alert alert-danger">
<p>{% trans "CloudLinux is not installed on your server." %} <a target="_blank"
href="https://go.cyberpanel.net/CLConvert">Click
href="https://community.cyberpanel.net/t/1-convert-cyberpanel-to-cloudlinux-os-and-install-cagefs/174">Click
Here</a> {% trans " for conversion details." %}</p>
</div>
</div>

217
README.md
View File

@ -1,75 +1,176 @@
# CyberPanel
# 🛠️ CyberPanel
Web Hosting Control Panel that uses OpenLiteSpeed as the underlying Web Server.
Web Hosting Control Panel powered by OpenLiteSpeed, designed to simplify hosting management.
## Features & Services
---
* Different User Access Levels (via ACLs).
* Auto SSL.
* FTP Server.
* Light-weight DNS Server (PowerDNS).
* phpMyAdmin will manage DBs (MariaDB).
* Email Support (SnappyMail).
* File Manager.
* PHP Management.
* Firewall (FirewallD & ConfigServer Firewall Integration).
* One-click Backups and Restores.
## 🔧 Features & Services
# Supported PHP Versions
- 🔐 **Different User Access Levels** (via ACLs).
- 🌌 **Auto SSL** for secure websites.
- 💻 **FTP Server** for file transfers.
- 🕒 **Light-weight DNS Server** (PowerDNS).
- 🔐 **phpMyAdmin** to manage databases (MariaDB).
- 📧 **Email Support** (SnappyMail).
- 🕌 **File Manager** for quick file access.
- 🌐 **PHP Management** made easy.
- 🔒 **Firewall** (✅ FirewallD & ConfigServer Firewall Integration).
- 📀 **One-click Backups and Restores**.
* PHP 8.3 (will reach end of life (EOL) on 31 Dec, 2027.)
* PHP 8.2 (will reach end of life (EOL) on 31 Dec, 2026.)
* PHP 8.1 (will reach end of life (EOL) on 31 Dec, 2025.)
* PHP 8.0 (will reach end of life (EOL) on 26 Nov, 2023.)
* PHP 7.4 (Ubuntu 22.04 and Almalinux 9.x and up does not support php below this version.) (will reach end of life (EOL) on 28 Nov 2022.)
* PHP 7.3 (will reach end of life (EOL) on 6 Dec, 2021.)
* PHP 7.2 (will reach end of life (EOL) on 30 Nov, 2020.)
* PHP 7.1 (Almalinux 8.x and up does not support php below this version.),(will reach end of life (EOL) on 1 Dec, 2019.)
* PHP 7.0 (will reach end of life (EOL) on 10 Jan, 2019.)
* PHP 5.6 (will reach end of life (EOL) on 31 Dec, 2018.)
* PHP 5.5 (will reach end of life (EOL) on 21 Jul, 2016.)
* PHP 5.4 (will reach end of life (EOL) on 3 Sep, 2015.)
* PHP 5.3 (will reach end of life (EOL) on 14 Aug, 2014.)
---
# Supported OS Versions
## 🔢 Supported PHP Versions
* CyberPanel is supported on x86_64 based
* Ubuntu 18.04 (will reach end of life (EOL) on 31 May, 2023.)
* Ubuntu 20.04 (will reach end of life (EOL) on April, 2025.)
* Ubuntu 20.10 (will reach end of life (EOL) on 22 July, 2021.)
* Ubuntu 22.04 (will reach end of life (EOL) on Apr 2022 - Apr 2027.)
* CentOS 7 (will reach end of life (EOL) on 30 June, 2024.)
* CentOS 8 (will reach end of life (EOL) on 31 December, 2021.)
* CentOS 9 (will reach end of life (EOL) on 31 May, 2027.)
* RHEL 8 (will reach end of life (EOL) on 31 May, 2029.)
* RHEL 9 (will reach end of life (EOL) on 31 May, 2032.)
* AlmaLinux 8 (will reach end of life (EOL) on 01 May, 2024).)
* AlmaLinux 9 (will reach end of life (EOL) on 31 May, 2027.)
* RockyLinux 8 (will reach end of life (EOL) on 31 May, 2029.)
* CloudLinux 7 (will reach end of life (EOL) on 01 July, 2024.)
* CloudLinux 8 (will reach end of life (EOL) on 31 May, 2029.)
* openEuler 20.03 (will reach end of life (EOL) on April, 2022.)
* openEuler 22.03 (will reach end of life (EOL) on March, 2024.)
CyberPanel supports PHP versions based on your operating system:
# Installation Instructions
### ☑️ **PHP 8.0 and Above**
- Fully supported on modern systems such as Ubuntu 22.04 and AlmaLinux 9.x and higher.
```
### ☑️ **PHP 7.4 and Below**
- Compatible with AlmaLinux 8, Ubuntu 18.04, and similar environments.
### Adding PHP Versions as Third-Party Add-ons
Some PHP versions can be added to operating systems as third-party packages using external repositories or tools. Here's an overview by OS:
#### **Ubuntu**:
- **Ubuntu 22.04**:
- Highest: PHP 8.5 (default repository or Ondrej's PPA).
- Lowest: PHP 7.4 (via Ondrej's PPA).
- **Ubuntu 20.04**:
- Highest: PHP 8.5 (default repository or Ondrej's PPA).
- Lowest: PHP 7.0 (via Ondrej's PPA).
- **Ubuntu 18.04**:
- Highest: PHP 8.4 (via Ondrej's PPA).
- Lowest: PHP 5.6 (via Ondrej's PPA).
#### **AlmaLinux**:
- **AlmaLinux 9**:
- Highest: PHP 8.5 (default repository or Remi repository).
- Lowest: PHP 7.4 (via Remi repository).
- **AlmaLinux 8**:
- Highest: PHP 8.4 (default repository or Remi repository).
- Lowest: PHP 5.6 (via Remi repository).
#### **CentOS**:
- **CentOS 9**:
- Highest: PHP 8.4 (via Remi repository).
- Lowest: PHP 7.4 (via Remi repository).
- **CentOS 8**:
- Highest: PHP 8.4 (via Remi repository).
- Lowest: PHP 5.6 (via Remi repository).
- **CentOS 7**:
- Highest: PHP 8.0 (via Remi repository).
- Lowest: PHP 5.4 (via Remi repository).
#### **RHEL**:
- **RHEL 9**:
- Highest: PHP 8.4 (via Remi repository).
- Lowest: PHP 7.4 (via Remi repository).
- **RHEL 8**:
- Highest: PHP 8.4 (via Remi repository).
- Lowest: PHP 5.6 (via Remi repository).
#### **RockyLinux**:
- **RockyLinux 8**:
- Highest: PHP 8.5 (via Remi repository).
- Lowest: PHP 5.6 (via Remi repository).
#### **CloudLinux**:
- **CloudLinux 8**:
- Highest: PHP 8.5 (via Remi repository).
- Lowest: PHP 5.6 (via Remi repository).
- **CloudLinux 7**:
- Highest: PHP 8.0 (via Remi repository).
- Lowest: PHP 5.4 (via Remi repository).
#### **openEuler**:
- **openEuler 22.03**:
- Highest: PHP 8.4 (default repository).
- Lowest: PHP 7.4 (default repository).
- **openEuler 20.03**:
- Highest: PHP 7.3 (default repository).
- Lowest: PHP 7.0 (default repository).
### Full List of PHP Versions and End of Life (EOL) Dates:
- ✨ **PHP 8.5** - EOL: 31 Dec 2028.
- ✨ **PHP 8.4** - EOL: 31 Dec 2027.
- ✨ **PHP 8.3** - EOL: 31 Dec 2027.
- ✨ **PHP 8.2** - EOL: 31 Dec 2026.
- ✨ **PHP 8.1** - EOL: 31 Dec 2025.
- 🛑 **PHP 8.0** - EOL: 26 Nov 2023.
- 🛑 **PHP 7.4** - EOL: 28 Nov 2022.
- 🛑 **PHP 7.3** - EOL: 6 Dec 2021.
- 🛑 **PHP 7.2** - EOL: 30 Nov 2020.
- 🛑 **PHP 7.1** - EOL: 1 Dec 2019.
- 🛑 **PHP 7.0** - EOL: 10 Jan 2019.
- 🛑 **PHP 5.6** - EOL: 31 Dec 2018.
- 🛑 **PHP 5.5** - EOL: 21 Jul 2016.
- 🛑 **PHP 5.4** - EOL: 3 Sep 2015.
- 🛑 **PHP 5.3** - EOL: 14 Aug 2014.
---
## 🌐 Supported OS Versions
CyberPanel runs on x86_64 architecture and supports the following operating systems:
### **Ubuntu**:
- Ubuntu 22.04 ✅ Supported until April 2027.
- Ubuntu 20.04 ✅ Supported until April 2025.
- Ubuntu 18.04 🛑 EOL: 31 May 2023.
### **CentOS**:
- CentOS 9 ✅ EOL: 31 May 2027.
- CentOS 8 🛑 EOL: 31 Dec 2021.
- CentOS 7 🛑 EOL: 30 June 2024.
### **RHEL**:
- RHEL 9 ✅ EOL: 31 May 2032.
- RHEL 8 ✅ EOL: 31 May 2029.
### **AlmaLinux**:
- AlmaLinux 9 ✅ EOL: 31 May 2027.
- AlmaLinux 8 🛑 EOL: 1 May 2024.
### **Other OS**:
- RockyLinux 8 ✅ EOL: 31 May 2029.
- CloudLinux 8 ✅ EOL: 31 May 2029.
- CloudLinux 7 🛑 EOL: 1 Jul 2024.
- openEuler 22.03 🛑 EOL: March 2024.
- openEuler 20.03 🛑 EOL: April 2022.
---
## ⚙️ Installation Instructions
Install CyberPanel easily with the following command:
```bash
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
```
# Upgrading CyberPanel
---
```
## 📊 Upgrading CyberPanel
Upgrade your CyberPanel installation using:
```bash
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
```
# Resources
---
* [Official Site.](https://cyberpanel.net)
* [Docs (Old).](https://docs.cyberpanel.net)
* [Docs (New).](https://community.cyberpanel.net/docs)
* [Changelog.](https://community.cyberpanel.net/t/change-logs/161)
* [Forums.](https://community.cyberpanel.net)
* [Discord.](https://discord.gg/g8k8Db3)
* [Facebook Group.](https://www.facebook.com/groups/cyberpanel)
* [YouTube Channel.](https://www.youtube.com/@Cyber-Panel)
## 📚 Resources
- 🌐 [Official Site](https://cyberpanel.net)
- ✏️ [Docs (Old)](https://docs.cyberpanel.net)
- 🎓 [Docs (New)](https://community.cyberpanel.net/docs)
- ✅ [Changelog](https://community.cyberpanel.net/t/change-logs/161)
- 💬 [Forums](https://community.cyberpanel.net)
- 📢 [Discord](https://discord.gg/g8k8Db3)
- 📵 [Facebook Group](https://www.facebook.com/groups/cyberpanel)
- 🎥 [YouTube Channel](https://www.youtube.com/@Cyber-Panel)
---

View File

@ -849,7 +849,17 @@ if [[ $Server_OS = "CentOS" ]] ; then
dnf install libxcrypt-compat -y
fi
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms || yum config-manager --set-enabled crb > /dev/null 2>&1
# check if OS is AlmaLinux
if grep -q -E "AlmaLinux|Rocky Linux" /etc/os-release ; then
# check and install dnf-plugins-core if not installed
rpm -q dnf-plugins-core > /dev/null 2>&1 || dnf install -y dnf-plugins-core
# enable codeready-builder repo for AlmaLinux
dnf config-manager --set-enabled crb > /dev/null 2>&1
else
# enable codeready-builder repo for Other RHEL Based OS
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms > /dev/null 2>&1
fi
yum install -y https://cyberpanel.sh/dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Check_Return "yum repo" "no_exit"
yum install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm

View File

@ -24,7 +24,7 @@
<div class="col-sm-12">
<div class="alert alert-danger">
<p>{% trans "CloudLinux is not installed on your server." %} <a target="_blank"
href="https://go.cyberpanel.net/CLConvert">Click
href="https://community.cyberpanel.net/t/1-convert-cyberpanel-to-cloudlinux-os-and-install-cagefs/174">Click
Here</a> {% trans " for conversion details." %}</p>
</div>
</div>

View File

@ -114,13 +114,17 @@ def verifyLogin(request):
request.session['userID'] = admin.pk
ipAddr = request.META.get('REMOTE_ADDR')
ipAddr = request.META.get('HTTP_CF_CONNECTING_IP')
if ipAddr is None:
ipAddr = request.META.get('REMOTE_ADDR')
if ipAddr.find(':') > -1:
ipAddr = ipAddr.split(':')[:3]
request.session['ipAddr'] = ''.join(ipAddr)
request.session['ipAddr'] = ipAddr
else:
request.session['ipAddr'] = request.META.get('REMOTE_ADDR')
request.session['ipAddr'] = request.META.get('HTTP_CF_CONNECTING_IP')
if request.session['ipAddr'] is None:
request.session['ipAddr'] = request.META.get('REMOTE_ADDR')
request.session.set_expiry(43200)
data = {'userID': admin.pk, 'loginStatus': 1, 'error_message': "None"}

View File

@ -1813,9 +1813,9 @@ milter_default_action = accept
else:
return redirect("https://cyberpanel.net/cyberpanel-addons")
else:
template = 'baseTemplate/EmailLimits.html'
template = 'mailServer/EmailLimits.html'
except BaseException as msg:
template = 'baseTemplate/EmailLimits.html'
template = 'mailServer/EmailLimits.html'
proc = httpProc(self.request, template,

View File

@ -892,7 +892,11 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
cursor.execute("UPDATE loginSystem_acl SET config = '%s' where name = 'admin'" % (Upgrade.AdminACL))
except BaseException as msg:
print(str(msg))
import sleep
try:
import sleep
except:
from time import sleep
from time import sleep
sleep(10)
try: