Commit Graph

124 Commits

Author SHA1 Message Date
master3395
98c7fefd99 Fix MariaDB installation issues on AlmaLinux 9
- Enhanced MariaDB-server-compat package removal with multiple aggressive attempts
- Added --allowerasing and dnf exclude to prevent compat package conflicts
- Added MariaDB binary verification before password change
- Added service status verification and wait time
- Improved error handling and graceful failure
- Fixed FileNotFoundError when mysql command not found

Fixes:
- MariaDB-server-compat-12.1.2-1.el9.noarch conflict with MariaDB 10.11
- mysql command not found after failed installation
- Installation proceeding when MariaDB wasn't actually installed
2026-01-27 00:41:43 +01:00
master3395
da4c1d9601 Fix compat removal, shell metachars in call(), upgrade AlmaLinux 9 MariaDB
- install_utils.call: use shell=True for commands with ||, 2>, |, etc.
  Avoids 'No matching repo to modify: 2>/dev/null, true, ||' when
  dnf config-manager '... 2>/dev/null || true' is run via shlex.split.

- Add explicit 'rpm -e --nodeps MariaDB-server-compat-12.1.2-1.el9.noarch'
  before dnf remove in main(), installMySQL, fix_almalinux9_comprehensive.

- upgrade fix_almalinux9_mariadb: add compat removal before MariaDB install;
  use MariaDB 10.11 repo instead of 12.1 to avoid compat conflicts.
2026-01-27 00:23:56 +01:00
master3395
de21c03fc7 Fix MariaDB compat, mysql path, and OpenLiteSpeed binary install
MariaDB-server-compat:
- Remove MariaDB-server-compat* in main() before any MariaDB install
- Use dnf remove then rpm -e --nodeps loop in main(), installMySQL, fix_almalinux9
- Prevents transaction conflicts when installing MariaDB 10.11

mysql command not found:
- install_utils.call: detect mysql/mariadb commands, use shell=True and full path
- Replace leading mysql/mariadb with /usr/bin/mariadb or /usr/bin/mysql
- Fixes FileNotFoundError when changeMYSQLRootPassword runs

OpenLiteSpeed:
- Create /usr/local/lsws and /usr/local/lsws/bin before installing custom binary
- Fixes 'No such file or directory: /usr/local/lsws/bin/openlitespeed'
2026-01-26 23:21:53 +01:00
master3395
99b24f853a Fix mysql command not found error in install_utils.call
- Detect mysql/mariadb commands and find binary path automatically
- Replace mysql/mariadb with full path (/usr/bin/mysql or /usr/bin/mariadb)
- Use shell=True for mysql commands to handle complex SQL properly
- Fixes FileNotFoundError when executing mysql commands
- Works with both mysql and mariadb binaries
2026-01-26 22:58:56 +01:00
master3395
a28c4287bf Remove conflicting MariaDB-server-compat packages before installation
- Remove MariaDB-server-compat* packages that conflict with MariaDB 10.11
- Fixes transaction test errors when installing MariaDB 10.11
- Removes compat packages from previous MariaDB 12.1 installation attempts
- Ensures clean MariaDB 10.11 installation without conflicts
- Also remove sudo from curl command (not needed when running as root)
2026-01-26 22:58:06 +01:00
master3395
ba43d72649 Call disableMariaDB12RepositoryIfNeeded earlier in main() function
- Called immediately after apply_os_specific_fixes()
- Runs before Pre_Install_Required_Components attempts MariaDB installation
- Ensures dnf exclude is set before any package operations
- Prevents MariaDB upgrade attempts
2026-01-26 21:49:17 +01:00
master3395
65af295f0e Improve MariaDB repository disabling and add dnf exclude
- Enhanced repository file detection using glob
- Better repository file parsing to disable MariaDB sections
- Always add MariaDB-server to dnf excludes to prevent upgrades
- Handles both existing and new dnf.conf files
- Prevents MariaDB upgrade attempts in Pre_Install_Required_Components
2026-01-26 21:48:45 +01:00
master3395
98ec16f714 Call disableMariaDB12RepositoryIfNeeded in fix_almalinux9_comprehensive
- Ensures MariaDB 12.1 repository is disabled early in the process
- Called before Pre_Install_Required_Components runs
- Prevents upgrade attempts when MariaDB 10.x is already installed
2026-01-26 21:42:34 +01:00
master3395
bd570c563b Add function to disable MariaDB 12.1 repository when 10.x is installed
- Prevents upgrade attempts in Pre_Install_Required_Components
- Called early in installation process before repository setup
- Disables MariaDB 12.1 repository files if MariaDB 10.x is detected
- Fixes 'PREIN scriptlet failed' error during installation
2026-01-26 21:42:12 +01:00
master3395
273e3ecdc3 Add MariaDB check before repository setup in installMySQL
- Check if MariaDB is already installed before setting up 12.1 repository
- Skip repository setup if MariaDB 10.x is installed to avoid upgrade conflicts
- Prevents 'PREIN scriptlet failed' error when installer tries to upgrade
- Uses existing MariaDB installation if detected
2026-01-26 21:41:39 +01:00
master3395
9ba66d8c04 Fix MariaDB installation in fix_almalinux9_comprehensive to check for existing installation
- Check for existing MariaDB before attempting installation
- Prevents upgrade errors when MariaDB 10.x is already installed
- Skips installation if MariaDB is already present
- Fixes 'PREIN scriptlet failed' error during installation
2026-01-26 21:36:06 +01:00
master3395
17421b6dfe Fix v2.5.5-dev installation issues: handle curl execution and MariaDB upgrade attempts
- Fix install.sh to detect curl/wget execution and clone repo before loading modules
- Add MariaDB detection and upgrade attempt logic in install.py
- Attempt MariaDB 12.1 upgrade first, fallback to existing 10.x if blocked
- Add comprehensive error handling and logging for upgrade attempts
- Update documentation with fix details
2026-01-26 20:39:25 +01:00
Master3395
c3abff58f4 Download CDN libraries locally to eliminate tracking prevention warnings. Updated index.html to reference local copies of qrious.min.js and chart.umd.min.js. Added functionality in install.py and upgrade.py to download these libraries before running collectstatic. Updated website.html to ensure compatibility with the new local scripts. 2026-01-01 05:29:46 +01:00
Master3395
e693afab8a Enhance venvsetup.sh to conditionally create timezone.ini file
- Added logic to check for the successful installation of the timezonedb extension before creating the corresponding .ini file.
- Implemented a check to verify the existence of timezonedb.so in the PHP extension directory, improving the robustness of the installation process.

