安装redis

安装redis,第1张

安装redis
sudo apt-get install redis-server

vim /etc/redis/redis.conf
requirepass 123456 		# 修改123456
bind 0.0.0.0 			# 修改为 0.0.0.0
service redis restart

#登录
su - root

root@debian1:/home/user# redis-cli -h 127.0.0.1 -a '123456'
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379> keys *
1) "redisson_tomcat_session:0BF84464FF0EC392B4FE56B59DD9EE2A"
127.0.0.1:6379>

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/5708351.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存