在centos6.7用yum安装redis
1.?centos默認的安裝源在官方centos.org上,而redis在第三方的yum源里,所以無法安裝,非官方的yum推薦用fedora的epel倉庫
[root@localhost install]# yum install redis
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
?* base: mirrors.skyshe.cn
?* extras: mirrors.163.com
?* updates: mirrors.pubyun.com
base ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| 3.7 kB ? ? 00:00 ? ??
extras ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| 2.9 kB ? ? 00:00 ? ??
updates ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | 3.4 kB ? ? 00:00 ? ??
No package redis available.
Error: Nothing to do
首先為yum添加epel源:yum install epel-release回車
yum install epel-release
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
?* base: mirrors.skyshe.cn
?* extras: mirrors.163.com
?* updates: mirrors.pubyun.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
?Package ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Arch ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Version ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Repository ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Size
=============================================================================================================================================================================================================================================
Installing:
?epel-release ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?noarch ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?6-8 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? extras ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 14 k
Transaction Summary
=============================================================================================================================================================================================================================================
Install ? ? ? 1 Package(s)
2. yum 安裝redis
[root@localhost install]# yum install redis
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | 3.6 kB ? ? 00:00 ? ??
?* base: mirrors.skyshe.cn
?* epel: mirrors.opencas.cn
?* extras: mirrors.163.com
?* updates: mirrors.pubyun.com
epel ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| 4.3 kB ? ? 00:00 ? ??
epel/primary_db ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | 5.7 MB ? ? 00:24 ? ??
Resolving Dependencies
--> Running transaction check
---> Package redis.x86_64 0:2.4.10-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
?Package ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Arch ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Version ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Repository ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Size
=============================================================================================================================================================================================================================================
Installing:
?redis ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?x86_64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?2.4.10-1.el6 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? epel ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?213 k
Transaction Summary
=============================================================================================================================================================================================================================================
Install ? ? ? 1 Package(s)
3. 查看redis文件
[root@localhost ~]# find / -name "redis*"
/usr/sbin/redis-server
/usr/bin/redis-check-aof
/usr/bin/redis-cli
/usr/bin/redis-check-dump
/usr/bin/redis-benchmark
4. 開啟redis-server服務
[root@localhost ~]# redis-server /root/redis_conf/redis6379/redis6379.conf?
[root@localhost ~]# redis-server /root/redis_conf/redis6380/redis6380.conf
[root@localhost ~]# redis-server /root/redis_conf/redis6378/redis6378.conf?
查看進程
[root@localhost ~]# ps -ef|grep redis
root ? ? ?4970 ? ? 1 ?0 16:35 ? ? ? ? ?00:00:00 redis-server /root/redis_conf/redis6379/redis6379.conf
root ? ? ?4976 ? ? 1 ?0 16:36 ? ? ? ? ?00:00:00 redis-server /root/redis_conf/redis6380/redis6380.conf
root ? ? ?4982 ? ? 1 ?0 16:36 ? ? ? ? ?00:00:00 redis-server /root/redis_conf/redis6378/redis6378.conf
root ? ? ?4987 ?1489 ?0 16:36 pts/0 ? ?00:00:00 grep redis
總結
以上是生活随笔為你收集整理的在centos6.7用yum安装redis的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: termcap - 终端功能数据库详解
- 下一篇: Cmake升级