These changes ensure that the timezone configuration is only applied when the extension is available, enhancing the reliability of the setup script.
2025-12-31 22:44:58 +01:00
Master3395
dc8bc57b35 Randomize acme.sh cron schedule in installation and upgrade scripts to prevent traffic spikes to Let's Encrypt. Added logic to generate random hour and minute for cron job entries, enhancing the installation process. 2025-12-31 22:26:50 +01:00
Master3395
ff382f2d78 Implement Catch-All Email Configuration Management
- Added new model `CatchAllEmail` to store catch-all email configurations per domain.
- Implemented views for fetching, saving, and deleting catch-all email configurations, enhancing email management capabilities.
- Updated URL routing to include endpoints for catch-all email operations.
- Enhanced error handling and permission checks for email forwarding actions.

These changes improve the flexibility and user experience of email management within CyberPanel.
2025-12-31 22:18:33 +01:00
Master3395
f8a2370336 Implement dynamic PHP version detection and configuration updates
- Added a new function `detect_default_php` to dynamically determine the default PHP version based on symlink and available versions, enhancing compatibility with PHP 7.4-8.5.
- Updated `phpmyadmin_limits` to utilize the detected PHP version for configuration changes, ensuring accurate parameter adjustments for the current PHP environment.
- Enhanced installation scripts for Redis and Memcached extensions to support PHP versions 7.4-8.5, improving backward compatibility and installation reliability.
- Improved error handling for missing PHP configuration files, providing clearer feedback to users.

These changes enhance the flexibility and robustness of PHP management within CyberPanel.
2025-12-17 19:48:28 +01:00
Master3395
7c692ab250 Implement .htaccess feature banner and extraction support in file manager
- Added a new fixed position banner in the index.html to announce .htaccess support, including styling and functionality for showing and dismissing the notification.
- Enhanced file manager to support extraction of 7z and rar file formats, with appropriate command handling in filemanager.py.
- Updated JavaScript files to determine extraction types based on file extensions, ensuring compatibility with new formats.
- Modified HTML templates to include options for 7z and rar compression types in the user interface.
https://github.com/usmannasir/cyberpanel/issues/1617#issue-3727006951

These changes improve user experience by providing clear notifications and expanding file management capabilities within CyberPanel.
2025-12-17 19:19:00 +01:00
Master3395
b6528bb21d Enhance Postfix management and validation in installation scripts
- Refactored the enableDisableEmail function to improve handling of Postfix service enabling and disabling, including better error logging and cleanup of stale marker files.
- Added a new method in mailUtilities to check if Postfix is installed, ensuring that DKIM setup only proceeds if Postfix is available.
- Updated virtualHostUtilities to verify Postfix installation before attempting DKIM setup, with appropriate logging for missing markers.
- Improved overall robustness of email service management during installation and configuration processes.

