16
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

updated at

CentOS7のlocaleを日本にする

CentOS7の設定をやった時に調べたのでメモ

環境

OS・ミドルウェア バージョン
OS CentOS Linux release 7.3.1611 (Core)
VirtualBox 5.1.26
Vagrant 1.9.7

手順

  1. 現在の設定を確認する

    # localectl
       System Locale: LANG=en_US.UTF-8
           VC Keymap: us
          X11 Layout: n/a
    #date
    Sat Jul 29 14:19:28 UTC 2017
    
  2. 日本語のロケールがあるかどうか確認する

    # localectl list-locales | grep -i ja
    
  3. 日本語のロケールがない場合は以下を実行する

    # yum -y reinstall glibc-common
    
  4. 日本のlocaleを設定する

    # localectl set-locale LANG=ja_JP.UTF-8
    # source /etc/locale.conf
    
  5. 変更されたことを確認する

    # localectl
       System Locale: LANG=ja_JP.UTF-8
           VC Keymap: us
          X11 Layout: n/a
    
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
16
Help us understand the problem. What are the problem?