话不多说,直接安装
1、安装Redis服务器端,会自动地一起安装Redis命令行客户端
apt-get install redis-server
2、检查Redis服务器系统进程
ps -ef|grep redis
3、修改配置文件
vim /etc/redis/redis.conf
supervised systemd #因为我的操作系统是ubuntu
bind 127.0.0.1 ::1
requirepass foobared
4、启动与关闭
service redis start
systemctl restart redis.service
service redis restart
systemctl restart redis
service redis stop
systemctl status redis