You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#========================================================================================
# 需要安装一下mysql client进行管理
安装步骤见 mysql/安装.txt --->如果您的机器里直接键入mysql有反应, 即已安装了mysql client,可以无视这个安装过程, 我实验时机器是全新的, 没有mysql client需要现安装。
#========================================================================================
# 关闭SeLinux
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
# 配置国内163 yum源
yum install wget -y
yum clean all
yum makecache
yum update -y
# 安装ntp对表
yum -y install ntp
ntpdate -u ntp1.aliyun.com
ntpdate -u ntp2.aliyun.com
# 安装支撑包
yum install -y epel-release ghostscript unzip telnet
yum install -y wget gcc gcc-c++ cmake make gcc-g77
yum install -y autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make perl bison ntpdate
yum install -y readline-devel pcre-devel openssl-devel tcl perl
yum install -y socat make g++ libtool autoconf automake imake libxml2-devel expat-devel
# mysql安装的方法
1、在 /home/mysql 目录,下载如下四个软件包
http://mirrors.sohu.com/mysql/MySQL-5.7/
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-client-5.7.23-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-common-5.7.23-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-libs-5.7.23-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-server-5.7.23-1.el6.x86_64.rpm
2、检查mysql rpm相关的包是否安装并去除
rpm -qa | grep -i mysql
mysql80-community-release-el6-3.noarch
如果发现有以前安装过的,可以级联删除之:
rpm -e mysql80-community-release-el6-3.noarch
#将依赖包一并删除
yum remove -y mysql-libs
#再次查询是否删除干净
rpm -qa | grep -i mysql
3、同时安装这三个rpm包
rpm -ivh mysql-community-client-5.7.23-1.el6.x86_64.rpm mysql-community-common-5.7.23-1.el6.x86_64.rpm mysql-community-libs-5.7.23-1.el6.x86_64.rpm
(如果缺少glibc.so之类的错误)
wget https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/glibc-2.14.tar.gz
cd /usr/local
tar xf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd build
../configure --prefix=/opt/glibc-2.14 --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make
make install