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

More than 3 years have passed since last update.

posted at

v1801.01 の CentOS 7 Vagrant box に日本語ロケールを追加する方法

v1710.01 は在ったんだけどな。。。

vagrant up 直後

[vagrant@localhost ~]$ localectl list-locales | grep -i ja
[vagrant@localhost ~]$

日本語ロケールが無い。。。

glibc-common 再インストール

[vagrant@localhost ~]$ sudo yum -y reinstall glibc-common
(省略)
[vagrant@localhost ~]$
[vagrant@localhost ~]$ localectl list-locales | grep -i ja
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
[vagrant@localhost ~]$

大丈夫っぽい。

ロケール設定

[vagrant@localhost ~]$ sudo localectl set-locale LANG=ja_JP.UTF-8
[vagrant@localhost ~]$ sudo localectl set-keymap jp106
[vagrant@localhost ~]$ sudo localectl set-keymap jp-OADG109A
[vagrant@localhost ~]$ localectl status
   System Locale: LANG=ja_JP.UTF-8
       VC Keymap: jp-OADG109A
      X11 Layout: jp
       X11 Model: jp106
     X11 Options: terminate:ctrl_alt_bksp
[vagrant@localhost ~]$

ここでログインし直し。

[vagrant@localhost ~]$ echo $LANG
ja_JP.UTF-8
[vagrant@localhost ~]$ ls -lA
total 16
-rw-------. 1 vagrant vagrant 275  1月 19 02:23 .bash_history
-rw-r--r--. 1 vagrant vagrant  18  9月  6 16:25 .bash_logout
-rw-r--r--. 1 vagrant vagrant 193  9月  6 16:25 .bash_profile
-rw-r--r--. 1 vagrant vagrant 231  9月  6 16:25 .bashrc
drwx------. 2 vagrant vagrant  29  1月 19 02:14 .ssh
[vagrant@localhost ~]$

大丈夫っぽい。(2 回目)

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
4
Help us understand the problem. What are the problem?