ひとり勉強ログ

ITエンジニアの勉強したことメモ

CentOS7.1(1503)のインストール後初期設定

yumパッケージのアップデート

アップデート可能なパッケージをすべてアップデート。 [bash] [root@localhost ~]# yum -y update [/bash]

ユーザー追加

minecraft」というユーザーを追加。 [bash] [root@localhost ~]# useradd minecraft [/bash] パスワードの設定。 [bash] [root@localhost ~]# passwd minecraft ユーザー minecraft のパスワードを変更。 新しいパスワード: 新しいパスワードを再入力してください: passwd: すべての認証トークンが正しく更新できました。 [/bash]

SELinuxを無効化

現状を確認。 [bash] [root@localhost ~]# getenforce Enforcing [/bash]

無効化する。 [bash] [root@localhost ~]# setenforce 0 [/bash]

再度確認。 [bash] [root@localhost ~]# getenforce Disabled [/bash]

起動時にSElinuxを無効化する。 以下のファイルを編集する。 /etc/sysconfig/selinux を開いて [bash] [root@localhost ~]# vi /etc/sysconfig/selinux [/bash]

以下の部分を編集。 [編集前] [bash] SELINUX=enforcing [/bash]

[編集後] [bash] SELINUX=disabled [/bash]

文字コードUTF-8に変更

現状を確認。 [bash] [root@localhost ~]# localectl [/bash]

以下のように表示されればUTFー8になっている。 [bash] System Locale: LANG=ja_JP.UTF-8 VC Keymap: jp X11 Layout: jp [/bash]

UTFー8になっていなければ下記のコマンドでUTF-8へ変更。 [bash] [root@localhost ~]# localectl set-locale LANG=ja_JP.UTF-8 [/bash]