[更新: 2017年4月13日]
さくらのクラウドで提供中のCentOS 6.9 64bit パブリックアーカイブの設定内容について記載します。
CentOS パブリックアーカイブのバージョンごとの変更履歴詳細につきましては、さくらのクラウドニュース アーカイブ 記事一覧から、該当バージョンのパブリックアーカイブ公開のお知らせをご覧ください。
目次
- 管理ユーザ
- SELinux
- ロケール
- 言語
- 地域
- ディスク
- ネットワーク
- インタフェース
- プロトコル
- ホスト名
- ネームサーバ
- その他
- NTP
- ntpd
- ntpdate
- ファイアウォール
- iptables
- fail2ban
- SSH
- Postfix
- X Window system
- GRUB
- AutoFsck
- デーモン
- パッケージ
- ソフトウェアリポジトリ
管理ユーザ
アカウント名 | root |
---|---|
初期パスワード | なし(ディスク修正から設定可能) |
SELinux
無効
設定ファイル | /etc/sysconfig/selinux |
---|---|
設定内容 | SELINUX=disabled |
ロケール
言語 | LANG=C |
---|---|
タイムゾーン | Asia/Tokyo(JST) |
ディスク
パーティションテーブル | GPT |
---|
パーティション構成
パーティション番号 | マウントポイント | パーティション名 | フォーマット | 容量 |
---|---|---|---|---|
1 | /dev/shm | Linux swap | tmpfs (8200) | 4GB |
2 | / | Linux filesystem | ext4 (8300) | 残りのディスク容量まで拡張 |
ネットワーク
インタフェース | eth0 |
---|---|
プロトコル | IPv4:有効、IPv6:無効 ※1 |
ホスト名 | localhost.localdomain(ディスク修正から設定可能) |
ネームサーバ | 石狩リージョン: 133.242.0.3(dns13.sakura.ad.jp) 133.242.0.4(dns14.sakura.ad.jp) 東京リージョン: 210.188.224.10(dns5.sakura.ad.jp) 210.188.224.11(dns6.sakura.ad.jp) |
※1 IPv6でRAによるアドレス設定を受け付けない
設定ファイル | /etc/sysctl.conf |
---|---|
設定内容 | net.ipv6.conf.default.accept_ra=0 net.ipv6.conf.all.accept_ra=0 net.ipv6.conf.eth0.accept_ra=0 |
NTP
NTPサーバ | ntp1.sakura.ad.jp |
---|
ntpd
- 上位NTPサーバをntp1.sakura.ad.jpに設定し、時刻問い合わせをおこなう
- 自身がNTPサーバとしては動作しない(時刻の問い合わせに対し応答しない)
- monlist機能を無効化
設定ファイル | /etc/ntp.conf |
---|---|
設定内容 | restrict -4 default ignore restrict -6 default ignorerestrict ntp1.sakura.ad.jp kod nomodify notrap nopeer noquery disable monitor |
ntpdate
- リトライをおこなわない
- NTPでの時刻同期の際にサーバ内のハードウェアクロックを更新
設定ファイル | /etc/sysconfig/ntpdate |
---|---|
設定内容 | # Options for ntpdate OPTIONS=”-U ntp -s -b”# Set to ‘yes’ to sync hw clock after successful ntpdate SYNC_HWCLOCK=yes |
ファイアウォール
iptables / ip6tables
- 有効
- 初期設定ポリシーは INPUT、FORWARD、OUTPUT 共 ACCEPT
fail2ban
- 有効(SSHのログイン試行5回失敗で接続拒否)
- /var/log/fail2ban.logにログを出力する
- メール送信先、送信者をroot@localhostに変更
設定ファイル | /etc/fail2ban/fail2ban.conf |
---|---|
設定内容 | logtarget = /var/log/fail2ban.log |
設定ファイル | /etc/fail2ban/jail.conf |
---|---|
設定内容 | destemail = root@localhost sender = root@localhost |
SSH
- 以下のユーザ名でのSSH接続を拒否する
toor administrator administrateur admin adm test guest info mysql user oracle
- GSSAPI認証を無効にする
- GSSAPI認証情報のキャッシュをユーザログアウト時に自動的に削除しない
- PAMを無効にする
設定ファイル | /etc/ssh/sshd_config |
---|---|
設定内容 | DenyUsers toor administrator administrateur admin adm test guest info mysql user oracle GSSAPIAuthentication yes 削除 GSSAPICleanupCredentials yes 削除 UsePAM yes 削除 |
Postfix
ローカルマシンのみ許可
設定ファイル | /etc/postfix/main.cf |
---|---|
設定内容 | mynetworks_style = host |
X Window system
下記の設定ファイルを使用
設定ファイル | /etc/X11/xorg.conf |
---|---|
設定内容 | # Xorg configuration created by pyxf86config
Section “ServerLayout” Section “InputDevice” Section “InputDevice” Section “Device” Section “Screen” |
GRUB
- OS起動に関する変更
- 起動時にスプラッシュイメージを表示しない
- 起動時にRed Hat Graphical Bootを使用しない
- 起動時にカーネルメッセージを表示する
- 起動時に時刻のずれを修正する
- その他の変更
- カーネルダンプを取得しない
- NOOPスケジューラを使用する
- コンソールがblank状態になるのを抑止する
設定ファイル | /boot/grub/grub.conf |
---|---|
設定内容 | default=0 timeout=5 hiddenmenu title CentOS 6 (2.6.32-642.1.1.el6.x86_64) root (hd0,1) kernel /boot/vmlinuz-2.6.32-642.1.1.el6.x86_64 ro root=UUID=036356a5-dac4-45d8-a834-0ae713570a2d rd_NO_LUKS rd_NO_MD SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=jp106 LANG=C rd_NO_LVM rd_NO_DM consoleblank=0 clock=pit elevator=noop initrd /boot/initramfs-2.6.32-642.1.1.el6.x86_64.img |
AutoFsck
起動時にfsckをおこなう
設定ファイル | /etc/sysconfig/autofsck |
---|---|
設定内容 | AUTOFSCK_DEF_CHECK=yes |
デーモン
自動起動設定(稼働中)のデーモン
デーモン名 | 機能説明 手動の起動、停止方法 |
外部からの 接続ポート |
---|---|---|
acpid | ACPIイベントの監視・処理サービス /etc/init.d/acpid {start|stop|status|restart|condrestart|reload} |
- |
atd | コマンドの遅延実行を有効にするサービス /etc/init.d/atd {start|stop|restart|condrestart|status} |
- |
crond | 定期的にジョブを実行するためのcronサービス /etc/init.d/crond {start|stop|status|reload|restart|condrestart} |
- |
fail2ban | 不正の兆候がある接続を拒否する機能 /etc/init.d/fail2ban {start|stop|reload|restart|status} |
- |
ip6tables | IPv6 のパケットフィルタ機能 /etc/init.d/ip6tables {start|stop|restart|condrestart|status|panic|save} |
- |
iptables | IPv4 のパケットフィルタと NAT を管理するツール /etc/init.d/iptables {start|stop|restart|condrestart|status|panic|save} |
- |
ipset | iptableを拡張し、IPアドレスを集合で扱えるようにする機能 /etc/init.d/ipset {start|stop|status|reload|restart|force-reload|condrestart|try-restart|save} |
- |
irqbalance | マルチプロセッサな環境での IRQ の割り込み処理用のサービス /etc/init.d/irqbalance {start|stop|status|restart|reload|condrestart|force-reload} |
- |
network | ネットワーク・インターフェイスの初期化スクリプト /etc/init.d/network {start|stop|restart|reload|status} |
- |
ntpd | 時刻同期用クライアントサービス /etc/init.d/ntpd {start|stop|restart|condrestart|status} |
- |
ntpdate | 時刻同期サービス /etc/init.d/ntpdate {start|stop|status|restart|force-reload} |
- |
postfix | MTA 機能 /etc/init.d/postfix {start|stop|restart|reload|abort|flush|check|status|condrestart} |
25/smtp |
rsyslog | システムのログを記録 /etc/init.d/sshd {start|stop|restart|reload|condrestart|status} |
- |
sshd | SSH(Secure Shell)サーバサービス /etc/init.d/sshd {start|stop|restart|reload|condrestart|status} |
22/tcp |
sysstat | サーバ監視用ツール /etc/init.d/sysstat {start|stop|status|restart|reload|force-reload|condrestart|try-restart} |
パッケージ
インストール済のパッケージグループ
@ Development Tools @ Japanese Support
インストール済のパッケージ
epel-release fail2ban gdisk libcurl nss ntp tcpdump traceroute yum-plugin-fastestmirror yum-plugin-priorities
除外したパッケージ
microcode_ctl
ソフトウェアリポジトリ
リポジトリ設定ファイル | /etc/yum.repos.d 以下 |
---|
一部省略あり(CentOS Vaultに関する記述を省略しています)。
repo id | repo name | status | リポジトリ設定ファイル |
---|---|---|---|
base | CentOS-6 - Base | enabled | CentOS-Base.repo |
extras | CentOS-6 - Extras | enabled | CentOS-Base.repo |
updates | CentOS-6 - Updates | enabled | CentOS-Base.repo |
C6.x-base | CentOS-6.x - Base | disabled | CentOS-Vault.repo |
C6.x-centosplus | CentOS-6.x - CentOSPlus | disabled | CentOS-Vault.repo |
C6.x-contrib | CentOS-6.x - Contrib | disabled | CentOS-Vault.repo |
C6.x-extras | CentOS-6.x - Extras | disabled | CentOS-Vault.repo |
C6.x-updates | CentOS-6.x - Updates | disabled | CentOS-Vault.repo |
base-debuginfo | CentOS-6 - Debuginfo | disabled | CentOS-Debuginfo.repo |
c6-media | CentOS-6 - Media | disabled | CentOS-Media.repo |
centos-sclo-rh | CentOS-6 - SCLo rh | disabled | CentOS-SCLo-scl-rh.repo |
centos-sclo-rh-debuginfo | CentOS-6 - SCLo rh Debuginfo | disabled | CentOS-SCLo-scl-rh.repo |
centos-sclo-rh-source | CentOS-6 - SCLo rh Sources | disabled | CentOS-SCLo-scl-rh.repo |
centos-sclo-rh-testing | CentOS-6 - SCLo rh Testing | disabled | CentOS-SCLo-scl-rh.repo |
centos-sclo-sclo | CentOS-6 - SCLo sclo | disabled | CentOS-SCLo-scl.repo |
centos-sclo-sclo-testing | CentOS-6 - SCLo sclo Testing | disabled | CentOS-SCLo-scl.repo |
centosplus | CentOS-6 - Plus | disabled | CentOS-Base.repo |
contrib | CentOS-6 - Contrib | disabled | CentOS-Base.repo |
elrepo | ELRepo.org Community Enterprise Linux Repository - el6 | disabled | elrepo.repo |
elrepo-extras | ELRepo.org Community Enterprise Linux Extras Repository - el6 | disabled | elrepo.repo |
elrepo-kernel | ELRepo.org Community Enterprise Linux Kernel Repository - el6 | disabled | elrepo.repo |
elrepo-testing | ELRepo.org Community Enterprise Linux Testing Repository - el6 | disabled | elrepo.repo |
epel | Extra Packages for Enterprise Linux 6 - x86_64 | disabled | epel.repo |
epel-debuginfo | Extra Packages for Enterprise Linux 6 - x86_64 - Debug | disabled | epel.repo |
epel-source | Extra Packages for Enterprise Linux 6 - x86_64 - Source | disabled | epel.repo |
epel-testing | Extra Packages for Enterprise Linux 6 - Testing - x86_64 | disabled | epel-testing.repo |
epel-testing-debuginfo | Extra Packages for Enterprise Linux 6 - Testing - x86_64 - Debug | disabled | epel-testing.repo |
epel-testing-source | Extra Packages for Enterprise Linux 6 - Testing - x86_64 - Source | disabled | epel-testing.repo |
fasttrack | CentOS-6 - fasttrack | disabled | CentOS-fasttrack.repo |
mysql-connectors-community | MySQL Connectors Community | disabled | mysql-community.repo |
mysql-connectors-community-source | MySQL Connectors Community - Source | disabled | mysql-community-source.repo |
mysql-tools-community | MySQL Tools Community | disabled | mysql-community.repo |
mysql-tools-community-source | MySQL Tools Community - Source | disabled | mysql-community-source.repo |
mysql55-community | MySQL 5.5 Community Server | disabled | mysql-community.repo |
mysql55-community-source | MySQL 5.5 Community Server - Source | disabled | mysql-community-source.repo |
mysql56-community | MySQL 5.6 Community Server | disabled | mysql-community.repo |
mysql56-community-source | MySQL 5.6 Community Server - Source | disabled | mysql-community-source.repo |
mysql57-community-dmr | MySQL 5.7 Community Server Development Milestone Release | disabled | mysql-community.repo |
mysql57-community-dmr-source | MySQL 5.7 Community Server Development Milestone Release - Source | disabled | mysql-community-source.repo |
remi | Remi’s RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi.repo |
remi-debuginfo | Remi’s RPM repository for Enterprise Linux 6 - x86_64 - debuginfo | disabled | remi.repo |
remi-php55 | Remi’s PHP 5.5 RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi.repo |
remi-php55-debuginfo | Remi’s PHP 5.5 RPM repository for Enterprise Linux 6 - x86_64 - debuginfo | disabled | remi.repo |
remi-php56 | Remi’s PHP 5.6 RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi.repo |
remi-php56-debuginfo | Remi’s PHP 5.6 RPM repository for Enterprise Linux 6 - x86_64 - debuginfo | disabled | remi.repo |
remi-php70 | Remi’s PHP 7.0 RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi-php70.repo |
remi-php70-debuginfo | Remi’s PHP 7.0 RPM repository for Enterprise Linux 6 - x86_64 - debuginfo | disabled | remi-php70.repo |
remi-php70-test | Remi’s PHP 7.0 test RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi-php70.repo |
remi-php70-test-debuginfo | Remi’s PHP 7.0 test RPM repository for Enterprise Linux 6 - x86_64 - debuginfo | disabled | remi-php70.repo |
remi-safe | Safe Remi’s RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi-safe.repo |
remi-test | Remi’s test RPM repository for Enterprise Linux 6 - x86_64 | disabled | remi.repo |
remi-test-debuginfo | Remi’s test RPM repository for Enterprise Linux 6 - x86_64 - debuginfo | disabled | remi.repo |
repoforge | RepoForge | disabled | repoforge.repo |
rpmfusion-free-updates | RPM Fusion for EL 6 - Free - Updates | disabled | rpmfusion-free-updates.repo |
rpmfusion-free-updates-debuginfo | RPM Fusion for EL 6 - Free - Updates Debug | disabled | rpmfusion-free-updates.repo |
rpmfusion-free-updates-source | RPM Fusion for EL 6 - Free - Updates Source | disabled | rpmfusion-free-updates.repo |
rpmfusion-free-updates-testing | RPM Fusion for EL 6 - Free - Test Updates | disabled | rpmfusion-free-updates-testing.repo |
rpmfusion-free-updates-testing-debuginfo | RPM Fusion for EL 6 - Free - Test Updates Debug | disabled | rpmfusion-free-updates-testing.repo |
rpmfusion-free-updates-testing-source | RPM Fusion for EL 6 - Free - Test Updates Source | disabled | rpmfusion-free-updates-testing.repo |
rpmfusion-nonfree-updates | RPM Fusion for EL 6 - Nonfree - Updates | disabled | rpmfusion-nonfree-updates.repo |
rpmfusion-nonfree-updates-debuginfo | RPM Fusion for EL 6 - Nonfree - Updates Debug | disabled | rpmfusion-nonfree-updates.repo |
rpmfusion-nonfree-updates-source | RPM Fusion for EL 6 - Nonfree - Updates Source | disabled | rpmfusion-nonfree-updates.repo |
rpmfusion-nonfree-updates-testing | RPM Fusion for EL 6 - Nonfree - Test Updates | disabled | rpmfusion-nonfree-updates-testing.repo |
rpmfusion-nonfree-updates-testing-debuginfo | RPM Fusion for EL 6 - Nonfree - Test Updates Debug | disabled | rpmfusion-nonfree-updates-testing.repo |
rpmfusion-nonfree-updates-testing-source | RPM Fusion for EL 6 - Nonfree - Test Updates Source | disabled | rpmfusion-nonfree-updates-testing.repo |
CentOS-Base.repo内のbaseurlを下記の通り変更
repo id | baseurl |
---|---|
base | http://ftp.sakura.ad.jp/pub/linux/centos/$releasever/os/$basearch/ |
updates | http://ftp.sakura.ad.jp/pub/linux/centos/$releasever/updates/$basearch/ |
extras | http://ftp.sakura.ad.jp/pub/linux/centos/$releasever/extras/$basearch/ |
centosplus | http://ftp.sakura.ad.jp/pub/linux/centos/$releasever/centosplus/$basearch/ |
contrib | http://ftp.sakura.ad.jp/pub/linux/centos/$releasever/contrib/$basearch/ |