WAMP構築

Windows とのデュアルブート環境に戻すために Windows の再セットアップ。
その後悩んだが一先ず LAMP ではなく WAMP 環境を作ることにしたのでメモ。

MySQL

http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67-win32.zip/from/pick からクライアントをダウンロードする。バージョンは 5.0.67 にした。
セットアップ手順は以下。

セットアップタイプ
Custom
インストール先
D:\MySQL
configure the MySQL server
チェックを入れる
  • standard Configuration
  • install As Windows Service
  • modify Security Setting のチェックを外す。
my.ini 編集
58行目 default-character-set=latin1
> default-character-set=utf8
83行目 default-character-set=latin1
> default-character-set=utf8

※この二つは日本語などで化けた場合には以前のように cp932 に変えてやる。

保存したら 管理ツール - サービス から MySQL を再起動する。

Apache

http://www.apache.jp/misc/download.html から手順に沿ってクライアントをダウンロードする。バージョンは 2.2 にした。ファイル名は (apache_2.2.9-win32-x86-no_ssl-r2.msi)
セットアップ手順は以下。

Network Domain (e.g. somenet.com)
hoge.orz (ローカルホストなので適当に)
Server Name (e.g. www.somenet.com)
localhost
Administrator's Email Address (e.g. webmaster@somenet.com)
admin@hoge.orz (適当)
Install Apache HTTP Server 2.2 programs and shortcuts for
for All Users, on Port 80, as a Service --Recommended.
Setup Type
Custom
インストール場所
D:\Apache2.2

セットアップが終了すると Apache が立ち上がるが、Port80 をすでに他のアプリケーションで使用していたため?にステータスが正常ではなかったので PC をリブートした。その後は問題なし。

PHP

http://www.php.net/get/php-5.2.6-Win32.zip/from/a/mirror からクライアントをダウンロードする。バージョンは 5.2.6 にした。
セットアップ手順は以下。

  • 展開したファイルをすべて任意の場所 (D:\php) に移動する。
  • D:\php\php5ts.dll を C:\WINDOWS\system32\ へコピー。
  • D:\php\libmysql.dll を C:\WINDOWS\system32\ へコピー。
  • D:\php\php.ini-dist を C:\WINDOWS\ へコピーして php.ini にリネーム。

httpd.conf, php.ini 編集

php.ini
492行目 doc_root =
> doc_root = "D:/www"
499行目 extension_dir = "./"
> extension_dir = "D:/php/ext"
642行目 ;extension=php_mbstring.dll
> extension=php_mbstring.dll (コメントアウトを外す)
649行目 ;extension=php_mysql.dll
> extension=php_mysql.dll (コメントアウトを外す)
1222行目 ;mbstring.language = Japanese
> mbstring.language = Japanese (コメントアウトを外す)
1227行目 ;mbstring.internal_encoding = EUC-JP
> mbstring.internal_encoding = UTF-8
1230行目 ;mbstring.http_input = auto
> mbstring.http_input = auto (コメントアウトを外す)
1234行目 ;mbstring.http_output = SJIS
> mbstring.http_output = UTF-8
1241行目 ;mbstring.encoding_translation = Off
> mbstring.encoding_translation = On
1245行目 ;mbstring.detect_order = auto
> mbstring.detect_order = auto (コメントアウトを外す)
1249行目 ;mbstring.substitute_character = none;
> mbstring.substitute_character = none; (コメントアウトを外す)

httpd.conf

127行目
LoadModule php5_module D:/php/php5apache2_2.dll (追記)
178行目 DocumentRoot "D:/Apache2.2/htdocs"
> DocumentRoot "D:/www"
205行目
>
239〜243行目
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

を、以下に変更

<IfModule dir_module>
    DirectoryIndex index.html
    DirectoryIndex index.htm
    DirectoryIndex index.php
</IfModule>
385行目〜
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

を、以下に変更

    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

すべて終了したら PC をリブート。

動作確認

http://localhost/ にアクセスして Apache の動作確認。

<?php phpinfo();?>

test.php などに保存して http://localhost/test.phpPHP の情報を確認。

MySQL CommandLine Client を開き

mysql> select version();

MySQL のバージョン情報などを確認。

Update

clamav
anti-virus utility for Unix - command-line interface (873 KB)
clamav-base
anti-virus utility for Unix - base package (12.0 MB)
clamav-freshclam
anti-virus utility for Unix - virus database update utility (212 KB)
libclamav3
anti-virus utility for Unix - library (433 KB)

Update

alacarte
easy GNOME menu editing tool (71 KB)
base-files
Debian base system miscellaneous files (58 KB)
dbus
simple interprocess messaging system (274 KB)
dbus-x11
simple interprocess messaging system (X11 deps) (41 KB)
foo2zjs
Support for printing to ZjStream-based printers (1.0 KB)
libdbus-1-3
simple interprocess messaging system (121 KB)
libsmbclient
shared library that allows applications to talk to SMB/CIFS servers (866 KB)
module-init-tools
tools for managing Linux kernel modules (70 KB)
samba-common
Samba common files used by both the server and the client (2.0 MB)
smbclient
a LanManager-like simple client for Unix (4.0 MB)
update-notifier
Daemon which notifies about package updates (56 KB)
update-notifier-common
Files shared between update-notifier and adept (13 KB)
winbind
service to resolve user and group information from Windows NT servers (2.0 MB)