Add use of the mysql-innovation repository (#186)

This commit is contained in:
Evgeniy Antonyuk 2024-04-01 17:39:49 +07:00 committed by GitHub
parent 99de13fc43
commit ab083721a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -74,6 +74,14 @@ elif dpkg -l | grep -q "mysql-apt-config" && [ "$(apt-cache policy mysql-apt-con
rm -f ${MYSQL_PACKAGE_NAME} rm -f ${MYSQL_PACKAGE_NAME}
fi fi
if ! grep -q "mysql-innovation" /etc/apt/sources.list.d/mysql.list; then
echo "deb [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] http://repo.mysql.com/apt/${DIST} ${DISTRIB_CODENAME} mysql-innovation" | sudo tee -a /etc/apt/sources.list.d/mysql.list
if apt-get -y update 2>&1 | grep -q "^W: .*mysql-innovation"; then
sudo sed -i '/mysql-innovation/d' /etc/apt/sources.list.d/mysql.list
fi
fi
# add redis repo # add redis repo
if [ "$DIST" = "ubuntu" ]; then if [ "$DIST" = "ubuntu" ]; then
curl -fsSL https://packages.redis.io/gpg | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/redis.gpg --import curl -fsSL https://packages.redis.io/gpg | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/redis.gpg --import

View File

@ -57,6 +57,10 @@ dnf remove -y @mysql && dnf module -y reset mysql && dnf module -y disable mysql
MYSQL_REPO_VERSION="$(curl https://repo.mysql.com | grep -oP "mysql80-community-release-${MYSQL_DISTR_NAME}${REV}-\K.*" | grep -o '^[^.]*' | sort | tail -n1)" MYSQL_REPO_VERSION="$(curl https://repo.mysql.com | grep -oP "mysql80-community-release-${MYSQL_DISTR_NAME}${REV}-\K.*" | grep -o '^[^.]*' | sort | tail -n1)"
yum localinstall -y https://repo.mysql.com/mysql80-community-release-${MYSQL_DISTR_NAME}${REV}-${MYSQL_REPO_VERSION}.noarch.rpm || true yum localinstall -y https://repo.mysql.com/mysql80-community-release-${MYSQL_DISTR_NAME}${REV}-${MYSQL_REPO_VERSION}.noarch.rpm || true
if ! yum repolist enabled | grep -q mysql-innovation-community; then
sudo yum-config-manager --enable mysql-innovation-community
fi
if ! rpm -q mysql-community-server; then if ! rpm -q mysql-community-server; then
MYSQL_FIRST_TIME_INSTALL="true"; MYSQL_FIRST_TIME_INSTALL="true";
fi fi