From a7ec231d24054cecbc81caf0cd227edc12f75f0d Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sun, 18 Feb 2024 16:34:53 +0500 Subject: [PATCH] bug fix mariadb install on ALMALINUX ref https://github.com/usmannasir/cyberpanel/issues/1219 --- install/installCyberPanel.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 94958972d..1050ad6ae 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -369,17 +369,15 @@ gpgcheck=1 if type == 'cl' and version >= 88: - repo = '/etc/yum.repos.d/mariadb.repo' - repoContent = ''' -[mariadb] -name = MariaDB -baseurl = https://rpm.mariadb.org/10.6/rhel/$releasever/$basearch -gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB -gpgcheck=1 -''' - WriteToFile = open(repo, 'w') - WriteToFile.write(repoContent) - WriteToFile.close() + + command = 'yum remove db-governor db-governor-mysql -y' + install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True) + + command = 'yum install governor-mysql' + install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True) + + command = '/usr/share/lve/dbgovernor/mysqlgovernor.py --mysql-version=mariadb106 --yes' + else: command = 'curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.11' @@ -395,7 +393,7 @@ gpgcheck=1 install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True) - command = 'dnf install MariaDB-server MariaDB-client MariaDB-backup -y' + command = 'dnf install MariaDB-server MariaDB-client MariaDB-backup -y' install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)