HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux simsoft.ro 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/src/cyberpanel/testPlugin/OS_COMPATIBILITY.md
# OS Compatibility Guide - CyberPanel Test Plugin

## ๐ŸŒ Supported Operating Systems

The CyberPanel Test Plugin is designed to work seamlessly across all CyberPanel-supported operating systems with comprehensive multi-OS compatibility.

### โœ… Currently Supported OS

| Operating System | Version | Support Status | Python Version | Package Manager | Service Manager |
|------------------|---------|----------------|----------------|-----------------|-----------------|
| **Ubuntu** | 22.04 | โœ… Full Support | 3.10+ | apt-get | systemctl |
| **Ubuntu** | 20.04 | โœ… Full Support | 3.8+ | apt-get | systemctl |
| **Debian** | 11+ | โœ… Full Support | 3.9+ | apt-get | systemctl |
| **AlmaLinux** | 10 | โœ… Full Support | 3.11+ | dnf | systemctl |
| **AlmaLinux** | 9 | โœ… Full Support | 3.9+ | dnf | systemctl |
| **AlmaLinux** | 8 | โœ… Full Support | 3.6+ | dnf/yum | systemctl |
| **RockyLinux** | 9 | โœ… Full Support | 3.9+ | dnf | systemctl |
| **RockyLinux** | 8 | โœ… Full Support | 3.6+ | dnf | systemctl |
| **RHEL** | 9 | โœ… Full Support | 3.9+ | dnf | systemctl |
| **RHEL** | 8 | โœ… Full Support | 3.6+ | dnf | systemctl |
| **CloudLinux** | 8 | โœ… Full Support | 3.6+ | yum | systemctl |
| **CentOS** | 9 | โœ… Full Support | 3.9+ | dnf | systemctl |

### ๐Ÿ”ง Third-Party OS Support

| Operating System | Compatibility | Notes |
|------------------|---------------|-------|
| **Fedora** | โœ… Compatible | Uses dnf package manager |
| **openEuler** | โš ๏ธ Limited | Community-supported, limited testing |
| **Other RHEL derivatives** | โš ๏ธ Limited | May work with AlmaLinux/RockyLinux packages |

## ๐Ÿš€ Installation Compatibility

### Automatic OS Detection

The installation script automatically detects your operating system and configures the plugin accordingly:

```bash
# The script automatically detects:
# - OS name and version
# - Python executable path
# - Package manager (apt-get, dnf, yum)
# - Service manager (systemctl, service)
# - Web server (apache2, httpd)
```

### OS-Specific Configurations

#### Ubuntu/Debian Systems
```bash
# Package Manager: apt-get
# Python: python3
# Pip: pip3
# Service Manager: systemctl
# Web Server: apache2
# User/Group: cyberpanel:cyberpanel
```

#### RHEL-based Systems (AlmaLinux, RockyLinux, RHEL, CentOS)
```bash
# Package Manager: dnf (RHEL 8+) / yum (RHEL 7)
# Python: python3
# Pip: pip3
# Service Manager: systemctl
# Web Server: httpd
# User/Group: cyberpanel:cyberpanel
```

#### CloudLinux
```bash
# Package Manager: yum
# Python: python3
# Pip: pip3
# Service Manager: systemctl
# Web Server: httpd
# User/Group: cyberpanel:cyberpanel
```

## ๐Ÿ Python Compatibility

### Supported Python Versions

| Python Version | Ubuntu 22.04 | Ubuntu 20.04 | AlmaLinux 9 | AlmaLinux 8 | RockyLinux 9 | RockyLinux 8 | RHEL 9 | RHEL 8 | CloudLinux 8 |
|----------------|--------------|--------------|-------------|-------------|--------------|--------------|-------|-------|--------------|
| **3.6** | โŒ | โŒ | โŒ | โœ… | โŒ | โœ… | โŒ | โœ… | โœ… |
| **3.7** | โŒ | โŒ | โŒ | โœ… | โŒ | โœ… | โŒ | โœ… | โœ… |
| **3.8** | โŒ | โœ… | โŒ | โœ… | โŒ | โœ… | โŒ | โœ… | โœ… |
| **3.9** | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… |
| **3.10** | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… |
| **3.11** | โœ… | โŒ | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… |
| **3.12** | โœ… | โŒ | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… | โœ… |

### Python Path Detection

The plugin automatically detects the correct Python executable:

```python
# Detection order:
1. python3.12
2. python3.11
3. python3.10
4. python3.9
5. python3.8
6. python3.7
7. python3.6
8. python3
9. python (fallback)
```

