redis 3.0.7安装

redis-3.2.9 安装查看这个链接:
https://www.cnblogs.com/yinz/p/7065146.html

注意:3.2版本安装好后要设置如下配置才可以远程访问:

vim redis.conf

protected-mode no
并且注释掉
bind 127.0.0.1

设置密码

服务器:阿里云 centos 6 64位

[root@iZ112fail84Z ~]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz

[root@iZ112fail84Z ~]#tar zxvf redis-3.0.7.tar.gz
[root@iZ112fail84Z ~]# ls
redis-3.0.7
[root@iZ112fail84Z ~]# cd redis-3.0.7
[root@iZ112fail84Z redis-3.0.7]# ls
00-RELEASENOTES COPYING Makefile redis.conf runtest-sentinel tests
BUGS deps MANIFESTO runtest sentinel.conf utils
CONTRIBUTING INSTALL README runtest-cluster src
[root@iZ112fail84Z redis-3.0.7]# make
执行之后出现很多,最后显示
Hint: It’s a good idea to run ‘make test’ ;)

make[1]: Leaving directory /root/redis-3.0.7/src'
// 命令是 make install ,下边的cd src && make install是自动显示出来的
[root@iZ112fail84Z redis-3.0.7]# make install
cd src && make install
make[1]: Entering directory
/root/redis-3.0.7/src’

Hint: It’s a good idea to run ‘make test’ ;)

INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install

make[1]: Leaving directory `/root/redis-3.0.7/src’

cp /root/redis-3.0.7/redis.conf /usr/local/bin
[root@iZ112fail84Z] cd /usr/local/bin
[root@iZ112fail84Z bin]# ls
redis-benchmark redis-check-dump redis.conf redis-server
redis-check-aof redis-cli redis-sentinel

vim redis.conf
修改 redis.conf中的daemonize yes
启动redis
[root@iZ112fail84Z bin]# redis-server redis.conf
[root@iZ112fail84Z bin]# ps -ef|grep redis
root 19935 1 0 22:21 ? 00:00:00 redis-server *:6379
root 19941 17020 0 22:21 pts/0 00:00:00 grep redis

[root@iZ112fail84Z bin]# redis-cli
127.0.0.1:6379> set k1 v1
OK
127.0.0.1:6379> get k1
“v1”

停止服务:
[root@iZ112fail84Z bin]# redis-cli shutdown

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员陆通

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值