1、更新源:
sudo apt update
2、安装服务:
sudo apt install redis-server
3、开启:
sudo systemctl status redis-server
4、设置登录密码 为 ab123:
vi /etc/redis/redis.conf
查找 esc /requirepass 回车 n
#requirepass foobared
改为:
requirepass ab123
5、重启:
sudo systemctl restart redis-server
6、修改端口:
vi /etc/redis/redis.conf
查找 esc /port 6379
6379 改为 6117
port 6379
改为:
port 6117
esc :q
7、重启:
sudo systemctl restart redis-server
8、查看:
ps -ef|grep redis