<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; 主从同步</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Tue, 14 Apr 2026 10:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CentOS 7.x下MySQL数据库主从同步配置</title>
		<link>https://www.osyunwei.com/archives/12732.html</link>
		<comments>https://www.osyunwei.com/archives/12732.html#comments</comments>
		<pubDate>Thu, 30 Jun 2022 07:42:26 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[主从架构]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[主从同步]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12732</guid>
		<description><![CDATA[说明： 操作系统：CentOS 7.x 64位 MySQL数据库版本：mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz MySQL主服务器：192.168.21.128 MySQL从服务器：192.168.21.129 准备篇： 说明：在两台MySQL服务器192.168.21.128和192.168.21.129上分别进行如下操作 一、防火墙配置 CentOS 7.x 默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12732.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12732.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下PostgreSQL数据库主从同步配置</title>
		<link>https://www.osyunwei.com/archives/12603.html</link>
		<comments>https://www.osyunwei.com/archives/12603.html#comments</comments>
		<pubDate>Sun, 26 Jun 2022 13:40:35 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[主从同步]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12603</guid>
		<description><![CDATA[操作系统：CentOS-7.6 主节点：192.168.21.100 从节点：192.168.21.101 PostgreSQL版本：postgresql-11.13.tar.gz 下载地址：https://ftp.postgresql.org/pub/source/v11.13/postgresql-11.13.tar.gz PostgreSQL数据库的主从同步是一种高可用解决方案，可以实现读写分离。 一、基础配置 在主从服务器上都进行操作 1、防火墙配置 CentOS 7.x 8.x 默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1.1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 1.2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12603.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12603.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下MySQL主从同步监控shell脚本</title>
		<link>https://www.osyunwei.com/archives/7240.html</link>
		<comments>https://www.osyunwei.com/archives/7240.html#comments</comments>
		<pubDate>Tue, 21 Jan 2014 03:18:38 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[主从同步]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7240</guid>
		<description><![CDATA[说明： 操作系统：CentOS 目的：定时监控MySQL主从数据库是否同步，如果不同步，记录故障时间，并执行命令使主从恢复同步状态 1、创建脚本文件 vi /home/crontab/check_mysql_slave.sh   #编辑，添加下面代码 #!/bin/sh # check_mysql_slave status # author www.osyunwei.com ip=eth0  #网卡名称 mysql_binfile=/usr/local/mysql/bin/mysql mysql_user=root  #MySQL数据库账号 mysql_pass=123456  #密码 mysql_sockfile=/tmp/mysql.sock datetime=`date +"%Y-%m-%d/%H:%M:%S"`   #获取当前时间 mysql_slave_logfile=/home/logs/check_mysql_slave.log   #日志文件路径，必须提前创建好 slave_ip=`ifconfig $ip&#124;grep "inet addr" &#124; awk -F[:" "]+ '{print $4}'` status=$($mysql_binfile -u$mysql_user -p$mysql_pass -S $mysql_sockfile -e "show slave status\G" &#124; grep -i "running") Slave_IO_Running=`echo $status &#124; [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7240.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7240.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
