- 2008 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2007 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2006 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2005 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2004 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2003 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2006-02-28 Tue
blog.xight.org
- Summary
生まれてから今日で10000日目.[2005-03-10-4]
新しいことを始めるには良い機会なので,blogを始めてみます.
- Reference
blog.xight.org
http://blog.xight.org/
blog.xight.org - Atom Feed
http://blog.xight.org/atom.xml
mod_cache + mod_disk_cache を利用した apache2 のパフォーマンス改善とその効果
- /etc/apache2/mods-available/disk_cache.conf
<IfModule mod_cache.c> <IfModule mod_disk_cache.c> CacheRoot "/var/cache/apache2/disk_cache" CacheSize 524288 CacheEnable disk / CacheDirLevels 4 CacheDirLength 5 </IfModule> </IfModule>
- cache 用ディレクトリの作成
# mkdir /var/cache/apache2/disk_cache
- mod_cache と mod_disk_cache の有効化
# a2enmod cache
# a2enmod disk_cache
# apache2ctl configtest
# apache2ctl restart
- mod_cache + mod_disk_cache 使用前後のベンチマーク比較 (ApacheBench を利用)
mod_cache + mod_disk_cache 使用前 (HTMLへのアクセス)
% ab -n 100 -c 10 http://xight.org/test/static
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.4502 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking xight.org (be patient).....done
Server Software: Apache
Server Hostname: xight.org
Server Port: 80
Document Path: /test/static
Document Length: 119 bytes
Concurrency Level: 10
Time taken for tests: 104.65314 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 43800 bytes
HTML transferred: 11900 bytes
Requests per second: 0.96 [#/sec] (mean)
Time per request: 10406.532 [ms] (mean)
Time per request: 1040.653 [ms] (mean, across all concurrent requests)
Transfer rate: 0.40 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 11 1039 2724.4 30 21007
Processing: 46 9083 8619.9 6165 30877
Waiting: 38 5708 7523.9 3087 27202
Total: 116 10122 9075.1 6263 30907
Percentage of the requests served within a certain time (ms)
50% 6263
66% 12234
75% 15935
80% 18918
90% 27164
95% 27222
98% 30892
99% 30907
100% 30907 (longest request)
mod_cache + mod_disk_cache 使用後 (HTMLへのアクセス)
% ab -n 100 -c 10 http://xight.org/test/static
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.4502 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking xight.org (be patient).....done
Server Software: Apache
Server Hostname: xight.org
Server Port: 80
Document Path: /test/static
Document Length: 119 bytes
Concurrency Level: 10
Time taken for tests: 2.551448 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 43800 bytes
HTML transferred: 11900 bytes
Requests per second: 39.19 [#/sec] (mean)
Time per request: 255.145 [ms] (mean)
Time per request: 25.514 [ms] (mean, across all concurrent requests)
Transfer rate: 16.46 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 11 24 8.9 26 42
Processing: 36 218 43.8 230 266
Waiting: 28 130 65.2 128 266
Total: 52 243 44.8 255 295
Percentage of the requests served within a certain time (ms)
50% 255
66% 261
75% 265
80% 267
90% 277
95% 284
98% 293
99% 295
100% 295 (longest request)
mod_cache + mod_disk_cache 使用前 (PHPへのアクセス)
% ab -n 100 -c 10 http://xight.org/test/dynamic
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.4502 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking xight.org (be patient).....done
Server Software: Apache
Server Hostname: xight.org
Server Port: 80
Document Path: /test/dynamic
Document Length: 1011 bytes
Concurrency Level: 10
Time taken for tests: 122.299908 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 125500 bytes
HTML transferred: 101100 bytes
Requests per second: 0.82 [#/sec] (mean)
Time per request: 12229.991 [ms] (mean)
Time per request: 1222.999 [ms] (mean, across all concurrent requests)
Transfer rate: 1.00 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 15 1222 3040.3 24 21007
Processing: 36 10810 9137.5 9190 36141
Waiting: 33 5607 5397.5 3218 21047
Total: 56 12032 9438.8 9487 36160
Percentage of the requests served within a certain time (ms)
50% 9487
66% 15184
75% 18169
80% 18399
90% 24175
95% 36120
98% 36160
99% 36160
100% 36160 (longest request)
mod_cache + mod_disk_cache 使用後 (PHPへのアクセス)
% ab -n 100 -c 10 http://xight.org/test/dynamic
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.4502 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking xight.org (be patient).....done
Server Software: Apache
Server Hostname: xight.org
Server Port: 80
Document Path: /test/dynamic
Document Length: 1011 bytes
Concurrency Level: 10
Time taken for tests: 6.392257 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 125500 bytes
HTML transferred: 101100 bytes
Requests per second: 15.64 [#/sec] (mean)
Time per request: 639.226 [ms] (mean)
Time per request: 63.923 [ms] (mean, across all concurrent requests)
Transfer rate: 19.09 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 16 59 297.9 27 3007
Processing: 114 266 59.1 266 492
Waiting: 68 230 72.4 222 388
Total: 168 326 308.0 295 3317
Percentage of the requests served within a certain time (ms)
50% 295
66% 311
75% 337
80% 347
90% 386
95% 416
98% 524
99% 3317
100% 3317 (longest request)
効果覿面!
- 注意
CacheDirLevels * CacheDirLength <= 20 で無いとエラーが発生する.
Syntax error on line XXX of /etc/apache2/mods-enabled/disk_cache.conf:
CacheDirLevels*CacheDirLength value must not be higher than 20
しばらく動作させると以下のエラーが発生し,閲覧が不可能になる場合がある.
apache を再起動するとおさまるように見えるが,原因不明.
[Wed Mar 01 08:06:10 2006] [error] [client XXX.XXX.XXX.XXX] Directory index forbidden by rule: /path/to/public_html/foo/
- Reference
Apache HTTP サーバ - mod_cache
http://httpd.apache.org/docs/2.2/ja/mod/mod_cache.html
Apache HTTP サーバ - mod_mem_cache
http://httpd.apache.org/docs/2.2/ja/mod/mod_mem_cache.html
Apache HTTP サーバ - mod_disk_cache
http://httpd.apache.org/docs/2.2/ja/mod/mod_disk_cache.html
j-lab - ApacheConf2
http://ns.jk.to/zwiki/ApacheConf2
PHP Screw - PHPスクリプトの暗号化
- Reference
SourceForge.net: PHP Screw
http://sourceforge.net/projects/php-screw/
ThePM9.com - IT SOLUTIONS - PHP Extension Module
http://www.pm9.com/newpm9/itbiz/php/phpscrew/
- via
MOONGIFT - PHP Screw
http://oss.moongift.jp/intro/i-1177.html
MOONGIFT - PHP Screw レビュー
http://oss.moongift.jp/review/i-1180.html
Easy Setup for VALUE DOMAIN Users - VALUE DOMAIN ユーザのための簡単設定マニュアルと FAQ
- Reference
Easy Setup for VALUE DOMAIN Users
http://setup.value-domain.com/
XP-Weather - 天気予報を表示するモジュール
- Reference
お天気ガイド-XOOPSマニア
http://hypweb.net/xoops/modules/XP-Weather/
XP-Weather 1.3(J2.x)更新記-XP-Weather_1.3(J2.x)-Wiki [自由帳]-XOOPSマニア
http://hypweb.net/xoops/modules/pukiwiki/81.html
XOOPS Cube のインストール
- 前提
http://example.com/xoops/ に XOOPS Cube をインストールしたい.
DocumentRoot は /var/www
- ファイルを展開して /var/www/xoops にコピー
% tar xzvf xoops-2.0.13a-JP.tar.gz
# xoops-2.0.13a-JP /var/www/xoops
- 所有者の設定
% cd /var/www/xoops
# chown -R www-data:www-data *
- ファイルの移動
# mv /var/www/xoops/html/* /var/www/xoops
- XOOPS用のDBとユーザを作成
% mysqladmin -uroot create xoops
% mysql -uroot mysql
mysql> GRANT ALL PRIVILEGES ON xoops.* TO xoops@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> quit
% mysqladmin -uroot reload
- インストール ウィザードページへのアクセス
http://example.com/xoops/ へアクセスすると…
http://example.com/xoops/install/index.php に自動リダイレクト.
- インストール ウィザード トップページ

- インストール ウィザード イントロダクション

- ファイルのアクセス権のチェック

- データベース,およびパス・URLの設定

- データベース,およびパス・URLの設定の内容確認

- mainfile.php の作成

- パス・URLのチェック

- データベース設定の確認

- データベースをチェック
以下のエラーが出た場合は 「データベース,およびパス・URLの設定」まで戻って設定をやり直し.

正常に処理された場合は以下の表示

- テーブルの作成

- 管理者ユーザの作成

- データの生成

- インストール完了
"サイト" をクリックすると XOOPS の画面が表示される.

- インストール後,初めて管理者メニューを開くと,以下のような警告が出る.

# rm -rf /var/www/xoops/install
# chmod 644 /var/www/xoops/mainfile.php
MovableType のインストール
- 前提
http://example.com/blog/ に MovableType をインストールしたい.
DocumentRoot は /var/www
- ファイルを展開して /var/www/blog にコピー
% tar xzvf MT-3_2-ja-2.tar.gz
% cp -rf MT-3.2-ja-2 /var/www/blog
- パーミッションと所有者の設定
% cd /var/www/blog
# chown -R www-data:www-data *
# chmod -R 755 *.cgi
- mt-config.cgi を作成
# cp mt-config.cgi-original mt-config.cgi
- mt-config.cgi の設定
# Path setting CGIPath http://example.com/blog/ StaticWebPath http://example.com/blog/mt-static HelpURL http://example.com/blog/mt-static/docs/ # DB Setting ObjectDriver DBI::mysql Database mt DBUser mt DBPassword password DBHost localhost EmailAddressMain admin@example.com
- MovableType用のDBとユーザを作成
% mysqladmin -uroot create mt
% mysql -uroot mysql
mysql> GRANT ALL PRIVILEGES ON mt.* TO mt@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> quit
% mysqladmin -uroot reload
- apacheの設定
/etc/apache/conf.d/mt.conf
<Directory /var/www/blog>
Options +ExecCGI
</Directory># apachectl restart
- MovableType のインストール
http://example.com/blog/ からインストールを行う.



500 Internal Server Error が発生したら,パーミッション,mt-config.cgiのDB設定部分を確認.
- インストールのチェック
足りないモジュールなどが表示される.
http://example.com/blog/mt-check.cgi

- オプションのモジュールを追加
Image::Magick
# aptitude install perlmagick
Crypt::DSA
# cpan install Crypt::DSA
XML::Atom
# aptitude install libxml-atom-perl
- 初期ログイン名とパスワードでログイン
| ログイン名 | Melody |
| パスワード | Nelson |

- Reference
Movable Typeユーザー・マニュアル: Movable Typeの新規インストール
http://www.sixapart.jp/movabletype/manual/mtmanual_install.html
Movable Typeユーザー・マニュアル: Movable Typeへのログイン/ログアウト
http://www.sixapart.jp/movabletype/manual/mtmanual_login.html
Crypt::DSA
Image::Magick
XML::Atom
Debian パッケージディレクトリ検索 (バイナリ) - perlmagick
Debian パッケージディレクトリ検索 (バイナリ) - libxml-atom-perl
- 2008 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2007 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2006 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2005 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2004 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2003 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2002 : 01 02 03 04 05 06 07 08 09 10 11 12