


Configuration et installation du serveur
Serveur
Étape 1 : Téléchargez le package d'installation de rsync (installation en ligne ou Installation hors ligne)
=/usr/local/rsyncd
make && make install
/*Je suis directement sous /etc (facile à trouver)*/
touch /etc/rsyncd.conf
touch /etc/rsyncd.secrets touch /etc/rsyncd.motd Vous pouvez également utiliser vim pour créer /*Veuillez consulter ma documentation hors ligne pour plus de détails sur le contenu des trois fichiers*/
/*Attention : le fichier de mot de passe rsyncd .secrets doit recevoir les autorisations chmod 600, sinon une erreur sera signalée * / config=/etc/rsyncd.conf
ou
/usr/local/rsyncd/bin/rsync --daemon --config=/etc/rsyncd.conf
Étape 4 : Laissez le pare-feu passer le port rsync (ne bloquez pas le port 873)
iptables -I INPUT -p tcp --dport 873 -j ACCEPT /*Laissez le pare-feu s'ouvrir port 873 (sinon, il interceptera et ne démarrera pas)*/ /*Exécutez la commande : iptables -L*/ Vous verrez une ligne comme indiqué ci-dessous pour prouver que rsync démarre avec succès Chaîne INPUT (policy ACCEPT) target prot opt source destination
ACCEPT tcp -- Anywhere Anywhere TCP dpt:rsync
🎜>
Configuration du client installation
Client
wget tar -xzf rsync-3.1.2.tar.gz cd rsync-3.1.2
./configure --prefix=/usr/local/rsyncd
Étape 2 : Démarrez le client
rsync --daemon
ou
/usr/local/rsyncd/bin/rsync --daemon
Étape 3 : Laissez le pare-feu passer le port rsync (ne bloquez pas le port 873)
iptables -I INPUT -p tcp --dport 873 -j ACCEPT
/*Execute command: iptables -L*/
Vous verrez une ligne comme indiqué ci-dessous pour prouver que rsync a démarré avec succès
Chain INPUT (policy ACCEPT)
target prot source via Quelles sources de données disponibles sont fournies sur Internet (voyez si vous pouvez les envoyer par ping)
rsync --list-only root@192.168.145.129::
Vous trouverez ci-dessous le mien Trois fichiers de configuration majeurs
rsyncd.secrets
rsyncd.motd
root:lizhenghua
rsyncd.conf
********************************************************** ◢◣ ◢◣ ◢■■◣ ◢■■◣ ◢■■■■■■■■■◣ ◥■■■■■■■■■◤ ◥■■■■■■■◤ ◥■■■■■◤ ◥■■■◤ ◥■◤ ▼ Welcome to the rsync world! \ \ \ \ \ \ \ \ ● 》》 《 _▂▃▄▅▆▇███▇▆▅▄▃ ***********************************************************
#主核心 uid = 0 #守护进程所属的uid,默认是nobody gid = 0 #守护进程所属的uid,默认是nobody max connections = 4 #客户端最多连接数 read only = false #是否只读操作 hosts allow = 192.168.145.128 #允许访问的IP,可以指定单个IP,也可以指定整个网段,能提高安全性。 hosts allow = * #允许所有ip访问 transfer logging = true #记录传输文件的日志 log format = %h %o %f %l %b #日志格式 log file = /var/log/rsyncd.log #rsync 服务器的日志 slp refresh = 300 #定时刷新 pid file = /var/run/rsyncd.pid #pid存放日志 lock file = /var/run/rsyncd.lock #lock日志文件 motd file = /etc/rsyncd.motd #欢迎界面 #模块 [web] #模块名字 path = /home/admin/public_html #模块路径 comment = Mirror to Hk server #模块注释 read only = false #是否只读 list = true #是否显示列表 auth users = root #用户 secrets file = /etc/rsyncd.secrets #验证的密码文件 [test] #模块名字 path = /home/admin/domains/test #模块路径 read only = false #是否只读 auth users = root #用户 list = true #是否显示列表 exclude = oracle/ #不需要同步的文件夹 secrets file = /etc/rsyncd.secrets #验证的密码文件 [king] #如上所示 path = /home comment = connect to the /home read only = false list = true auth users root secrets file = /etc/rsyncd.secrets
Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!

