Installation
Download, extract and compile Redis with:
--安装
$ wget https://download.redis.io/releases/redis-6.0.8.tar.gz
$ tar xzf redis-6.0.8.tar.gz
$ cd redis-6.0.8
$ make
The binaries that are now compiled are available in the src directory. Run Redis with:
--启动服务端(非diamond,可以新开窗口)
$ 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"
上述操作make时出现【server.c:5251:168: error: ‘struct redisServer’ has no member named ‘sentinel_mode’】,gcc版本不一致。执行下面代码后,重新安装 参考相关博客