首页 > 其他 > 详细

redis 安装

时间:2016-12-13 06:25:06      阅读:164      评论:0      收藏:0      [点我收藏+]

Installation

Download, extract and compile Redis with:

$ wget http://download.redis.io/releases/redis-3.2.6.tar.gz   # 真的很小,才1.5m
$ tar xzf redis-3.2.6.tar.gz
$ cd redis-3.2.6
$ mkdir /usr/local/redis-3.2.6
$ make PREFIX=/usr/local/redis-3.2.6 install # PREFIX 指定目录,需要手动创建,不指定的话,默认安装在安装包的 src 目录下
$ cd /usr/local/redis-3.2.6/
$ mkdir conf
$ cp redis.conf conf/redis_6380.conf
$ vim conf/red_6380.conf # 改端口号为 6380
$ ln -s redis-3.2.6/ redis # 为 redis-3.2.6 创建快捷方式
$ echo ‘export PATH=/usr/local/redis/bin:$PATH‘ >> /etc/profile # 将 redis 添加到系统环境变量
$ . /etc/profile # 使环境变量生效
$ redis-server /usr/local/redis/conf/redis_6380.conf # 启动

 

The binaries that are now compiled are available in the src directory. Run Redis with:

$ src/redis-server

You can interact with Redis using the built-in client:

$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"

redis 安装

原文:http://www.cnblogs.com/xiluhua/p/6166256.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!