1. Configure Yum
Alibaba Cloud Source
Since CentOS officially abandoned the maintenance and update of CentOS 6.x, all updates and packages have been removed
- Backup
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- Get Alibaba Cloud
CentOS 6
source
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
- Non-Alibaba Cloud server configuration
sed -i -e'/mirrors.cloud.aliyuncs.com/d' -e'/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
sed -i's/http/https/g' /etc/yum.repos.d/CentOS-Base.repo
- Adjust the version configuration
sed -i's/$releasever/6.8/g' /etc/yum.repos.d/CentOS-Base.repo
sed -i's/centos/centos-vault/g' /etc/yum.repos.d/CentOS-Base.repo
- Clear the cache and update the cache
yum clean all && yum makecache
2. Install Mysql 5.6
wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm
yum-config-manager --disable mysql57-community
yum-config-manager --disable mysql55-community
yum-config-manager --enable mysql56-community
yum -y install yum-utils
yum install mysql-community-server
service mysqld start
Initialization password
mysql_secure_installation
Post comment 取消回复