temporary:lsyncd
                文書の過去の版を表示しています。
lsyncd
Install
# yum install lsyncd rsync ~省略~ ========================================================================================= パッケージ アーキテクチャ バージョン リポジトリー 容量 ========================================================================================= インストールしています: lsyncd x86_64 2.1.5-0.el6 epel 73 k トランザクションの要約 ========================================================================================= インストール 1 パッケージ ~省略~ インストール: lsyncd.x86_64 0:2.1.5-0.el6 完了しました!
Configuration
# cp -a /etc/lsyncd.conf /etc/lsyncd.conf.org # vi /etc/lsyncd.conf
- コピー元:ローカルの/usr/share/nginx/html/ab
 - コピー先:web02、web03の/usr/share/nginx/html/ab
 
----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync, but executing moves through on the target.
--
-- For more examples, see /usr/share/doc/lsyncd*/examples/
-- 
-- sync{default.rsyncssh, source="/var/www/html", host="localhost", targetdir="/tmp/htmlcopy/"}
settings {
    logfile = "/var/log/lsyncd/lsyncd.log",
    statusFile = "/var/log/lsyncd/lsyncd-status.log",
    statusInterval = 1
}
sync {
    default.rsync,
    delay = 0,
    source="/usr/share/nginx/html/ab",
    target="web02:/usr/share/nginx/html/ab"
}
sync {
    default.rsync,
    delay = 0,
    source="/usr/share/nginx/html/ab",
    target="web03:/usr/share/nginx/html/ab"
}
Service start
# /etc/init.d/lsyncd start
temporary/lsyncd.1466671742.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)
                
                