https://github.com/usmannasir/cyberpanel/issues/1570
2025-11-02 20:29:45 +01:00
usmannasir
5dae7583bb Fix MySQL password file permissions for cyberpanel group access
- Set proper ownership (root:cyberpanel) and permissions (640) on /etc/cyberpanel/mysqlPassword
- Ensures cyberpanel group can read the password file to prevent permission denied errors
- Falls back to root-only permissions if cyberpanel group doesn't exist yet
- Also fixes permissions on existing password files during installation
2025-10-03 16:43:31 +05:00
usmannasir
e34958a05f Move CyberPanel account setup earlier in installation process
Account creation now happens immediately after Python version check, before other system operations. This ensures system users are available for subsequent installation steps.
2025-10-03 15:55:40 +05:00
usmannasir
93252c6662 Fix PowerDNS installation in v2.5.5-dev branch
Added missing PowerDNS configuration setup that was present in v2.4.4:
- Added installPowerDNSConfigurations() method to properly copy and configure pdns.conf
- Fixed PowerDNS installation to call configuration method after package installation
- Updated fixAndStartPowerDNS() to copy config template if missing
- Added proper MySQL password configuration for PowerDNS backend
- Added errno import for proper error handling

This fixes PowerDNS installation failures by ensuring the configuration file is properly created and configured with database credentials.
2025-10-01 12:31:01 +05:00
usmannasir
d5258ac85b fix static file permissions 2025-10-01 11:46:58 +05:00
usmannasir
80c68d4123 bug fix: login page issue 2025-10-01 03:18:39 +05:00
usmannasir
16828b74aa bug fix: login page issue 2025-10-01 02:33:55 +05:00
usmannasir
de892ee4fd find was deleting important env files 2025-10-01 00:45:40 +05:00
usmannasir
6cbcc2862f bug fix: remove migrations commands 2025-10-01 00:20:05 +05:00
usmannasir
0e59310810 bug fix: remove migrations commands 2025-09-30 23:46:10 +05:00
usmannasir
fa039448e0 find was deleting important env files 2025-09-30 16:27:14 +05:00
usmannasir
77be45d692 bug fixes to isntall code 2025-09-29 12:42:27 +05:00
usmannasir
236ecd7ea8 fix: Comprehensive MariaDB socket authentication support
- Add execute_mysql_command() helper in install.py for robust auth fallback
- Update mysqlUtilities.py with socket auth fallback for all operations:
  * Database creation
  * User creation
  * Privilege granting
  * Privilege flushing
- Fix PowerDNS database setup to use new authentication helper
- Improve cyberpanel user connection verification
- Add proper error handling and logging throughout

This ensures the installation works correctly when MariaDB is pre-installed
with socket authentication (common with dependency installations).

Fixes the 'Cannot update settings with empty passwords' installation failure.
2025-09-29 12:18:03 +05:00
usmannasir
aff2f5f9c2 fix: Handle MariaDB socket authentication in changeMYSQLRootPassword()
- Add socket authentication support (sudo mysql/mariadb) for fresh MariaDB installs
- Fallback to traditional password-based authentication for existing installs
- Improve error handling with subprocess.run() and proper timeouts
- Add detailed logging to show which authentication method succeeded
- Graceful degradation when all methods fail
- Fixes installation failure when MariaDB is pre-installed as dependency

