下载地址:http://download.redis.io/releases/
选择版本并下载:
wget http://download.redis.io/releases/redis-6.2.6.tar.gz
解压:tar -xf redis-6.2.6.tar.gz
进入目录:cd redis-6.2.6
make
make install
ll src/redis*
查看redis-server所在路径
which redis-server
/usr/local/bin/redis-server
redis配置文件
cp redis.conf /root/etc/redis.conf
vim /root/etc/redis.conf
修改 daemonize no 为 daemonize yes
修改 port 6379 为 port 7200
查看redis-server配置项 redis-server --help
启动redis-server
redis-server /root/etc/redis.conf
确定redis-server 是否已启动
ps aux|grep redis-server
使用redis-cli操作redis
which redis-cli
/usr/local/bin/redis-cli
redis-cli --help
redis-cli -h 127.0.0.1 -p 7200
info //查看redis-server的当前状态