一、Windows下
D:
cd Redis //我的redis安装路径为D:\Redis
redis-server.exe redis.windows.conf
**如果报错creating server tcp listening socket 127.0.0.1:6379: bind No error
D:\Redis>redis-cli.exe
127.0.0.1:6379> shutdown
not connected> exit
redis-server.exe redis.windows.conf
二、Linux下
1.查看防火墙,关闭防火墙
systemctl status firewalld.service
systemctl stop firewalld.service
2.vi redis.conf
1)找到bind 127.0.0.1,把它注释掉
2)找到protected-mode yes 改成no。
3.redis-server redis.conf
一直开启redis,不要关闭
4.关于redis的操作
systemctl start redis
systemctl stop redis
systemctl status redis