按照下面步骤依次执行
1.检查依赖,安装依赖

[root@ecs-3c46 ~]# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
[root@ecs-3c46 ~]# whereis tc
tc: /sbin/tc /usr/lib64/tc /usr/share/tc /usr/share/man/man8/tc.8.gz
[root@ecs-3c46 ~]# whereis wget
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz
[root@ecs-3c46 ~]# yum -y install tcl

2.进入/user/local/src/

[root@ecs-3c46 ~]# cd /usr/local/src/

3.wget下载redis

[root@ecs-3c46 src]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz

4.解压

[root@ecs-3c46 src]tar zxvf redis-3.0.7.tar.gz

5.将文件转存到/usr/local/redis

[root@ecs-3c46 src]mkdir /usr/local/redis
[root@ecs-3c46 src]mv redis-3.0.7 /usr/local/redis
[root@ecs-3c46 src]ll /usr/local/redis

6.编译安装

[root@ecs-3c46 src]cd /usr/local/redis
[root@ecs-3c46 redis]make && make install

7.在etc目录下创建redi文件夹并创建配置文件,并修改配置文件

[root@ecs-3c46 redis]mkdir -p /etc/redis
[root@ecs-3c46 redis]pwd
[root@ecs-3c46 redis]cp -fr /usr/local/redis/redis.conf /etc/redis/

8.vim编辑/etc/redis/redis.conf,修改daemonize属性为yes

[root@ecs-3c46 redis]# vim /etc/redis/redis.conf
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

9.执行/usr/loal/bin/redis-server /etc/redis/redis.conf来启动redis服务器

[root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
-bash: /usr/local/bin/redis-server: No such file or directory
[root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
:M May ::00.839 * Increased maximum number of open files to (it was originally set to ).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 73449
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'

10.再打开一个终端,切换至redis的安装目录执行redis-cli

[root@ecs-3c46 bin]# redis-cli
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379>

最新文章

  1. centos6.x 安装pylucene (20161027改)
  2. SharePoint 2013 图文开发系列之定义站点模板
  3. Python基础三. 函数、lambda、filter、map、reduce
  4. html或者jsp页面引用jar包中的js文件
  5. java-测试synchronized使用xxx.class和this使用的区别
  6. 如何学习FPGA?FPGA学习必备的基础知识
  7. 使用sublime时报编码错误
  8. 安装64位版Oracle11gR2后无法启动SQLDeveloper的解决方案(原创) (2016-10-29 下午01:56)
  9. 011--VS2013 C++ 斜角地图贴图
  10. 【BZOJ】【1008】【HNOI】越狱
  11. Keil C51 Data Overlaying
  12. sql编程 && 存储过程
  13. 实例分析exec函数
  14. js中window对象的opener属性的一个坑
  15. boostrap中模态框显示在阴影之下
  16. 什么是LogDashboard?
  17. 利用ESLINT进行js 语法检查,以及局部安装时遇到的一些坑
  18. POJ 2398 Toy Storage(叉积+二分)
  19. (转载)220v交流接触器自锁接线图另接热继电器
  20. iOS 静态库的封装

热门文章

  1. C++/Java中继承关系引发的调用关系详解
  2. Mac OS X Yosemite & Arduino安装CH340 USB转串口驱动
  3. delphi Table切换控件顺序问题
  4. 从FastDFS官网下载我们需要的安装包
  5. 微信小程序遇到的问题与解决
  6. threading.local()方法;线程池
  7. jquery源码解析:type,isPlainObject,parseHTML,parseXML,globalEval详解
  8. 【FAQ】Could not extract response: no suitable HttpMessageConverter found for respo
  9. redis 3.0 集群__配置文件详解(常用配置)
  10. luogu4383 [八省联考2018]林克卡特树(带权二分+dp)