{"id":3621,"date":"2025-03-19T23:00:00","date_gmt":"2025-03-19T14:00:00","guid":{"rendered":"https:\/\/jikoman.sin-cos.com\/blog\/?p=3621"},"modified":"2025-03-19T23:00:00","modified_gmt":"2025-03-19T14:00:00","slug":"vps-8","status":"publish","type":"post","link":"https:\/\/jikoman.sin-cos.com\/blog\/2025\/03\/vps-8\/","title":{"rendered":"VPS\u3067AlmaLinux (8) \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u66f4\u65b0"},"content":{"rendered":"\n<p><a href=\"\/blog\/2025\/03\/vps-7\/\" data-type=\"post\" data-id=\"3426\">\u524d\u56de<\/a>\u306f\u3001\u30e1\u30fc\u30eb\u306e\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u3092\u884c\u3063\u305f\u3002<br>\u4eca\u56de\u306f\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u66f4\u65b0\u3092\u884c\u3046\u3002<\/p>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30bd\u30d5\u30c8\u306f\u3001\u5e38\u306b\u66f4\u65b0\u3057\u3066\u6700\u65b0\u306e\u72b6\u614b\u3092\u4fdd\u3063\u3066\u304a\u304d\u305f\u3044\u3002<br>\u8106\u5f31\u6027\u304c\u6b8b\u3063\u305f\u307e\u307e\u306e\u30b7\u30b9\u30c6\u30e0\u307b\u3069\u8106\u3044\u3082\u306e\u306f\u306a\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u52d5\u3067\u306e\u66f4\u65b0<\/h3>\n\n\n\n<p>\u624b\u52d5\u3067\u66f4\u65b0\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo dnf -y update<br>\u3000\uff1a<br>Complete!<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9a\u671f\u66f4\u65b0<\/h3>\n\n\n\n<p>\u307e\u305a\u3001\u81ea\u52d5\u66f4\u65b0\u7528\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo dnf -y install dnf-automatic<br>\u3000\uff1a<br>Installed:<br><br>  dnf-automatic-4.14.0-17.el9.alma.1.noarch                                                           <br><br>Complete!<\/pre>\n\n\n\n<p>\u305d\u3057\u3066\u3001\u8a2d\u5b9a\u3092\u5c11\u3057\u5909\u3048\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi \/etc\/dnf\/automatic.conf<\/pre>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u66f4\u65b0\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306e\u307f\u3067\u3001\u5b9f\u969b\u306e\u66f4\u65b0\u306f\u3057\u3066\u304f\u308c\u306a\u3044\u3002<br>\u3067\u3082\u3001\u5b9f\u969b\u306b\u66f4\u65b0\u3092\u3057\u3066\u304f\u308c\u306a\u3044\u3068\u3001\u624b\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3068\u305d\u308c\u307b\u3069\u5909\u308f\u3089\u306a\u3044\u306e\u3067\u3001\u81ea\u52d5\u7684\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u307e\u3067\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[commands]<br><br># Whether updates should be applied when they are available, by<br># dnf-automatic.timer. notifyonly.timer, download.timer and<br># install.timer override this setting.<br>#apply_updates = no<br>apply_updates = yes<\/pre>\n\n\n\n<p>\u3082\u3057\u3001\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u306a\u3089\u3001\u518d\u8d77\u52d5\u3082\u884c\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[commands]<br><br># When the system should reboot following upgrades: <br># never                              = don't reboot after upgrades<br># when-changed                       = reboot after any changes<br># when-needed                        = reboot when necessary to apply changes<br>#reboot = never<br>reboot = when-needed <\/pre>\n\n\n\n<p>\u305d\u3057\u3066\u3001\u66f4\u65b0\u3057\u305f\u3089\u30e1\u30fc\u30eb\u3067\u77e5\u3089\u305b\u3066\u3082\u3089\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[commands]<br><br># How to send messages.  Valid options are stdio, email and motd.  If<br># emit_via includes stdio, messages will be sent to stdout; this is useful<br># to have cron send the messages.  If emit_via includes email, this<br># program will send email itself according to the configured options.<br># If emit_via includes motd, \/etc\/motd file will have the messages. if<br># emit_via includes command_email, then messages will be send via a shell<br># command compatible with sendmail.<br># Default is email,stdio.<br># If emit_via is None or left blank, no messages will be sent.<br>#emit_via = stdio<br>emit_via = mail<\/pre>\n\n\n\n<p>\u9001\u4fe1\u5143\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3082\u8a2d\u5b9a\u3057\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[email]<br><br># The address to send email messages from.<br>#email_from = root@example.com<br>email_from = dnf@yourdomain.com<br><br>[command_email]<br><br># The address to send email messages from.<br>#email_from = root@example.com<br>email_from = dnf@yourdomain.com<\/pre>\n\n\n\n<p>\u3067\u306f\u3001\u66f4\u65b0\u3057\u3066\u3082\u3089\u3046\u305f\u3081\u306e\u30bf\u30a4\u30de\u30fc\u3092\u52d5\u304b\u305d\u3046\u3002<br>\u81ea\u52d5\u8d77\u52d5\u306e\u8a2d\u5b9a\u3068\u540c\u6642\u306b\u8d77\u52d5\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl enable --now dnf-automatic-install.timer<br>Created symlink \/etc\/systemd\/system\/timers.target.wants\/dnf-automatic-install.timer \u2192 \/usr\/lib\/systemd\/system\/dnf-automatic-install.timer.<\/pre>\n\n\n\n<p>\u30bf\u30a4\u30de\u30fc\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl list-timers *dnf-*<br>NEXT                        LEFT       LAST                        PASSED    UNIT                        ACTIVATES                    <br>Wed 2025-03-12 14:07:09 JST 17min left    Wed 2025-03-12 12:18:12 JST 1h 31min ago dnf-makecache.timer         dnf-makecache.service<br>Thu 2025-03-13 06:36:53 JST 16h left      Wed 2025-03-12 06:42:09 JST 7h ago        dnf-automatic-install.timer dnf-automatic-install.service<br><br>2 timers listed.<br>Pass --all to see loaded but inactive timers, too.<\/pre>\n\n\n\n<p>\u30b5\u30fc\u30d3\u30b9\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ systemctl status dnf-automatic-install.timer<br>\u25cf dnf-automatic.timer - dnf-automatic timer<br>     Loaded: loaded (\/usr\/lib\/systemd\/system\/dnf-automatic-instal.timer; enabled; preset: disabled)<br>     Active: active (waiting) since Wed 2025-03-19 00:30:09 JST; 2min 21s ago<br>      Until: Wed 2025-03-19 00:30:09 JST; 2min 21s ago<br>    Trigger: Wed 2025-03-19 06:43:59 JST; 6h left<br>   Triggers: \u25cf dnf-automatic-install.service<br><br>Mar 19 00:30:09 hostname systemd[1]: Started dnf-automatic-install timer.<\/pre>\n\n\n\n<p>\u66f4\u65b0\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u306f\u3001systemctl enable\u3092\u5b9f\u884c\u3057\u305f\u6642\u306b\u8868\u793a\u3055\u308c\u305f\u6b21\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u53c2\u7167\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cat \/etc\/systemd\/system\/timers.target.wants\/dnf-makecache.timer<br>[Unit]<br>Description=dnf makecache --timer<br>ConditionKernelCommandLine=!rd.live.image<br># See comment in dnf-makecache.service<br>ConditionPathExists=!\/run\/ostree-booted<br>Wants=network-online.target<br><br>[Timer]<br>OnBootSec=10min<br>OnUnitInactiveSec=1h<br>RandomizedDelaySec=60m<br>Unit=dnf-makecache.service<br><br>[Install]<br>WantedBy=timers.target<\/pre>\n\n\n\n<p>\u8d77\u52d510\u5206\u5f8c\u3001\u305d\u308c\u4ee5\u964d1\u6642\u9593\u3054\u3068\u306b\u6700\u592760\u5206\u306e\u9045\u5ef6\u3092\u7d4c\u3066\u30d5\u30a1\u30a4\u30eb\u53d6\u5f97\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cat \/etc\/systemd\/system\/timers.target.wants\/dnf-automatic-install.timer<br>[Unit]<br>Description=dnf-automatic-install timer<br># See comment in dnf-makecache.service<br>ConditionPathExists=!\/run\/ostree-booted<br>Wants=network-online.target<br><br>[Timer]<br>OnCalendar=*-*-* 6:00<br>RandomizedDelaySec=60m<br>Persistent=true<br><br>[Install]<br>WantedBy=timers.target<\/pre>\n\n\n\n<p>\u6bce\u671d\uff16\u6642\u304b\u3089\u6700\u592760\u5206\u7d4c\u904e\u5f8c\u306b\u66f4\u65b0\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p><a href=\"\/blog\/2025\/03\/vps-9\">\u6b21\u56de<\/a>\u306f\u3001\u30db\u30b9\u30c8\u540d\u306e\u5909\u66f4\u3092\u884c\u3046\u3002<\/p>\n\n\n\n<p>\u304a\u53cb\u9054\u7d39\u4ecb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5229\u7528\u3057\u3066\u5951\u7d04\u3059\u308b\u306810%OFF\u306b\u306a\u308b\u305d\u3046\u306a\u306e\u3067\u3001<br>\u3082\u3057\u3088\u308d\u3057\u3051\u308c\u3070\u6b21\u306e\u753b\u50cf\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/vps.xserver.ne.jp\/?referral_token=64605993567cf006eae78d\" target=\"_blank\" rel=\" noreferrer noopener\"><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2025\/03\/image-36-1.png\" alt=\"\" class=\"wp-image-3494\"\/><\/a><\/figure>\n\n\n\n<p>\u6295\u7a3f\u4e00\u89a7\u306f\u3053\u3061\u3089\u2192\u300c<a href=\"\/blog\/vps\/\" data-type=\"page\" data-id=\"3450\">VPS\u3067AlmaLinux<\/a>\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u66f4\u65b0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129],"tags":[9,43,50],"class_list":["post-3621","post","type-post","status-publish","format-standard","hentry","category-pc","tag-almalinux","tag-vps","tag-xserver"],"_links":{"self":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/3621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/comments?post=3621"}],"version-history":[{"count":0,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/3621\/revisions"}],"wp:attachment":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media?parent=3621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/categories?post=3621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/tags?post=3621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}