XAMPPを30MBまで削ってみるテスト(更新)
はじめに
古い記事: XAMPPを30MBまで削ってみるテスト
変更内容
- apacheモジュールをhttpd.confから検索し,必要なモジュールを残すようにする。
- phpのモジュールをphp.iniから検索し,必要なモジュールを残すようにする。
- バージョンアップしたときに対応しやすいように,バッチファイルの最後の部分にファイルのコピー,削除,フォルダの削除の3つの処理を記述するように変更。
- apacheバイナリを前よりも削除。動かないケースが現れるかも。
php関連の設定ファイルを残すように変更。
50MB版を無くした。
ダウンロード
削除バッチファイル
@echo off
::xampplite-win32-1.6.6.exe 用
:: 2008-02-18
call :copyfile
call :selection_modules
call :selection_phpdll
call :delfile
call :rmdir
xcopy .\copy\*.* .\ /S /Y
rmdir .\copy /Q /S
del .\*.txt
goto :EOF
::------------------------------------------------
:: copy file
::------------------------------------------------
:copyfile
findstr /R /C:"^C" %~dpf0 > tmp.txt
for /F "tokens=2* " %%i in (tmp.txt) do call :copy %%i
del tmp.txt
goto :EOF
:copy
set d=%~p1
set d=%d:~10,99%
xcopy /S /Y %1 .\copy\%d%
goto :EOF
::------------------------------------------------
:: rmdir
::------------------------------------------------
:rmdir
findstr /R /C:"^R" %~dpf0 > tmp.txt
for /F "tokens=2* " %%i in (tmp.txt) do rmdir %%i /Q /S
del tmp.txt
goto :EOF
::------------------------------------------------
:: delfile
::------------------------------------------------
:delfile
findstr /R /C:"^D" %~dpf0 > tmp.txt
for /F "tokens=2* " %%i in (tmp.txt) do del %%i /Q
del tmp.txt
goto :EOF
::------------------------------------------------
:: PHP DLL
::------------------------------------------------
:selection_phpdll
md phpdll
findstr /R /C:"^extension=" .\apache\bin\php.ini >tmp.txt
FOR /F "tokens=2* delims==" %%i in (tmp.txt) do call :copyphpdll %%i
rmdir php /Q /S
xcopy .\phpdll .\php\ext\
rmdir .\phpdll /Q /S
del tmp.txt
goto :EOF
:copyphpdll
set f=%1
echo %f%
copy .\php\ext\%f% .\phpdll
goto :EOF
::------------------------------------------------
:: apache modules
::------------------------------------------------
:selection_modules
md modules
findstr /R /C:"^LoadModule" .\apache\conf\httpd.conf >tmp.txt
FOR /F "tokens=3* " %%i in (tmp.txt) do call :copymodule %%i
rmdir .\apache\modules /Q /S
xcopy .\modules .\apache\modules\
rmdir .\modules /Q /S
del tmp.txt
goto :EOF
:copymodule
set f=%1
set f=%f:~8,99%
echo %f%
copy .\apache\modules\%f% .\modules
goto :EOF
::------------------------------------------------------------------------------
:: DATA
::------------------------------------------------------------------------------
::---------------------
:: php
::---------------------
C .\php\extras\magic.mime
C .\php\browscap\browscap.ini
:C .\php\pear\*.*
::---------------------
:: apache
::---------------------
D .\apache\*.bat
R .\apache\icons
R .\apache\bin\
C .\apache\bin\apache.exe
C .\apache\bin\libapr-1.dll
C .\apache\bin\libapriconv-1.dll
C .\apache\bin\libaprutil-1.dll
C .\apache\bin\libeay32.dll
C .\apache\bin\libhttpd.dll
C .\apache\bin\libmysql.dll
C .\apache\bin\msql.dll
C .\apache\bin\ntwdblib.dll
C .\apache\bin\php.ini
C .\apache\bin\php5apache2.dll
C .\apache\bin\php5ts.dll
C .\apache\bin\pv.exe
C .\apache\bin\ssleay32.dll
C .\apache\bin\zlib1.dll
::---------------------
:: htdocs
::---------------------
R .\htdocs\forbidden
R .\htdocs\restricted
R .\htdocs\xampp
D .\htdocs\apache_pb2.gif
D .\htdocs\apache_pb2.png
D .\htdocs\apache_pb2_ani.gif
D .\htdocs\apache_pb.gif
D .\htdocs\apache_pb.png
D .\htdocs\favicon.ico
D .\htdocs\index.html
D .\htdocs\index.php
::---------------------
:: MySQL
::---------------------
R .\mysql\bin\
C .\mysql\bin\my.cnf .\bin
C .\mysql\bin\libmysql.dll .\bin
C .\mysql\bin\mysql.exe .\bin
C .\mysql\bin\mysqladmin.exe .\bin
C .\mysql\bin\mysqld.exe .\bin
R .\mysql\share\ukrainian
R .\mysql\share\swedish
R .\mysql\share\spanish
R .\mysql\share\slovak
R .\mysql\share\serbian
R .\mysql\share\russian
R .\mysql\share\romanian
R .\mysql\share\portuguese
R .\mysql\share\polish
R .\mysql\share\norwegian-ny
R .\mysql\share\norwegian
R .\mysql\share\korean
R .\mysql\share\japanese-sjis
R .\mysql\share\japanese
R .\mysql\share\italian
R .\mysql\share\hungarian
R .\mysql\share\greek
R .\mysql\share\german
R .\mysql\share\french
R .\mysql\share\estonian
R .\mysql\share\dutch
R .\mysql\share\danish
R .\mysql\share\czech
R .\mysql\share\charsets
R .\mysql\backup\
D .\mysql\share\Makefile.am
D .\mysql\share\.cvsignore
D .\mysql\share\Makefile.in
D .\mysql\share\fill_help_tables.sql
D .\mysql\share\mysql_fix_privilege_tables.sql
D .\mysql\share\mysql_system_tables.sql
D .\mysql\share\mysql_system_tables_data.sql
D .\mysql\share\mysql_system_tables_fix.sql
D .\mysql\share\mysql_test_data_timezone.sql
R .\mysql\data\cdcol
R .\mysql\data\phpmyadmin
R .\mysql\data\test
R .\mysql\data\webauth
D .\mysql\*.bat
::---------------------
:: root
::---------------------
D .\*.exe
D setup_xampp.bat
D makecert.bat
R .\install /Q /S
R .\licenses
R .\perl
R .\security
R .\sendmail
R .\webalizer
R .\webdav
::---------------------
::: phpMyAdmin
::---------------------
C .\phpMyAdmin\lang\japanese-utf-8.inc.php
D .\phpMyAdmin\lang\*.*
R .\phpMyAdmin\themes\darkblue_orange
R .\phpMyAdmin\test
phpMyAdminにアクセスするには
http://localhost/phpmyadmin/