Skip to content

Commit

Permalink
update default mariadb version to 10.11
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 14, 2024
1 parent fa4848f commit ab8ede8
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions install/installCyberPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,21 +321,20 @@ def installMySQL(self, mysql):
command = 'dnf install mariadb-server -y'
elif self.distro == cent8 or self.distro == openeuler:

RepoPath = '/etc/yum.repos.d/mariadb.repo'
RepoContent = f"""
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.11/rhel8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
"""
WriteToFile = open(RepoPath, 'w')
WriteToFile.write(RepoContent)
WriteToFile.close()
command = 'curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.11'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)

command = 'yum remove mariadb* -y'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)

command = 'sudo dnf -qy module disable mariadb'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)

command = 'sudo dnf module reset mariadb -y'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)


command = 'dnf -y install mariadb-server'
command = 'dnf install MariaDB-server MariaDB-client MariaDB-backup'

install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)

Expand Down

0 comments on commit ab8ede8

Please sign in to comment.