CentOS7.0 / RHEL7.0 update
Kazumi HIROSE
廣瀬 一海
アイレット株式会社
クラウドパック事業部研究開発チーム
シニアソリューションアーキテクト
Microsoft MVP for Microsoft Azure
注意事項
 このドキュメントについて
2
1 CentOS/RHEL過去のバージョンの経験者
今回は変更差分のみをご紹介します。
2 サーバ管理者を対象に絞っています
サーバ管理者が使いそうなポイントのみに絞ります。
3 いくつか機能解説に関して割愛しています
journald / OpenLMI / UEFI SecureBoot /
KVM / Hyper-V
気になる方は個別にて対応いたします。
アジェンダ
 インストールまでの変更点
 TOPIC iproute2
 TOPIC Systemd
 TOPIC Firewallld
アーキティクチャおよび制限
 64bit ハードウェアのみのサポート
 最大論理コア数が4096->5120コアへ(物
理160コア)
 ファイルシステム制限変更
– Ext4 16TB -> 50TB
– XFS 100TB -> 500TB
4
非推奨となった機能と対象
 Ext2/Ext3ファイルシステム -> Ext4後方互
換維持
 Sendmail -> Postfix
 Lvm1 -> Lvm2
 system-config-***** ->systemadm
– chkconfigからsystemctlへ
 prelinkはデフォルト非搭載
5
インストールと起動
 GRUB2 64bitカーネルブート
 デフォルトファイルシステムがXFSへ変更
 稼働Kernelにホットパッチを行うkpatch導
入(Experimental)
6
主要ミドルウェアの変更
 Apache 2.4
– mod_perlの廃止 / mod_proxyによるFastCGIサ
ポート (以前はmod_fastcgi or mod_fcgid)
 MariaDB 5.5
– MySQL互換実装 / MySQLのオリジナルコード
の作者Michael “Monty” Wideniusにより、派生
させたプロジェクト
7
NETTOOLS TO IPROUTE2
net-toolsからiproute2へ
8
iproute2
 デフォルトがiproute2になりました
– ifconfigなどは非デフォルト/ 非推奨
(deplicated)
– 最小構成ではiproute2のみ
 yum install net-toolsにより、当面の間は
使えます。
9
net-tools / iproute2
net-tools
 ifconfig
 route
 netstat
 netstat -na
 netstat –I
 arp
iproute2
 ip a / ip l
 ip r
 ss
 ss -na
 ip –s l
 ip n
10
SYSTEMD
サービス依存性解決や並列起動による高速化、処理細分化による
動的ローディング
11
systemd
 サービス、デバイス初期化等の一元管理
– ファイルシステムのマウント
– サービス起動、終了
– システム全体の起動終了
– ログインセッション管理
12
systemdのメリット
 サービスに順序関係を設定可能に
 イベントに対して、オンデマンドでサービ
スの起動が可能に(D-Bus CallやDevice接続
など)
– USB Hot plugなど
Device Driver Load / FS Driver load / mount
 スクリプトの不慮による、起動障害などの
発生が発生しにくくなる
13
手っ取り早く使いたい人へ
 serviceコマンド/chkconfigコマンドに、リダイレクト
が用意されています、systemd非対応の場合でも、
/etc/init.d以下のスクリプトを参照して起動してくれま
す。
 # service httpd start/stop/restart/status
– Redirecting to /bin/systemctl httpd.service
 # chkconfig httpd on
– Note: Forwarding request to 'systemctl enable httpd.service‘
 コマンドの後方互換性があります
– chkconfig/service/halt/init/poweroff/reboot/runlevel/shutdo
wn/telinit
14
起動、終了、再起動、ステータス、一覧、
自動起動
Sysvinit
 /etc/init.d/httpd start
 /etc/init.d/httpd restart
 /etc/init.d/httpd stop
 /etc/init.d/httpd status
 /etc/init.d/httpd reload
 chkconfig –list
 chkconfig httpd on
 chkconfig httpd off
Systemd
 systemctl start httpd.service
 systemctl restart httpd.service
 systemctl stop httpd.service
 systemctl status httpd.service
 systemctl reload httpd.service
 systemctl list-unit-files -t
service
 systemctl enable httpd.service
 systemctl disable httpd.service
15reloadは設定ファイルに定義がある場合のみ
注意点
 標準外のオプションは廃止
– service postgresql initdbなど、postgresql-
setup initdbなど代替コマンドが提供されてい
ます。
16
知っておくと便利
Systemd
 systemctl mask httpd.service
– ユニットの無効化(手動起動無効)
 systemctl unmask httpd.service
– ユニットの有効化
17
FIREWALLD
IPTABLESによるファイアウォールを論理抽象化管理へ
18
firewalldのメリット
 他のアプリケーションからFirewallのルール
を動的にコントロール
• iptables-save/iptables-loadは、要件が合わず、動的な
Firewallルールの変更ができない
 NIC毎にFirewallのセッティングが可能になっ
た
 チェインフィルタベースでは無く、ゾーン
ベースで設定が可能になった
– Windows Firewall with Advanced Securityと考え方
は同じ
 XMLフォーマットで記述
19
手っ取り早く使いたい人へ
Firewalld
#systemctl stop iptables.service
#systemctl stop ip6tables.service
#systemctl stop ebtables.service
#systemctl mask iptables.service
#systemctl mask ip6tables.service
#systemctl mask ebtables.service
# yum install firewalld
#systemctl enable firewalld.service
#systemctl start firewalld.service
20
コマンド例
Firewalld
 全てのゾーン一覧
– #firewall-cmd --list-all-zones
 eth1をpublic zoneに登録
– #firewall-cmd --permanent --zone=public --add-interface=eth1
 public zoneにhttpを登録
– #firewall-cmd --zone=public --add-service=http --permanent
– (othercase)#firewall-cmd --zone=external --add-port=80/tcp --permanent
 ゾーンに登録されているサービスの表示
– #firewall-cmd --zone=public -list-services
ssh http
21
設定など
Firewalld
 /etc/firewalld/zones/public.xmlに保存(優先)
– /usr/lib/firewalld/以下にデフォルトファイルを保持しているので、
参考にしながらが一番作業を行いやすいです。
 起動時にInterfaceにゾーンを適用
#cat /etc/sysconfig/network-scripts/ifcfg-eth1
TYPE=Ethernet
・・・
ZONE=public
22
ご清聴ありがとうございました
23
hirose@cloudpack.jpMAIL
https://www.facebook.com/deployprinceFACEBOOK
COMMENT 本日の内容に関して、不明な点などありま
したら、メール、SNS等でもお気軽に
ご相談ください。

Cent OS7 and RHELl7 update