diff --git a/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg b/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg index cbbd59f..1104b94 100644 --- a/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg +++ b/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg @@ -51,6 +51,12 @@ network: # Add new ssh port for firewalld. # Install epel repository and some common components. # Refresh dependents of systemctl. +# Set english as default of language and locate to profile to provent "Failed to set locale, defaulting to C.UTF-8" by executing "dnf update -y". +# Reference: https://linuxfan.info/locale-variables +# Chapter: カテゴリー別のロケール設定 and 環境変数「LC_ALL」が設定されていれば最優先される +# https://it-afi.com/linux/failed-to-set-locale-defaulting-to-c-utf-8-%E3%81%A3%E3%81%A6%E5%87%BA%E5%8A%9B%E3%81%95%E3%82%8C%E3%81%9F/ +# Chapter: 全部のロケールをC(アメリカ英語)にする場合 +# Reload profile of bash. # Update grub2. # Delete cloud-init config file itself and disable it permanently after first execution. runcmd: @@ -68,6 +74,8 @@ runcmd: - sed -i '7i \ \ ' /etc/firewalld/zones/public.xml - dnf install curl dnsutils epel-release file lrzsz net-tools vim wget -y - systemctl daemon-reload + - echo 'export LC_ALL="C.UTF-8"' >> ~/.bash_profile + - source ~/.bash_profile - grub2-mkconfig -o $(readlink -f /etc/grub2-efi.cfg) - rm -rf /etc/cloud/cloud.cfg.d/99-fake_cloud.cfg - touch /etc/cloud/cloud-init.disabled