Redis的安装与启动
# bind 127.0.0.1 -::1
注释掉bind 127.0.0.1 -::1
bind 127.0.0.1 -::1 标识只能本机访问
port 6379
Redis默认端口号
timeout 0
永不过时
启动方式:
- 前端启动
cd redis目录
redis-cli
弊端:关闭当前窗口就会导致redis服务关闭
- 后端启动
cp redis.conf /etc/redis.conf
redis-server /etc/redis.conf
redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>