Skip to content

Commit

Permalink
bug fix mariadb install on ALMALINUX ref #1219
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Feb 18, 2024
1 parent 36ef3e4 commit 590269a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cyberpanel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
14 changes: 14 additions & 0 deletions install/installCyberPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -367,6 +369,18 @@ def installMySQL(self, mysql):
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)
Expand Down

0 comments on commit 590269a

Please sign in to comment.