文章插图
主旨
本文的目的是为了解决两台服务器之间目录差异问题,即可以在A、B两台服务器指定目录写、删任何内容,都会同步到另一台服务器,即实现文件存放、读取高可用 。
环境
服务器信息:
node-1:192.168.93.139node-2:192.168.93.140
用户名密码:root/666666
同步目录:/home/jier
VIP地址:192.168.93.200
此文档涉及到的软件:rsynclsyncdkeepalivedsftp
前期准备关闭防火墙和selinux,两台服务器上都需要执行 。
[root@localhost jier]# systemctl stop firewalld.service[root@localhost jier]# systemctl disable firewalld.serviceRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.[root@localhost jier]# setenforce 0# 修改内容SELINUX=disabled[root@localhost jier]# vim /etc/selinux/config[root@localhost jier]# iptables -F
一、部署rsyncPS:需要在node-1和node-2两个节点上同时进行安装 。
推荐阅读
- 前端领域如何实现请求中断
- 编程语言将走入怎样的 2022
- 如何查找被删聊天记录?
- 客厅装修如何设计壁纸
- 美式田园地砖如何搭配
- 6款适合春季的时尚运动 如何制定春季健身计划
- 中医教你春季如何养肝 做好饮食很关键
- 老人春季如何养生 推荐6大春季养生妙招
- 眼屎增多或是眼病的预示 春季该如何护眼
- 自媒体|新媒体和自媒体有什么不同啊,我可以通过什么渠道找工作啊?