File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -240,10 +240,30 @@ def installMySQL(self, mysql):
240240
241241 ############## Install mariadb ######################
242242
243+ mRepo = '/etc/yum.repos.d/MariaDB.repo'
244+
243245 if self .distro == ubuntu :
246+
247+
248+
244249 command = "apt-get -y install mariadb-server"
245250 elif self .distro == centos :
246- command = 'yum --enablerepo=CyberPanel -y install mariadb-server'
251+ mRepo = '/etc/yum.repos.d/MariaDB.repo'
252+
253+ content = """# MariaDB 10.5 CentOS repository list - created 2020-09-03 09:44 UTC
254+ # http://downloads.mariadb.org/mariadb/repositories/
255+ [mariadb]
256+ name = MariaDB
257+ baseurl = http://yum.mariadb.org/10.5/centos7-amd64
258+ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
259+ gpgcheck=1
260+ """
261+
262+ writeToFile = open (mRepo , 'w' )
263+ writeToFile .write (content )
264+ writeToFile .close ()
265+
266+ command = 'yum --enablerepo=MariaDB -y install MariaDB-server MariaDB-client'
247267 elif self .distro == cent8 :
248268 command = 'dnf -y install mariadb-server'
249269
You can’t perform that action at this time.
0 commit comments