mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 15:56:11 +01:00
bug fix mariadb install on ALMALINUX ref https://github.com/usmannasir/cyberpanel/issues/1219
This commit is contained in:
@@ -864,14 +864,6 @@ EOF
|
||||
dnf config-manager --set-enabled PowerTools > /dev/null 2>&1
|
||||
dnf config-manager --set-enabled powertools > /dev/null 2>&1
|
||||
|
||||
cat <<EOF >/etc/yum.repos.d/MariaDB.repo
|
||||
[mariadb]
|
||||
name = MariaDB
|
||||
baseurl = https://rpm.mariadb.org/10.6/rhel/\$releasever/\$basearch
|
||||
gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck=1
|
||||
EOF
|
||||
|
||||
|
||||
# cat <<EOF >/etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo
|
||||
#[powertools-for-cyberpanel]
|
||||
|
||||
@@ -44,6 +44,8 @@ def FetchCloudLinuxVersion():
|
||||
return 89
|
||||
elif (data.find('CloudLinux') > -1 or data.find('cloudlinux') > -1) and (data.find('8.8') > -1 or data.find('Anatoly Filipchenko') > -1):
|
||||
return 88
|
||||
elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('8.7') > -1 or data.find('Stone Smilodon') > -1):
|
||||
return 87
|
||||
else:
|
||||
return -1
|
||||
|
||||
@@ -367,6 +369,18 @@ 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()
|
||||
elif FetchCloudLinuxVersion() >= 87:
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user