我得是centos 6.3,如果直接用yum安装redis,报错,如下:
[root@CentOS6 etc]# yum install redisLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile* base: mirrors.btte.net* extras: mirrors.btte.net* updates: mirrors.btte.netbase | 3.7 kB 00:00 extras | 3.5 kB 00:00 updates | 3.5 kB 00:00 updates/primary_db | 4.6 MB 00:25 Setting up Install ProcessNo package redis available.Error: Nothing to do实际上redia位于第三方的yum源里面,不在centos官方yum源里面,如何解决呢?1:去下面的网站下载EPEL对应的版本:(epel是fedora维护的yum源,里面软件众多)2:我下载的是这个:wget 3:安装epel:rpm -ivh epel-release-6-8.noarch.rpm warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYPreparing... ########################################### [100%] 1:epel-release ########################################### [100%]4:安装redis:[root@CentOS6 ~]# yum install redisLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileepel/metalink | 4.1 kB 00:00 * base: mirrors.btte.net* epel: mirrors.sohu.com* extras: mirrors.btte.net* updates: mirrors.btte.netepel | 4.3 kB 00:00 epel/primary_db | 5.0 MB 00:43 Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package redis.x86_64 0:2.4.10-1.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================Package Arch Version Repository Size================================================================================Installing:redis x86_64 2.4.10-1.el6 epel 213 kTransaction Summary================================================================================Install 1 Package(s)Total download size: 213 kInstalled size: 668 kIs this ok [y/N]:y
用这办法把yum 源解决了 |