CentOS6 インストールをしてから日本語環境にする
スポンサーリンク
Linuxについての記事です。
CentOSをインストールして起動したら言語環境が英語になってしまったのでシステムのインストールが終わった後に日本語の言語環境に変更する為の操作です。
英語でシステムをインストールしてしまうとメニューなどが英語の表示になってしまいます。
日本語環境をインストールします。
# yum groupinstall "Japanese Support"
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* extras: www.ftp.ne.jp
* updates: www.ftp.ne.jp
Setting up Group Process
Checking for new repos for mirrors
Package vlgothic-fonts-20091202-2.el6.noarch already installed and latest version
Package poppler-data-0.4.0-1.el6.noarch already installed and latest version
Package ibus-anthy-1.2.1-3.el6.i686 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package autocorr-ja.noarch 1:3.4.5.2-16.1.el6_3 will be installed
---> Package ipa-gothic-fonts.noarch 0:003.02-4.2.el6 will be installed
---> Package ipa-mincho-fonts.noarch 0:003.02-3.1.el6 will be installed
---> Package ipa-pgothic-fonts.noarch 0:003.02-4.1.el6 will be installed
---> Package ipa-pmincho-fonts.noarch 0:003.02-3.1.el6 will be installed
---> Package libreoffice-langpack-ja.i686 1:3.4.5.2-16.1.el6_3 will be installed
---> Package man-pages-ja.noarch 0:20100115-5.el6 will be installed
---> Package vlgothic-p-fonts.noarch 0:20091202-2.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
autocorr-ja noarch 1:3.4.5.2-16.1.el6_3 base 89 k
ipa-gothic-fonts noarch 003.02-4.2.el6 base 3.6 M
ipa-mincho-fonts noarch 003.02-3.1.el6 base 5.0 M
ipa-pgothic-fonts noarch 003.02-4.1.el6 base 3.6 M
ipa-pmincho-fonts noarch 003.02-3.1.el6 base 5.0 M
libreoffice-langpack-ja i686 1:3.4.5.2-16.1.el6_3 base 17 M
man-pages-ja noarch 20100115-5.el6 base 5.5 M
vlgothic-p-fonts noarch 20091202-2.el6 base 2.2 M
Transaction Summary
================================================================================
Install 8 Package(s)
Total size: 42 M
Installed size: 72 M
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key)
Package: centos-release-6-4.el6.centos.10.i686 (@UIedited_0/6.4)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:autocorr-ja-3.4.5.2-16.1.el6_3.noarch 1/8
Installing : ipa-pmincho-fonts-003.02-3.1.el6.noarch 2/8
Installing : 1:libreoffice-langpack-ja-3.4.5.2-16.1.el6_3.i686 3/8
Installing : vlgothic-p-fonts-20091202-2.el6.noarch 4/8
Installing : ipa-pgothic-fonts-003.02-4.1.el6.noarch 5/8
Installing : man-pages-ja-20100115-5.el6.noarch 6/8
Installing : ipa-mincho-fonts-003.02-3.1.el6.noarch 7/8
Installing : ipa-gothic-fonts-003.02-4.2.el6.noarch 8/8
Verifying : ipa-pmincho-fonts-003.02-3.1.el6.noarch 1/8
Verifying : 1:autocorr-ja-3.4.5.2-16.1.el6_3.noarch 2/8
Verifying : ipa-gothic-fonts-003.02-4.2.el6.noarch 3/8
Verifying : ipa-mincho-fonts-003.02-3.1.el6.noarch 4/8
Verifying : 1:libreoffice-langpack-ja-3.4.5.2-16.1.el6_3.i686 5/8
Verifying : man-pages-ja-20100115-5.el6.noarch 6/8
Verifying : ipa-pgothic-fonts-003.02-4.1.el6.noarch 7/8
Verifying : vlgothic-p-fonts-20091202-2.el6.noarch 8/8
Installed:
autocorr-ja.noarch 1:3.4.5.2-16.1.el6_3
ipa-gothic-fonts.noarch 0:003.02-4.2.el6
ipa-mincho-fonts.noarch 0:003.02-3.1.el6
ipa-pgothic-fonts.noarch 0:003.02-4.1.el6
ipa-pmincho-fonts.noarch 0:003.02-3.1.el6
libreoffice-langpack-ja.i686 1:3.4.5.2-16.1.el6_3
man-pages-ja.noarch 0:20100115-5.el6
vlgothic-p-fonts.noarch 0:20091202-2.el6
Complete!
/etc/sysconfig/i18nの編集をします。
LANG=”en_US.UTF-8″からLANG=”ja_JP.eucJP”に変更します。
文字コードはUTF-8だと自分の環境では日本語にならなかったのでeucJPで試したらうまくいきました。
# vi /etc/sysconfig/i18n LANG="en_US.UTF-8" ←LANG="ja_JP.eucJP"に変更 SYSFONT="latarcyrheb-sun16"
スポンサーリンク
~/.bash_profileに以下の二行を追加する。
# vi ~/.bash_profile LANG=ja_JP.eucJP ←追加 export LANG ←追加
システムを再起動させて再起動するとデスクトップ環境を利用している場合はフォルダの名称を日本語に設定するかの確認画面が表示されます。
自分の場合は変更したくないので「古い名前のままにする」で設定しました。
フォルダの名前変更画面
フォルダの名前の設定を「古い名前のままにする」にしておくと今までのフォルダはキープされて新しい名前のフォルダが別に作成されます。
フォルダの中に入っているデータ等はそのまま残されたままになります。
| 現在のフォルダ名 | 新しいフォルダ名 |
| /home/user/Desktop | /home/user/デスクトップ |
| /home/user/Downloads | /home/user/ダウンロード |
| /home/user/Temlates | /home/user/テンプレート |
| /home/user/Public | /home/user/公開 |
| /home/user/Documents | /home/user/ドキュメント |
| /home/user/Music | /home/user/音楽 |
| /home/user/Pictures | /home/user/画像 |
| /home/user/Videos | /home/user/ビデオ |