admin管理员组

文章数量:1666860

	<dl class="box_p">
		<dd class="pRight"><a href="/">首页</a><span> &gt; </span><a href="https://www.2cto/os/">系统</a> &gt; <a href="https://www.2cto/os/linux/">Linux</a> &gt;  正文</dd>
		
		</dl>
	<dl class="box_t"><dd>linux下redis的主从配置步骤教程</dd></dl>
																									<dl class="box_INFO clearfix">
		<dd class="frinfo">2018-07-16 14:42:52 &nbsp;&nbsp;&nbsp;&nbsp;
			<i class="comm"></i><!-- <a class="num" href="#SOHUCS" id="changyan_count_unit"></a><a href="#SOHUCS">个评论</a> -->
			<script type="text/javascript" src="//assets.changyan.sohu/upload/plugins/plugins.count.js"></script>

   来源:xiao_schun的博客  


收藏  
我要投稿








1.准备2台主机 192.168.89.92(master),192.168.89.93(slave)。

2.2台机子都装上redis。

3. 2台机子都更改配置文件 vi redis.conf

protected-mode no

在slave机器上的redis.conf配置文件中加上

slaveof 192.168.89.92 6379

4.重启redis服务, src/redis-server shutdown ,停止

src/redis-server 开启。

5.在master上redis里面执行info

查看打印出的信息

看connected_slaves:1 ,说明已经有1个从库,说明已经成功。

6.登录slave上redis里面执行info

查看role:slave,master_link_status:up,就代表主从已经配置好

点击复制链接 与好友分享! 回本站首页
相关TAG标签 linux redis 主从配置 步骤教程
上一篇: Linux驱动开发之混杂设备驱动代码实例
下一篇: linux下chrome driver的简单安装
相关文章
  • linux无人值守安装
  • suse linux VNC配置
  • Linux关于watch的用法
  • Ubuntu 9.04 死机处理(Linux死机
  • Linux下Rails3 + Lighttpd + fcgi
  • LinuxCBT_Deb5x_Edition_Notes
  • LinuxCBT feat. SUSE 10 Enterp
  • Linux 安装*src.rpm
  • linux中的openssl的使用
  • linux kickstart 无人职守安装
热门专题推荐 vmware win7激活工具 win10激活工具 excel word office激活 小马激活工具 重装系统 数据恢复 u盘启动工具
</div>
<div class="inbox">
<div class="cont_ibox">
	<!-- 2cto_左三 -->
	<script type="text/javascript">cto_A_D("2cto_13");</script>
</div>
</div>
<div class="inbox">
	<div class="about">图文推荐</div>
</div>
<div class="cont_ibox">
<!-- 2cto_左四 -->
<script type="text/javascript">cto_A_D("2cto_4");</script>
</div>
<ul class="picbox clearfix">
					<li>
		<a target="_blank" class="imgbox" href="https://www.2cto/os/201808/775835.html"><img src="http://www.2cto/uploadfile/Collfiles/20180828/20180828143102219.png"></a>
		<a class="npictext" target="_blank" href="https://www.2cto/os/201808/775835.html">Redis数据库主从复制</a>
	</li>
			<li>
		<a target="_blank" class="imgbox" href="https://www.2cto/os/201808/773502.html"><img src="http://www.2cto/uploadfile/Collfiles/20180820/20180820093212500.png"></a>
		<a class="npictext" target="_blank" href="https://www.2cto/os/201808/773502.html">linux之NFS文件系统解</a>
	</li>
			<li>
		<a target="_blank" class="imgbox" href="https://www.2cto/os/201808/770758.html"><img src="http://www.2cto/uploadfile/Collfiles/20180807/20180807154650969.png"></a>
		<a class="npictext" target="_blank" href="https://www.2cto/os/201808/770758.html">Linux命令大合集</a>
	</li>
			<li>
		<a target="_blank" class="imgbox" href="https://www.2cto/os/201808/770756.html"><img src="http://www.2cto/uploadfile/Collfiles/20180807/20180807154402613.png"></a>
		<a class="npictext" target="_blank" href="https://www.2cto/os/201808/770756.html">Linux磁盘管理图文介</a>
	</li>
				</ul>
<iframe src="/database/201807/760654.php?filename=comment&amp;filetype=article" id="mainFrame" name="ifd" onload="this.height=ifd.document.body.scrollHeight" width="100%" scrolling="no" frameborder="0" height="511"></iframe>
</div>

本文标签: 主从Redis