admin管理员组文章数量:1666860
<dl class="box_p">
<dd class="pRight"><a href="/">首页</a><span> > </span><a href="https://www.2cto/os/">系统</a> > <a href="https://www.2cto/os/linux/">Linux</a> > 正文</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
<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,就代表主从已经配置好
- 点击复制链接 与好友分享! 回本站首页
- 上一篇: 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 无人职守安装
</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&filetype=article" id="mainFrame" name="ifd" onload="this.height=ifd.document.body.scrollHeight" width="100%" scrolling="no" frameborder="0" height="511"></iframe>
</div>
版权声明:本文标题:redis主从 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1725451895a1023998.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论