wangmaomaofan

连接阿里云远程redis

1:设置配置文件为

#设置bind:第二个bind对象为输入ifconfig后出现的第二个inet地址
bind 127.0.0.1 Xxx.xx.xx.xx
或者
bind 0.0.0.0


#设置认证密码
 requirepass 123456

image-20200711194140804

2:设置防火墙

systemctl start firewalld.service #开启防火墙
firewall-cmd --zone=public --add-port=6379/tcp --permanent #将6379端口放入防火墙白名单
firewall-cmd --reload #重启防火墙

3:当然前提是在阿里云安全组中已经配置6379端口的授权

image-20200711194425513

4:进入idea导入jedis测试是否连接成功,这个host就是你自己主机的公网地址。

image-20200711194544021

分类:

技术点:

相关文章:

  • 2021-04-29
  • 2021-12-14
  • 2021-09-19
  • 2021-06-21
  • 2021-04-24
  • 2021-04-21
  • 2021-07-31
  • 2021-09-13
猜你喜欢
  • 2021-12-14
  • 2021-06-18
  • 2021-08-04
  • 2021-11-02
  • 2021-08-15
  • 2021-09-04
相关资源
相似解决方案