{"id":4060,"date":"2024-08-16T06:35:08","date_gmt":"2024-08-15T21:35:08","guid":{"rendered":"https:\/\/www.kinryo.net\/?p=4060"},"modified":"2024-08-19T11:09:56","modified_gmt":"2024-08-19T02:09:56","slug":"lsyncd-%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=4060","title":{"rendered":"lsyncd \u8a2d\u5b9a"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">lsyncd\u3092\u4f7f\u3063\u3066\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30fc\u30bf\u30fc\u3092\u5225\u306e\u30b5\u30fc\u30d0\u30fc\u3068\u540c\u671f\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\u540c\u671f\u5143\u3067<br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">dnf install lsyncd<\/span><br \/>\u305d\u3057\u3066\u3001ssh\u3067\u4f7f\u3046key\u3092\u4f5c\u6210\u3057\u307e\u3059<br \/><span style=\"color: #ff6600;\">#<\/span><span style=\"color: #008000;\"> ssh-keygen<\/span><br \/><span style=\"color: #ff6600;\">Generating public\/private rsa key pair.<\/span><br \/><span style=\"color: #ff6600;\">Enter file in which to save the key (\/root\/.ssh\/id_rsa):<\/span> <span style=\"color: #008000;\">Enter<\/span><br \/><span style=\"color: #ff6600;\">Enter passphrase (empty for no passphrase):<\/span> <span style=\"color: #008000;\">Enter<\/span><br \/><span style=\"color: #ff6600;\">Enter same passphrase again:<\/span> <span style=\"color: #008000;\">Enter<\/span><br \/><span style=\"color: #ff6600;\">Your identification has been saved in \/root\/.ssh\/id_rsa<\/span><br \/><span style=\"color: #ff6600;\">Your public key has been saved in \/root\/.ssh\/id_rsa.pub<\/span><br \/><span style=\"color: #ff6600;\">The key fingerprint is:<\/span><br \/>\u5f8c\u7565<br \/>root\u306e.ssh\u306b\u51fa\u6765\u305f id_rsa.pub \u3092\u30e1\u30fc\u30eb\u306a\u3093\u304b\u3067\u540c\u671f\u5148\u306e\u30db\u30b9\u30c8\u306e\/root\/.ssh\/\u306b<br \/>authorized_keys\u3068\u3057\u3066\u4fdd\u5b58\u3002\u3082\u3061\u308d\u3093\u3001\u3053\u306e\u540c\u671f\u5148\u3067ssh\u3084rsync\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u304a\u304f\u3002<br \/>lsyncd\u306e\u8a2d\u5b9a<br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/lsyncd.conf<\/span><br \/><span style=\"color: #ff6600;\">&#8212; sync{default.rsyncssh, source=&#8221;\/var\/www\/html&#8221;, host=&#8221;localhost&#8221;, targetdir=&#8221;\/tmp\/htmlcopy\/&#8221;}<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">settings{<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000logfile = &#8220;\/var\/log\/lsyncd\/lsyncd.log&#8221;,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000tatusFile = &#8220;\/tmp\/lsyncd.stat&#8221;,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000statusInterval = 1,<\/span><br \/><span style=\"color: #ff6600;\">&#8211;\u3000 \u540c\u671f\u5148\u3068\u306e\u63a5\u7d9a\u306b\u5931\u6557\u3057\u3066\u3082\u518d\u63a5\u7d9a\u3092\u8a66\u307f\u7d9a\u3051\u308b<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000insist = 1,<\/span><br \/><span style=\"color: #ff6600;\">}<\/span><br \/><span style=\"color: #ff6600;\">sync{<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000default.rsyncssh,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000source=&#8221;\/SmbData&#8221;,<\/span><br \/><span style=\"color: #ff6600;\">&#8211;\u3000\u540c\u671f\u5148\u306e\u306e\u30d1\u30b9<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000host=&#8221;root@192.168.0.69&#8243;,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000targetdir=&#8221;\/SmbData\/&#8221;,<\/span><br \/><span style=\"color: #ff6600;\">&#8211;\u3000delete =true,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000rsync = {<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000\u3000\u3000archive = true,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000\u3000\u3000links = true,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000\u3000\u3000update = true,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000\u3000\u3000verbose = false,<\/span><br \/><span style=\"color: #ff6600;\">\u3000\u3000}<\/span><br \/><span style=\"color: #ff6600;\">}<br \/><span style=\"color: #333333;\">\u6700\u521d\u306e\u30b3\u30e1\u30f3\u30c8\u90e8\u5206\u306fdefault\u3067\u8a18\u5165\u304c\u3042\u3063\u305f\u90e8\u5206\u3001delete\u306f\u5371\u967a\u306a\u306e\u3067\u6700\u521d\u306f\u5916\u3057\u3066\u3042\u308b\u3002\u5f8c\u65e5\u30b3\u30e1\u30f3\u30c8\u3092\u53d6\u308b\u3002\u3053\u306e\u8a2d\u5b9a\u306e\u30b3\u30e1\u30f3\u30c8\u306f # \u3067\u306f\u7121\u304f\u3001 &#8212; \u3002\u521d\u3081\u305d\u308c\u306b\u6c17\u304c\u4ed8\u304b\u305a\u30c8\u30e9\u30d6\u3063\u305f\u3002<\/span><span style=\"color: #ff00ff;\">\uff08\u6ce8: wordpress\u306f\u3069\u3046\u3044\u3046\u8a33\u304b\u3001\u30fc\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u30fc\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f)<\/span><br \/><span style=\"color: #333333;\">\u3067\u8d77\u52d5\u306a\u3069<\/span><br \/># <span style=\"color: #008000;\">systemctl start lsyncd<\/span><br \/># <span style=\"color: #008000;\">systemctl status lsyncd<\/span><br \/>\u25cf lsyncd.service &#8211; Live Syncing (Mirror) Daemon<br \/>\u3000\u3000Loaded: loaded (\/usr\/lib\/systemd\/system\/lsyncd.service; disabled; pre&gt;<br \/>\u3000\u3000Active: active (running) since Fri 2024-08-16 05:56:22 JST; 8s ago<br \/>\u3000\u3000Docs: man:lsyncd(1)<br \/>\u3000\u3000\u3000\u3000https:\/\/axkibe.github.io\/lsyncd\/<br \/>\u3000\u3000Main PID: 1285659 (lsyncd)<br \/>\u3000\u3000Tasks: 3 (limit: 23051)<br \/><span style=\"color: #333333;\">\u5f8c\u7565<\/span><br \/># <span style=\"color: #008000;\">systemctl enable lsyncd<\/span><br \/>Created symlink \/etc\/systemd\/system\/multi-user.target.wants\/lsyncd.service \u2192 \/usr\/lib\/systemd\/system\/lsyncd.service.<br \/><span style=\"color: #333333;\">\u3053\u308c\u3067\u540c\u671f\u5143\u306b\u4f55\u304b\u66f8\u304d\u8fbc\u307f\u3001\u540c\u671f\u5148\u306b\u51fa\u6765\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\u3002<\/span><\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>lsyncd\u3092\u4f7f\u3063\u3066\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u30c7\u30fc\u30bf\u30fc\u3092\u5225\u306e\u30b5\u30fc\u30d0\u30fc\u3068\u540c\u671f\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u540c\u671f\u5143\u3067# dnf install lsyncd\u305d\u3057\u3066\u3001ssh\u3067\u4f7f\u3046key\u3092\u4f5c\u6210\u3057\u307e\u3059# ssh-keygenGenerating  &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=4060\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","footnotes":""},"categories":[27],"tags":[],"class_list":["post-4060","post","type-post","status-publish","format-standard","hentry","category-almalinux"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4060"}],"version-history":[{"count":6,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4060\/revisions"}],"predecessor-version":[{"id":4068,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4060\/revisions\/4068"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}