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 9506038 commit a928794
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions install/installCyberPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def installMySQL(self, mysql):
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)

command = "DEBIAN_FRONTEND=noninteractive apt-get install apt-transport-https curl -y"
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)

command = "mkdir -p /etc/apt/keyrings"
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
Expand All @@ -299,12 +299,12 @@ def installMySQL(self, mysql):
WriteToFile.close()


command = "DEBIAN_FRONTEND=noninteractive sudo apt-get install mariadb-server -y"
command = "DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server -y"
elif self.distro == centos:

RepoPath = '/etc/yum.repos.d/mariadb.repo'
RepoContent = f"""
[mariadb]
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.11/rhel8-amd64
module_hotfixes=1
Expand All @@ -317,19 +317,20 @@ def installMySQL(self, mysql):

command = 'dnf install mariadb-server -y'
elif self.distro == cent8 or self.distro == openeuler:
### check if cent8 which means Alma8 then add Mariadb 10.6 repo
# if self.distro == cent8:
# content = """
# [mariadb]
# name = MariaDB
# baseurl = http://yum.mariadb.org/10.6/rhel8-amd64
# module_hotfixes=1
# gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
# gpgcheck=1
# """
# writeToFile = open('/etc/yum.repos.d/mariadb.repo', 'w')
# writeToFile.write(content)
# writeToFile.close()

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 = 'dnf -y install mariadb-server'

Expand Down

0 comments on commit a928794

Please sign in to comment.