给yum添加所安装服务最新rpm源 #这里用mysql为例
# wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
# yum localinstall mysql-community-release-el6-5.noarch.rpm
# yum repolist all | grep mysql #查看
mysql-connectors-community MySQL Connectors Community enabled: 36
mysql-connectors-community-source MySQL Connectors Community - So disabled
mysql-tools-community MySQL Tools Community enabled: 47
mysql-tools-community-source MySQL Tools Community - Source disabled
mysql55-community MySQL 5.5 Community Server disabled
mysql55-community-source MySQL 5.5 Community Server - So disabled
mysql56-community MySQL 5.6 Community Server enabled: 358
mysql56-community-source MySQL 5.6 Community Server - So disabled
mysql57-community-dmr MySQL 5.7 Community Server Deve disabled
mysql57-community-dmr-source MySQL 5.7 Community Server Deve disabled
# yum-config-manager --disable mysql55-community
# yum-config-manager --disable mysql56-community
# yum-config-manager --enable mysql57-community-dmr //将要安装的版本开启,其他关闭# yum repolist enabled | grep mysql //查看已开启的版本。
mysql-connectors-community MySQL Connectors Community 36
mysql-tools-community MySQL Tools Community 47
mysql56-community MySQL 5.6 Community Server 358
# yum install mysql-community-server