按照下面步骤依次执行

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 /user/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 /usr/local/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/loal/bin/redis-server /etc/redis/redis.conf
-bash: /usr/loal/bin/redis-server: No such file or directory
[root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
73449:M 13 May 10:56:00.839 * Increased maximum number of open files to 10032 (it was originally set to 1024).

                _._                                                 
           _.-``__ ''-._                                            
      _.-``    `.  `_.  ''-._           Redis 3.0.7 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     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> 

以上所述是小编给大家介绍的CentOS6.4 安装Redis 教程,希望对大家有所帮助!

标签:
centOS6.4,安装redis

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com

评论“CentOS6.4 安装Redis 教程详解”

暂无“CentOS6.4 安装Redis 教程详解”评论...

稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!

昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。

这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。

而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?