zoukankan      html  css  js  c++  java
  • Redis Destop Manager不能访问虚拟机

    虚拟机centOS中安装Redis,主机Redis Destop Manager不能访问虚拟机Redis server的解决方案

    今天在学些redis的时候碰到个问题,发现主机Redis Destop Manager不能访问虚拟机Redis server的解决方案,找了一些网上的资料,原因可能有两个,整理记录下来:

    1. Redis.conf文件中打开了

    # By default Redis listens for connections from all the network interfaces
    # available on the server. It is possible to listen to just one or multiple
    # interfaces using the "bind" configuration directive, followed by one or
    # more IP addresses.
    #
    # Examples:
    #
    # bind 192.168.1.100 10.0.0.1
    # bind 127.0.0.1 
    #如果上面这一行打开了,请关闭它。

    2. 如果发现配置文件里面的bind没有打开,请尝试下面的步骤:

    centos默认使用firewalld来管理netfilter子系统,不过底层调用的命令仍然是iptables等,所以先关掉firewalld:

    systemctl stop firewalld

    #屏蔽(让它不能启动)或显示该服务 systemctl mask firewalld

    然后安装iptables服务包:

    yum install iptables-services
    

    让服务在系统启动的时候启动:

    systemctl enable iptables
    

    下面是iptables的命令example:

    systemctl [stop|start|restart] iptables
    

    保存防火墙的规则:

    service iptables save
    

    or

    /usr/libexec/iptables/iptables.init save

    试一下看是不是你的Redis Destop Manager是不是可以连接到虚拟机的Redis server了。
     
     
    标签: Redis
  • 相关阅读:
    (一)ngxin默认虚拟主机
    centos7 搭建LNMP
    centos7 搭建安装zabbix3.0邮件告警实例(二)
    Java BitSet(位集)
    OLTP与OLAP的区别
    Cassandra-LSM树
    LSM树
    Docker
    RESTful API
    kubernetes介绍
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/5489664.html
Copyright © 2011-2022 走看看