## ๐Ÿ“ฆ Package Manager Compatibility

### Ubuntu/Debian (apt-get)
```bash
# Required packages
apt-get update
apt-get install -y python3 python3-pip python3-venv git curl
apt-get install -y build-essential python3-dev

# Python packages
pip3 install Django>=2.2,<4.0 django-cors-headers Pillow requests psutil
```

### RHEL-based (dnf/yum)
```bash
# RHEL 8+ (dnf)
dnf install -y python3 python3-pip python3-devel git curl
dnf install -y gcc gcc-c++ make

# RHEL 7 (yum)
yum install -y python3 python3-pip python3-devel git curl
yum install -y gcc gcc-c++ make

# Python packages
pip3 install Django>=2.2,<4.0 django-cors-headers Pillow requests psutil
```

### CloudLinux (yum)
```bash
# Required packages
yum install -y python3 python3-pip python3-devel git curl
yum install -y gcc gcc-c++ make

# Python packages
pip3 install Django>=2.2,<4.0 django-cors-headers Pillow requests psutil
```

## ๐Ÿ”ง Service Management Compatibility

### systemd (All supported OS)
```bash
# Service management commands
systemctl start lscpd
systemctl restart lscpd
systemctl status lscpd
systemctl enable lscpd

# Web server management
systemctl start apache2    # Ubuntu/Debian
systemctl start httpd      # RHEL-based
systemctl restart apache2  # Ubuntu/Debian
systemctl restart httpd    # RHEL-based
```

### Legacy init.d (Fallback)
```bash
# Service management commands
service lscpd start
service lscpd restart
service lscpd status

# Web server management
service apache2 start    # Ubuntu/Debian
service httpd start      # RHEL-based
```

## ๐ŸŒ Web Server Compatibility

### Apache2 (Ubuntu/Debian)
```bash
# Configuration paths
/etc/apache2/apache2.conf
/etc/apache2/sites-available/
/etc/apache2/sites-enabled/

# Service management
systemctl start apache2
systemctl restart apache2
systemctl status apache2
```

### HTTPD (RHEL-based)
```bash
# Configuration paths
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/

# Service management
systemctl start httpd
systemctl restart httpd
systemctl status httpd
```

## ๐Ÿ” Security Compatibility

### SELinux (RHEL-based systems)
```bash
# Check SELinux status
sestatus

# Set proper context for plugin files
setsebool -P httpd_can_network_connect 1
chcon -R -t httpd_exec_t /usr/local/CyberCP/testPlugin/
```

### AppArmor (Ubuntu/Debian)
```bash
# Check AppArmor status
aa-status

# Allow Apache to access plugin files
aa-complain apache2
```

### Firewall Compatibility
```bash
# Ubuntu/Debian (ufw)
ufw allow 8090/tcp
ufw allow 80/tcp
ufw allow 443/tcp

# RHEL-based (firewalld)
firewall-cmd --permanent --add-port=8090/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --reload

# iptables (legacy)
iptables -A INPUT -p tcp --dport 8090 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
```

## ๐Ÿงช Testing Compatibility

### Run Compatibility Test
```bash
# Navigate to plugin directory
cd /usr/local/CyberCP/testPlugin

# Run compatibility test
python3 test_os_compatibility.py

# Or make it executable and run
chmod +x test_os_compatibility.py
./test_os_compatibility.py
```

### Test Results
The compatibility test checks:
- โœ… OS detection and version
- โœ… Python installation and version
- โœ… Package manager availability
- โœ… Service manager functionality
- โœ… Web server configuration
- โœ… File permissions and ownership
- โœ… Network connectivity
- โœ… CyberPanel integration

### Sample Output
```
๐Ÿ” Testing OS Compatibility for CyberPanel Test Plugin
============================================================

๐Ÿ“‹ Testing OS Detection...
   โœ… OS: ubuntu 22.04 (x86_64)
   โœ… Supported: True

๐Ÿ Testing Python Detection...
   โœ… Python: Python 3.10.12
   โœ… Path: /usr/bin/python3
   โœ… Pip: /usr/bin/pip3
   โœ… Compatible: True

๐Ÿ“ฆ Testing Package Manager Detection...
   โœ… Package Manager: apt-get
   โœ… Available: True

๐Ÿ”ง Testing Service Manager Detection...
   โœ… Service Manager: systemctl
   โœ… Web Server: apache2
   โœ… Available: True

๐ŸŒ Testing Web Server Detection...
   โœ… Web Server: apache2
   โœ… Installed: True

๐Ÿ” Testing File Permissions...
   โœ… Plugin Directory: /home/cyberpanel/plugins
   โœ… CyberPanel Directory: /usr/local/CyberCP

๐ŸŒ Testing Network Connectivity...
   โœ… GitHub: True
   โœ… Internet: True

โšก Testing CyberPanel Integration...
   โœ… CyberPanel Installed: True
   โœ… Settings File: True
   โœ… URLs File: True
   โœ… LSCPD Service: True

============================================================
๐Ÿ“Š COMPATIBILITY TEST RESULTS
============================================================
Total Tests: 8
โœ… Passed: 8
โš ๏ธ  Warnings: 0
โŒ Failed: 0

๐ŸŽ‰ All tests passed! The plugin is compatible with this OS.
```

