wget https://raw.githubusercontent.com/antirez/redis/5.0/redis.conf -O /application/redis/conf/redis.conf
sed -i 's/logfile ""/logfile "access.log"/' /application/redis/conf/redis.conf # 开启日志
sed -i 's/# requirepass foobared/requirepass aabb/' /application/redis/conf/redis.conf # 设置密码
sed -i 's/appendonly no/appendonly yes/' /application/redis/conf/redis.conf # 开启持久化
sed -i 's/bind 127.0.0.1/bind 0.0.0.0/' /application/redis/conf/redis.conf # 修改端口监听
|