CentOS 7¶
はじめに¶
OS基本設定¶
CentOS 7 のインストール内容につきましては下記の通りとなります。
パーティション¶
| パーティション番号 | マウントポイント | パーティション名 | フォーマット | 容量 | 
|---|---|---|---|---|
| 1 | ‐ | /dev/vda1 | bios_grubフラグ (EF02) | 1024KB | 
| 2 | /boot | /dev/vda2 | ext4(0700) | 500 MB(各プラン共通) | 
| 3 | swap | /dev/vda3 | tmpfs (8200) | 4 GB(各プラン共通) | 
| 4 | / | /dev/vda4 | ext4(0700) | vdaの残り(各プラン共通) | 
| – | /home (※1) | /dev/vdb1 | ext4 | 1Gプラン : 30 GB 1.5Gプラン : 80 GB 4Gプラン : 180 GB 8Gプラン : 380 GB | 
ブートローダ¶
OS起動に関する変更¶
コンソール表示に関する変更¶
その他の変更¶
| ブートローダ | GRUB2(OS標準) | 
|---|
| 設定ファイル | /etc/default/grub | 
|---|---|
| 設定内容 | GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=”$(sed ‘s, release .*$,,g’ /etc/system-release)” GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL=”serial console” GRUB_SERIAL_COMMAND=”serial –speed=115200″ GRUB_CMDLINE_LINUX=”vconsole.font=latarcyrheb-sun16 consoleblank=0 nomodeset elevator=noop net.ifnames=0 biosdevname=0 console=tty1 console=ttyS0,115200n8r video=720×400″ GRUB_DISABLE_RECOVERY=”true” | 
ランレベル(Linuxの動作モード)¶
デフォルトのランレベルは「multi-user.target」(テキストログインの通常のマルチユーザモード)です。
ホスト名設定¶
| 設定ファイル | /etc/hostname | 
|---|---|
| 設定値 | localhost.localdomain | 
| 設定ファイル | /etc/hosts | 
|---|---|
| 設定内容 | 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 | 
IPアドレスの設定¶
| 設定ファイル | /etc/sysconfig/network-scripts/ifcfg-eth0 | 
|---|---|
| 設定内容 | サーバ固有のグローバルIPアドレス 1つ ※ | 
注意
※ eth0 に設定するIPアドレスの変更や追加は行わないでください。
| 設定ファイル | /etc/sysconfig/network-scripts/ifcfg-eth1 | 
|---|---|
| 設定内容 | DEVICE=”eth1″ ONBOOT=”no” TYPE=”Ethernet” | 
| 設定ファイル | /etc/sysconfig/network-scripts/ifcfg-eth2 | 
|---|---|
| 設定内容 | DEVICE=”eth2″ ONBOOT=”no” TYPE=”Ethernet” | 
TSOの無効化設定¶
| 設定ファイル | /etc/udev/rules.d/50-eth_tso.rules | 
|---|---|
| 設定内容 | ACTION==”add”, SUBSYSTEM==”net”, KERNEL==”eth*”, RUN+=”/sbin/ethtool -K %k tso off”ACTION==”add”, SUBSYSTEM==”net”, KERNEL==”ens*”, RUN+=”/sbin/ethtool -K %k tso off” | 
リゾルバの設定¶
サーバの参照ネームサーバとして、さくらインターネットのネームサーバを設定しています。
| 設定ファイル | /etc/resolv.conf | 
|---|---|
| 設定内容 | nameserver 210.188.224.10 nameserver 210.188.224.11 nameserver 2001:e42::2 または nameserver 210.224.163.3 nameserver 210.224.163.4 nameserver 2403:3a00::1 または nameserver 133.242.0.3 nameserver 133.242.0.4 nameserver 2401:2500::1 | 
NTPの設定(時刻の同期)¶
| 設定ファイル | /etc/chrony.conf | 
|---|---|
| 設定内容 | server ntp1.sakura.ad.jp iburst bindcmdaddress 127.0.0.1 bindcmdaddress ::1 port 0 user chrony cmddeny all lock_all | 
インストール済みパッケージグループ¶
| Package Group | @ Base @ Development Tools | 
|---|---|
| Package | epel-release chrony | 
| Exclusion Package | microcode_ctl ntp rdma | 
起動デーモン¶
| デーモン名 | 機能説明 | 外部からの接続ポート | 
|---|---|---|
| abrt-ccpp.service | C/C++ 問題のアナライザーを提供する ABRT サービス | – | 
| abrt-oops.service | カーネル oops のアナライザーを提供する ABRT サービス | – | 
| abrt-vmcore.service | カーネルのパニックアナライザーおよびレポーターを提供する ABRT サービス | – | 
| abrt-xorg.service | X.Org server のクラッシュについてのアナライザーを提供するABRT サービス | – | 
| abrtd.service | 自動バグ報告ツール(ABRT)サービス | – | 
| atd.service | コマンドの遅延実行を有効にするサービス | – | 
| auditd.service | システムコールの監査サービス | – | 
| autovt@.service | コンソールログインに利用するサービス | – | 
| chronyd.service | 時刻同期サービス (旧ntpd) ※ntpdサーバとしての機能は停止 | – | 
| crond.service | 定期的にジョブを実行するためのcronサービス | – | 
| dbus-org.freedesktop.NetworkManager.service | NetworkManager がプロセス間通信をおこなうためのメッセージバスサービス | – | 
| dbus-org.freedesktop.nm-dispatcher.service | nm-dispatcher がプロセス間通信をおこなうためのメッセージバスサービス | – | 
| dmraid-activation.service | Device-mapper RAID や dmraid はディスクをひとつの RAID セット | – | 
| getty@.service | 起動時に仮想端末に自動ログインする | – | 
| irqbalance.service | マルチプロセッサな環境での IRQ の割り込み処理用のサービス | – | 
| libstoragemgmt.service | 外部ストレージアレイ管理プラグイン | – | 
| lvm2-monitor.service | LVM2のモニタリングサービス | – | 
| mdmonitor.service | ソフトウェアRAIDをモニターするサービス | – | 
| NetworkManager-dispatcher.service | ネットワークに接続したときにサービスを起動し、切断したときにサービスを停止する機能 | – | 
| NetworkManager.service | ネットワークデバイスと接続を動的に管理するサービス | – | 
| postfix.service | メールのMTA 機能 | 25/smtp | 
| rngd.service | ハードウェア側の機能で乱数を発生させるサービス | – | 
| rsyslog.service | システムログなどを利用するサーバ監視ツール | – | 
| smartd.service | Self Monitoring and Reporting Technology (SMART) サービス | – | 
| sshd.service | SSH(Secure Shell)サーバサービス | 22/tcp | 
| sysstat.service | システムのさまざまな情報を取得するサービス | – | 
| systemd-readahead-collect.service | 起動時のディスク使用パターン収集サービス | – | 
| systemd-readahead-drop.service | systemd-readahead-collect.service にて収集したデータをシステム更新時に削除するサービス | – | 
| systemd-readahead-replay.service | systemd-readahead-collect.service にて収集したデータを中継するサービス | – | 
| tuned.service | システムコンポーネントの使用を監視し動的にシステム設定をチューニングするサービス | – | 
パッケージ管理ツール¶
| リポジトリ設定ファイル | /etc/yum.repos.d 以下 | 
|---|
| repo id | repo name | status | リポジトリ設定ファイル | 
|---|---|---|---|
| base/7/x86_64 | CentOS-7 – Base | enabled | CentOS-Base.repo | 
| extras/7/x86_64 | CentOS-7 – Extras | enabled | CentOS-Base.repo | 
| updates/7/x86_64 | CentOS-7 – Updates | enabled | CentOS-Base.repo | 
| centosplus/7/x86_64 | CentOS-7 – Plus | disabled | CentOS-Base.repo | 
| cr/7/x86_64 | CentOS-7 – cr | disabled | CentOS-CR.repo | 
| base-debuginfo/x86_64 | CentOS-7 – Debuginfo | disabled | CentOS-Debuginfo.repo | 
| fasttrack/7/x86_64 | CentOS-7 – fasttrack | disabled | CentOS-fasttrack.repo | 
| c7-media | CentOS-7 – Media | disabled | CentOS-Media.repo | 
| base-source/7 | CentOS-7 – Base Sources | disabled | CentOS-Sources.repo | 
| centosplus-source/7 | CentOS-7 – Plus Sources | disabled | CentOS-Sources.repo | 
| extras-source/7 | CentOS-7 – Extras Sources | disabled | CentOS-Sources.repo | 
| updates-source/7 | CentOS-7 – Updates Sources | disabled | CentOS-Sources.repo | 
| C7.0.1406-base/x86_64 | CentOS-7.0.1406 – Base | disabled | CentOS-Vault.repo | 
| C7.0.1406-centosplus/x86_64 | CentOS-7.0.1406 – CentOSPlus | disabled | CentOS-Vault.repo | 
| C7.0.1406-extras/x86_64 | CentOS-7.0.1406 – Extras | disabled | CentOS-Vault.repo | 
| C7.0.1406-fasttrack/x86_64 | CentOS-7.0.1406 – CentOSPlus | disabled | CentOS-Vault.repo | 
| C7.0.1406-updates/x86_64 | CentOS-7.0.1406 – Updates | disabled | CentOS-Vault.repo | 
| C7.1.1503-base/x86_64 | CentOS-7.1.1503 – Base | disabled | CentOS-Vault.repo | 
| C7.1.1503-centosplus/x86_64 | CentOS-7.1.1503 – CentOSPlus | disabled | CentOS-Vault.repo | 
| C7.1.1503-extras/x86_64 | CentOS-7.1.1503 – Extras | disabled | CentOS-Vault.repo | 
| C7.1.1503-fasttrack/x86_64 C | CentOS-7.1.1503 – Extras | disabled | CentOS-Vault.repo | 
| C7.1.1503-updates/x86_64 | CentOS-7.1.1503 – Updates | disabled | CentOS-Vault.repo | 
| epel/x86_64 | Extra Packages for Enterprise Linux 7 – x86_64 | enabled | epel.repo | 
| epel-debuginfo/x86_64 | Extra Packages for Enterprise Linux 7 – x86_64 – Debug | disabled | epel.repo | 
| epel-source/x86_64 | Extra Packages for Enterprise Linux 7 – x86_64 – Source | disabled | epel.repo | 
| epel-testing/x86_64 | Extra Packages for Enterprise Linux 7 – Testing – x86_64 | disabled | epel-testing.repo | 
| epel-testing-debuginfo/x86_64 | Extra Packages for Enterprise Linux 7 – Testing – x86_64 – Debug | disabled | epel-testing.repo | 
| epel-testing-source/x86_64 | Extra Packages for Enterprise Linux 7 – Testing – x86_64 – Source | disabled | epel-testing.repo | 
アプリケーション設定¶
表記の各アプリケーションの基本バージョンは、ディストリビューションによって今後アップデートされる場合があります。
CentOS 7 FAQ¶
日本語環境を使用する¶
初期状態では、英語環境となっております。メッセージを日本語化するには以下のコマンドを実行し、LANG=”ja_JP.UTF-8″ としてください。
# localectl set-locale LANG=ja_JP.utf8
初期状態¶
# localectl
System Locale: LANG=C
    VC Keymap: jp106
   X11 Layout: jp
変更後¶
# localectl
System Locale: LANG=ja_JP.utf8
    VC Keymap: jp106
   X11 Layout: jp