Resolves issue where installation fails with 'Cannot update settings with empty passwords'
when MariaDB gets installed during dependency phase with socket authentication.
2025-09-28 13:19:30 +05:00
usmannasir
db54c62010 bug fix: cyberpanel db 2025-09-28 03:27:18 +05:00
usmannasir
9336ade62a bug fix: cyberpanel db 2025-09-28 03:07:06 +05:00
usmannasir
46d7337bc6 bug fix: cyberpanel db 2025-09-28 02:50:33 +05:00
usmannasir
df9567a656 bug fixes to isntall code 2025-09-28 02:00:25 +05:00
usmannasir
14f46b6e56 bug fixes to isntall code 2025-09-28 00:05:35 +05:00
usmannasir
978d660c5d bug fix: circular import 2025-09-27 14:13:33 +05:00
usmannasir
ec159448af bug fix: staging site issue 2025-09-27 11:41:16 +05:00
Master3395
fd6eb8895c Update repository URLs to use secure HTTPS links
- Changed repository URLs in the CyberPanel upgrade script and related installation scripts to use HTTPS for improved security.
- Updated the `mailscannerinstaller.sh` and `spamassassin_tojunk_installer.sh` scripts to reflect the new secure URLs.
- Modified the `install.py` script to include an additional parameter in the `update_settings_file` method for better password management.
2025-09-25 22:45:35 +02:00
Master3395
afa0158a3b Remove deprecated environment configuration and testing scripts
- Deleted the .env.template file and the env_generator.py script to streamline the installation process.
- Removed various test scripts related to installation and compatibility checks, as they are no longer necessary with the updated configuration approach.
- Updated settings.py to directly include secure credentials, eliminating the need for external environment files.
- Enhanced security by ensuring sensitive information is handled directly within the application code.
2025-09-25 22:29:53 +02:00
Master3395
61f184bb2f Add comprehensive OS compatibility features and testing scripts
- Introduced `INSTALLER_COMPLETION_SUMMARY.md` to summarize the overhaul of the CyberPanel installer for universal OS compatibility.
- Added `test_all_os_compatibility.sh` and `test_installer_all_os.sh` for thorough testing across all supported operating systems.
- Implemented `validate_installation.sh` to ensure successful installation and service status verification.
- Created `universal_os_fixes.py` to manage OS-specific fixes and package installations.
- Enhanced `install.py` to integrate universal fixes and improve error handling during installation.
- Updated `UNIVERSAL_OS_COMPATIBILITY.md` with detailed documentation on compatibility features and testing procedures.
- Achieved 100% compatibility across all supported OS versions, ensuring a seamless installation experience for users.
2025-09-25 09:35:42 +02:00
Master3395
64b8dd931a Refactor installation script for improved readability and error handling
- Adjusted indentation in `install.py` for better code clarity.
- Enhanced error handling in package installation logic to prevent silent failures.
- Streamlined configuration file checks and updates for OpenLiteSpeed port changes.
2025-09-25 02:49:14 +02:00
Master3395
09caa5bda8 Update installation scripts for improved package handling and service management
- Modified `cyberpanel.sh` to correct the path for the `lsmcd` executable.
- Enhanced `install.py` with comprehensive fallback logic for installing AlmaLinux 9 packages, including support for PowerTools and alternative repositories.
- Improved error handling and installation methods in `venvsetup.sh` to ensure successful package installations with better error suppression and individual package handling.
- Added checks for service existence and installation for PowerDNS, improving the robustness of the installation process.
2025-09-25 02:12:33 +02:00
Master3395
e1ea4f8a1e Enhance MariaDB repository configuration and AlmaLinux 9 support
- Updated MariaDB repository URLs in cyberpanel_upgrade.sh and cyberpanel.sh to use the mirror site for improved reliability.
- Added logic in cyberpanel_upgrade.sh to determine the appropriate MariaDB repository based on the OS version.
- Introduced a new method in install.py to apply specific fixes for AlmaLinux 9, including the installation of compatibility packages.
- Removed the obsolete simple_install.py script to streamline the installation process.
2025-09-25 01:34:57 +02:00
Master3395
8c4083f4e4 Remove obsolete documentation and testing scripts related to branch prefix fixes and installation validation. Update MariaDB version to 12.1 in relevant scripts, enhancing compatibility and error handling for AlmaLinux 9. Improve user prompts in installation scripts for clarity and default options. Ensure MySQL password file handling is robust and properly logged. 2025-09-25 00:56:00 +02:00
Master3395
b739b4a038 Update MariaDB version to 12.1 across installation scripts
- Changed MariaDB server version from 10.11 to 12.1 in cyberpanel_upgrade.sh, cyberpanel.sh, install.py, and venvsetup.sh to ensure compatibility with the latest features and security updates.
- Enhanced error handling for branch and commit verification in venvsetup.sh to improve installation reliability.
- Streamlined the requirements file download process with fallback options in venvsetup.sh to handle potential download failures.
2025-09-24 23:45:28 +02:00
Master3395
1a7688e3f2 Enhance AlmaLinux 9 support in installation scripts
- Updated cyberpanel_upgrade.sh to differentiate AlmaLinux 9 for dnf package management and specific package installations.
- Improved OS detection logic to handle AlmaLinux 9 separately, ensuring correct repository setup and package installations.
- Enhanced error handling and logging for better feedback during the installation process.
- Refined version validation in cyberpanel.sh to support stable versions, development versions, and commit hashes.
- Streamlined installation process in install.sh to accommodate specific branch, tag, or commit installations.
2025-09-24 22:45:12 +02:00
Master3395
b86037e928 Refactor installation scripts for improved compatibility and error handling
- Updated installation scripts to enhance OS detection and streamline the installation process.
- Improved error handling and logging for MariaDB setup and service configuration.
- Consolidated functionality by removing deprecated scripts, ensuring better maintainability.
2025-09-24 21:02:31 +02:00
Master3395
157f89fde2 Refactor AlmaLinux 9 installation process to apply comprehensive fixes
- Renamed the fix method to `fix_almalinux9_comprehensive` to reflect broader scope.
- Streamlined the installation process by updating system packages, installing essential build tools, and adding PHP dependencies.
- Enhanced firewall configuration by adding required ports and ensuring the service is started and enabled.
- Improved error handling and logging throughout the installation steps for better feedback on the process.
2025-09-24 20:51:46 +02:00