## ๐Ÿšจ Troubleshooting

### Common Issues by OS

#### Ubuntu/Debian Issues
```bash
# Python not found
sudo apt-get update
sudo apt-get install -y python3 python3-pip

# Permission denied
sudo chown -R cyberpanel:cyberpanel /home/cyberpanel/plugins
sudo chown -R cyberpanel:cyberpanel /usr/local/CyberCP/testPlugin

# Service not starting
sudo systemctl daemon-reload
sudo systemctl restart lscpd
```

#### RHEL-based Issues
```bash
# Python not found
sudo dnf install -y python3 python3-pip
# or
sudo yum install -y python3 python3-pip

# SELinux issues
sudo setsebool -P httpd_can_network_connect 1
sudo chcon -R -t httpd_exec_t /usr/local/CyberCP/testPlugin/

# Permission denied
sudo chown -R cyberpanel:cyberpanel /home/cyberpanel/plugins
sudo chown -R cyberpanel:cyberpanel /usr/local/CyberCP/testPlugin
```

#### CloudLinux Issues
```bash
# Python not found
sudo yum install -y python3 python3-pip

# CageFS issues
cagefsctl --enable cyberpanel
cagefsctl --update

# Permission denied
sudo chown -R cyberpanel:cyberpanel /home/cyberpanel/plugins
sudo chown -R cyberpanel:cyberpanel /usr/local/CyberCP/testPlugin
```

### Debug Commands
```bash
# Check OS information
cat /etc/os-release
uname -a

# Check Python installation
python3 --version
which python3
which pip3

# Check services
systemctl status lscpd
systemctl status apache2  # Ubuntu/Debian
systemctl status httpd    # RHEL-based

# Check file permissions
ls -la /home/cyberpanel/plugins/
ls -la /usr/local/CyberCP/testPlugin/

# Check CyberPanel logs
tail -f /home/cyberpanel/logs/cyberpanel.log
tail -f /home/cyberpanel/logs/django.log
```

## ๐Ÿ“‹ Installation Checklist

### Pre-Installation
- [ ] Verify OS is supported
- [ ] Check Python 3.6+ is installed
- [ ] Ensure CyberPanel is installed and running
- [ ] Verify internet connectivity
- [ ] Check available disk space (minimum 100MB)

### Installation
- [ ] Download installation script
- [ ] Run as root user
- [ ] Monitor installation output
- [ ] Verify plugin files are created
- [ ] Check Django settings are updated
- [ ] Confirm URL configuration is added

### Post-Installation
- [ ] Test plugin access via web interface
- [ ] Verify all features work correctly
- [ ] Check security settings
- [ ] Run compatibility test
- [ ] Review installation logs

## ๐Ÿ”„ Updates and Maintenance

### Updating the Plugin
```bash
# Navigate to plugin directory
cd /usr/local/CyberCP/testPlugin

# Pull latest changes
git pull origin main

# Restart services
sudo systemctl restart lscpd
sudo systemctl restart apache2  # Ubuntu/Debian
sudo systemctl restart httpd    # RHEL-based
```

### Uninstalling the Plugin
```bash
# Run uninstall script
sudo ./install.sh --uninstall

# Or manually remove
sudo rm -rf /usr/local/CyberCP/testPlugin
sudo rm -f /home/cyberpanel/plugins/testPlugin
```

## ๐Ÿ“ž Support

### OS-Specific Support
- **Ubuntu/Debian**: Check Ubuntu/Debian documentation
- **RHEL-based**: Check Red Hat documentation
- **CloudLinux**: Check CloudLinux documentation

### Plugin Support
- **GitHub Issues**: https://github.com/cyberpanel/testPlugin/issues
- **CyberPanel Forums**: https://forums.cyberpanel.net/
- **Documentation**: https://cyberpanel.net/docs/

---

**Last Updated**: December 2024  
**Compatibility Version**: 1.0.0  
**Next Review**: March 2025