实验环境前端nginx:ip192.168.6.242,对后端的wordpress网站做反向代理实现复杂均衡后端nginx:ip192.168.6.36,192.168.6.205都部署wordpress,并使用相同的数据库1、在后端的两个wordpress上配置rsync+inotify,两服务器都开启rsync服务,并且通过inotify分别向对方同步数据下面配置192.168.6.205这台服务器vim/etc/rsyncd.confuid=nginxgid=nginxport=873ho

随着互联网的不断发展和普及,Web应用程序已成为人们日常生活中必不可少的一部分,这也决定了Web应用程序的安全问题非常重要。在Web应用程序中,Cookie被广泛使用来实现用户身份认证等功能,然而Cookie也存在着安全风险,因此在配置Nginx时,必须设定适当的Cookie安全策略,以保证Cookie的安全性。下面是一些在Nginx中配置Cookie安全策

使用CMake构建Linux内核的配置指南概述在Linux开发中,构建和配置内核是一个重要的环节。对于大多数人来说,使用Kconfig和Makefile是最常见的配置方式。然而,使用CMake来构建和配置Linux内核也是一个灵活且强大的选择。本文将介绍如何使用CMake来构建和配置Linux内核,并附上一些代码示例。安装CMake首先,我们需要安装CMak

如何配置MySQL连接池的最大连接数?MySQL是一个开源的关系型数据库管理系统,被广泛应用于各种领域的数据存储与管理。在使用MySQL时,我们常常需要使用连接池来管理数据库连接,以提高性能和资源利用率。连接池是一种维护和管理数据库连接的技术,它能够在需要时提供数据库连接,并在不需要时回收连接,从而减少了连接的重复创建和销毁。而连接池的最大连接数则是连接池所

使用GDB调试Linux内核的常用配置技巧引言:在Linux开发中,使用GDB调试内核是一项非常重要的技能。GDB是一款功能强大的调试工具,可以帮助开发者快速定位和解决内核中的bug。本文将介绍一些常用的GDB配置技巧,以及如何使用GDB调试Linux内核。一、配置GDB环境首先,我们需要在Linux系统上配置GDB的环境。请确保你的系统已经安装了GDB工具

Nginx错误页面配置,优雅处理网站故障在现代互联网时代,一个高度稳定和可靠的网站是任何企业或个人追求的目标。然而,由于各种原因,网站可能会经历故障或错误,这可能是由于网络问题、服务器问题或应用程序错误等。为了提供更好的用户体验和优雅地处理任何可能发生的错误,Nginx作为一个强大的Web服务器软件,不仅能够提供高性能的服务,还能够灵活地配置错误页面。在Ng

随着云计算、大数据和物联网等技术的日益普及,虚拟化技术成为了当今IT领域的热门话题。虚拟化是通过将一台物理主机划分为多个独立的虚拟机,实现资源的共享和管理的方法。虚拟网络是虚拟化的其中一个重要组成部分,能够满足不同应用之间的网络隔离和互动需求。在本文中,我们将介绍如何使用Linux进行虚拟网络配置。一、Linux虚拟网络的概述在物理网络中,网卡是连接网络设备

在Linux服务器上配置防火墙非常重要,它可以有效地保护服务器免受恶意攻击。在Ubuntu操作系统上,我们可以使用UFW防火墙来保护服务器的安全。在本文中,我们将介绍如何使用宝塔面板配置UFW防火墙。第一步:安装宝塔面板首先,我们需要在Ubuntu上安装宝塔面板。您可以在宝塔官网免费下载宝塔面板的安装包,然后在命令行中运行以下命令来安装宝塔面板:$wget


Outils d'IA chauds

Undresser.AI Undress
Application basée sur l'IA pour créer des photos de nu réalistes

AI Clothes Remover
Outil d'IA en ligne pour supprimer les vêtements des photos.

Undress AI Tool
Images de déshabillage gratuites

Clothoff.io
Dissolvant de vêtements AI

AI Hentai Generator
Générez AI Hentai gratuitement.

Article chaud

Outils chauds

SublimeText3 version Mac
Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Dreamweaver Mac
Outils de développement Web visuel

PhpStorm version Mac
Le dernier (2018.2.1) outil de développement intégré PHP professionnel

ZendStudio 13.5.1 Mac
Puissant environnement de développement intégré PHP

SublimeText3 version chinoise
Version chinoise, très simple à utiliser