Date post: | 30-Jun-2015 |
Category: |
Documents |
Upload: | tsuyoshi-yamada |
View: | 1,605 times |
Download: | 4 times |
"Bits from the Apache Maintainers / Upcoming apache2 2.4 transition"
を読んでみた
2012.04.21 webサーバ勉強会やまだつよし (@minimum2scp)
自己紹介
やまだつよし● twitter: @minimum2scp● サーバーエンジニア● Debian,Rubyとかが好き
お題: debianのapache2パッケージ
debianにおけるapache2パッケージのお話し
debian-devel-announceメーリングリストの
"Bits from the Apache Maintainers / Upcoming apache2 2.4 transition"
を読んでみた(google翻訳に頼りつつ、途中まで)
debianのapache2パッケージ情報
http://packages.qa.debian.org/a/apache2.html
apache2パッケージのバージョン
debianのバージョン Apacheのバージョン
old-stable lenny (5.0.x) 2.2.9
stable squeeze (6.0.x) 2.2.16
testing wheezy 2.2.22
unstable sid 2.2.22
experimental 2.4.2
experimental には既に Apache 2.4.2 が来ている!
https://lists.debian.org/debian-devel-announce/2012/03/msg00013.html
"Bits from the Apache M..."In this update:- New Apache HTTPD 2.4 available in experimental <HTTPD24>- Package Transition <TRANSITION>- Packaging Guidelines <GUIDELINES>- Call For Help <HELP> ● 新しいApache HTTPD 2.4 が experimental で使えるよ● パッケージの移行● パッケージングガイドライン● ヘルプ!
重大な変更点: MPM
● MPMは設定により選択できる
○ prefork, worker, event, itkの4つ(apache2-binパッケージで提供)
○ デフォルトではevent
○ 変更は a2dismod mpm_event; a2enmod mpm_worker
● MPM同士は衝突
○ <2.4: パッケージの依存関係 apache2-mpm-worker, apache2-mpm-prefork のようにMPMごとにパッケージが分かれていて、お互い衝突するようになっていた
○ >=2.4: 設定ファイルのコメントを参照している # Conflicts: mpm_worker mpm_prefork mpm_itk
/etc/apache2/|-- apache2.conf| `-- ports.conf|-- mods-enabled/| |-- *.load| `-- *.conf|-- conf-enabled/| `-- *.conf`-- sites-enabled/ `-- *.conf
debianのapache2の設定ファイル
(new)
-- メイン(他の全てをinclude)
-- ポートの設定
-- モジュールのロード
-- モジュールの設定
--グローバルな設定スニペット
-- VirtualHostの設定
新しいコマンド
● /usr/sbin/a2enconf○ conf-available/foo.conf を conf-enabled/foo.conf へ
symlink
● /usr/sbin/a2disconf ○ conf-enabled/foo.conf を rm
a2enmod, a2dismod コマンドと mods-enabled, mods-available ディレクトリやa2ensite, a2dissite コマンドと sites-enabled, sites-available ディレクトリと同じ構造になった
新しいコマンド
● /usr/sbin/a2query○ 現在のMPMや現在有効になっている設定、モジュル、バーチャルホストな
どを問い合わせるヘルパースクリプト
Usage: /usr/sbin/a2query -m [MODULE] -s [SITE] -c [CONF] -a -v -M -d -h -m [MODULE] checks whether the module MODULE is enabled, lists all enabled modules if no argument was given-s [SITE] checks whether the site SITE is enabled, lists all sites if no argument was given-c [CONF] checks whether the configuration CONF is enabled, lists all configurations if no argument was given-a returns the current Apache 2 module magic version-v returns the current Apache 2 version-M returns the enabled Apache 2 MPM-d returns the Apache 2 module directory-h display this help
Apache2.4を入れてみる
(debian sidに、experimentalのapt-line追加して)
% sudo apt-get install apache2 \ -t experimental% dpkg -L apache2 | grep bin/% dpkg -L apache2-bin | grep mpm% (. /etc/apache2/envvars; \ apache2 -v; apache2 -V apache2 -l; apache2 -M)% a2query
まとめ(じゃなくて力尽きただけ…)
● MPM別のパッケージはなくなった
○ eventがデフォルト, worker,prefork,itkもインストールされる
○ MPM同士の衝突の仕組みは設定ファイルのコメントを見てる
● /etc/apache2/conf.d -> conf-availabe, conf-enabled○ 新コマンドa2enconf, a2disconf追加されsites-,mods-と同じになった
○ conf.dに設定をインストールするパッケージのメンテナは対応が必要
● その他時間切れ...(次回?)
○ ABI変更→apacheモジュールパッケージのメンテナは対応が必要
○ http://wiki.debian.org/Apache2Transition
○ http://wiki.debian.org/Apache/PackagingFor24
○ README.Debian.gz, NEWS.Debian.gz, changelog.Debian.gz