编译安装Mysql8

yum install -y wget
wget -O /etc/yum.repos.d/CentOS-Epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache
yum install -y vim make telnet lsof inotify-tools tree rdate ntp libaio gcc gcc-c++ psmisc net-tools screen expect sysstat hdparm traceroute zip unzip pcre pcre-devel zlib zlib-devel openssl openssl-devel tcping
cd /opt && mkdir apps conf src scripts data data/data_16303
chown -R swadmin:swadmin /opt/*
chmod 750 /opt/* -R
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpm
yum install -y percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpm
cd /opt/src
wget https://yw-du.oss-cn-hongkong.aliyuncs.com/mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz
tar -xf mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz -C /opt/apps/
cd /opt/apps/
mv mysql-8.0.19-linux-glibc2.12-x86_64/ mysql8
cd /opt/conf
wget https://yw-du.oss-cn-hongkong.aliyuncs.com/my.cnf
/opt/apps/mysql8/bin/mysqld --defaults-file=/opt/conf/my.cnf --initialize-insecure --user=swadmin   &
sleep 5
/opt/apps/mysql8/bin/mysqld --defaults-file=/opt/conf/my.cnf --user=swadmin &
sleep 5
上一篇:[陇原战"疫"]2021 web CheckIN


下一篇:CentOS安装wget命令