redis 安装以及配置

centos

安装

yum install redis-server

配置

配置文件redis.conf
配置访问密码
# requirepass foobared
requirepass 123   指定密码123

注释 bind 127.0.0.1 允许外部访问

重启

service redis-server restart

访问

redis-cli -h 127.0.0.1 -p 6379 -a 123456

猜你喜欢

转载自www.cnblogs.com/huay/p/11394029.html