1、下载安装
[email protected]:/# apt-cache search redis
[email protected]:/# apt-get install redis-server
a、redis配置文件:/etc/redis/redis.conf
b、redis服务路径:/etc/init.d/redis-server
2、启动redis
[email protected]:/# cd /etc/init.d
[email protected]:/# redis-server &
注:要先进入"/etc/init.d"目录,再执行"redis-server &"命令启动redis
3、启动client客户端连接
[email protected]:/# redis-cli
127.0.0.1:6379> set name ljq
OK
127.0.0.1:6379> get name
"ljq"
127.0.0.1:6379>
时间: 2024-11-17 15:34:58