后台开启服务器
$ src/redis-server &
设置防火墙(没开启防火墙的可以跳过)
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --reload
今天在学些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了。
相关推荐
NULL 博文链接:https://jayceyxc.iteye.com/blog/2258811
centos源码安装redis-3.2.11
CentOS7.5 安装Redis集群,已经在生成环境使用 CentOS7.5 安装Redis集群,已经在生成环境使用
最新linux下centOS7 安装redis教程!!!!!!!!!!!!!!!!
Centos6.6 安装Redis3.0教程,安装内容自己亲测无数遍,而且没有问题,带开机自启,最省事快捷的方法!
详细介绍了在centos操作系统下怎么安装redis 开启redis防火墙
Linux centos7安装redis,并开启aof持久化模式
Centos7安装Redis的文档和安装包,包含redis单例模式、哨兵模式和集群的配置,Redis的版本是5.0.7。
1、安装epel-release (建议使用国内阿里云源) #下载wget,备份当前源 yum install wget -y mv /etc/yum.repo.d/*.repo /tmp #下载阿里云源和epel源 wget -O /etc/yum.repos.d/CentOS-Base.repo ...
Centos下安装redis服务v1.0
centos7 安装Redis 与 Redis解决session共享,可根据文档进行安装和使用,本人调试过,没问题
centos7安装redis
百度云服务器centos系统安装redis全过程记录。包括多种启动方式及添加到自动启动服务
RHEL或centos7安装redis5.0所依赖的所有工具: cpp-4.8.2-16.el7.x86_64.rpm gcc-4.8.2-16.el7.x86_64.rpm glibc-2.17-55.el7.x86_64.rpm glibc-common-2.17-55.el7.x86_64.rpm glibc-devel-2.17-55.el7.x86_64.rpm ...
资源包括(Redis集群安装及配置规范,redis集群常用操作 )
Centos7安装Redis安装说明
centos7部署redis脚本///centos7部署redis脚本///centos7部署redis脚本///centos7部署redis脚本///centos7部署redis脚本///centos7部署redis脚本///centos7部署redis脚本///centos7部署redis脚本
centos下安装redis6.2.7,并进行集群环境搭建
Linux下安装Redis详解,解决安装中常见的问题
centos7安装redis