MySQL 5.7.26一键安装脚本,CentOS7.4适用
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL 5.7.26一键安装脚本,CentOS7.4适用相关的知识,希望对你有一定的参考价值。
#!/bin/bash#########mysql5.7RPM auto install###########
#########2019-5-2###########################
mkdir -p /root/mysql
cd /root/mysql
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar &>/dev/null
tar xf mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar
#rpm -qa |grep mariadb
yum remove mariadb-libs-5.5.56-2.el7.x86_64 &>/dev/null
if [ $? -eq 0 ];then
yum install libaio -y &>/dev/null
fi
rpm -ivh mysql-community-common-5.7.26-1.el7.x86_64.rpm &>/dev/null
rpm -ivh mysql-community-libs-5.7.26-1.el7.x86_64.rpm &>/dev/null
rpm -ivh mysql-community-devel-5.7.26-1.el7.x86_64.rpm &>/dev/null
rpm -ivh mysql-community-client-5.7.26-1.el7.x86_64.rpm &>/dev/null
rpm -ivh mysql-community-server-5.7.26-1.el7.x86_64.rpm &>/dev/null
rpm -ivh mysql-community-libs-compat-5.7.26-1.el7.x86_64.rpm &>/dev/null
yum install postfix -y &>/dev/null
systemctl start mysqld && systemctl start postfix
以上是关于MySQL 5.7.26一键安装脚本,CentOS7.4适用的主要内容,如果未能解决你的问题,请参考以下文章