统自带的MySQL版本一般都比当前最新的稳定版低,想使用最新的稳定版本需要手动编译安装,耗时不用说了,还要解决令人头疼的一系列的软件依赖关系,作为系统管理员希望找到便捷的升级MySQL版本的方法。remi源针对Fedora和RHEL、CentOS的更新源。remi解决了相关软件的依赖关系,而且不会跟Fedora和RHEL、CentOS原来的软件包冲突。remi使用yum自动从网络上下载需要更新的软件包进行更新。
下面是配置过程,由本人验证过:
一、启用EPEL6 yum源:
1、RHEL/CentOS/SL Linux 6.x 下安装 EPEL6 yum源:
32位系统选择:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
64位系统选择:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
导入key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
2、默认会在/etc/yum.repos.d/下创建epel.repo和epel-testing.repo两个配置文件,epel.repo的内容如下:
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 – $basearch – Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
如果想使用比较新的软件,可以启用[epel-testing]源,把里面的enabled=0改成enabled=1就可以。
3、yum安装nginx测试看看:
yum install nginx
二、启用remi的RHEL6 yum源:
1、RHEL/CentOS/SL Linux 6.x下安装remi的RHEL6 yum源:
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
导入key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
2、默认会在/etc/yum.repos.d/下创建remi.repo配置文件,remi.repo的内容如下:
[remi]
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority
[remi-test]
name=Les RPM de remi en test pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/test/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/test/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
3、yum安装MySQL 5.5看看:
yum --enablerepo=remi install mysql mysql-server
如果是升级MySQL,请用:
yum --enablerepo=remi update mysql mysql-server
remi官网:http://rpms.famillecollet.com/
参考:http://blog.famillecollet.com/pages/Config-en