安装redis

Posted 霂雨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装redis相关的知识,希望对你有一定的参考价值。

1按照官网步骤

https://redis.io/download

$ wget http://download.redis.io/releases/redis-4.0.9.tar.gz
$ tar xzf redis-4.0.9.tar.gz
$ cd redis-4.0.9
$ make


中间错误
1.cc:未找到命令 https://blog.csdn.net/wlwlwlwl015/article/details/50444672

2.zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录 https://blog.csdn.net/libra_ts/article/details/71195128

将 make 命令改为 make MALLOC=libc 执行


2.启动redis

cd src
./redis-server

 

 3.telnet 192.168.3.8 6379 

授权, 在客户端

reids 设置密码
config set requirepass 123
config get *

然后 按 ctr+c 退出
./redis-cli -a 123

config get *

 

 

4.参数优化  https://blog.csdn.net/tangpengtao/article/details/45542791

 

 


以上是关于安装redis的主要内容,如果未能解决你的问题,请参考以下文章