标签:detail 127.0.0.1 isa oauth contos make figure html load
cd /opt/
wget http://download.redis.io/releases/redis-5.0.2.tar.gz
`ps:也可自行下载到本地,让后上传到 opt 目录下`
tar -zxvf redis-5.0.2.tar.gz
`ps:使用 rm -rf redis-5.0.2.tar.gz 可删除下载`
cd redis-5.0.2/
make
cd src/
make install
cd /opt/redis-5.0.2/
./utils/install_server.sh
`ps:然后一路回车`
查看Redis进程: ps -ef|grep redis
Redis客户端:redis-cli
启动Redis:service redis_6379 start
停止Redis (安全关闭,不要使用kill,防止数据丢失):
启动客户端:redis-cli -a 123456
安全关闭:SHUTDOWN
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
原因:强制关闭Redis快照导致不能持久化。
解决方案:运行 config set stop-writes-on-bgsave-error no
vim /etc/redis/6379.conf
修改:#requirepass foobared 为 requirepass 123456
重启redis,这样redis访问密码就设置为123456了
再次进入 redis-cli
输入命令 keys* 进行操作时会提示 (error) NOAUTH Authentication required.
这时只要输入:auth 123456 即可操作
vim /etc/redis/6379.conf
修改 bind 127.0.0.1 为 # bind 127.0.0.1 (其实就是注释掉哈)
重启redis即可远程访问
Redis Desktop Manager
官网下载地址:https://redisdesktop.com/download
然后按照 https://www.cnblogs.com/zheting/p/7670154.html 来使用就OK了。
标签:detail 127.0.0.1 isa oauth contos make figure html load
原文地址:https://www.cnblogs.com/lixingwu/p/10041159.html