自分用メモ。
●PHP5.3とWinCacheのインストール (要Full IIS)
@echo off sc config wuauserv start= demand md appdata cd appdata cd .. reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d "%~dp0appdata" /f webpicmdline /Products: PHP53 /AcceptEula webpicmdline /Products: wincache53 /AcceptEula reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d %%USERPROFILE%%\AppData\Local /f xcopy php.ini "%programfiles(x86)%"\php\v5.3 /Y xcopy php_memcache.dll "%programfiles(x86)%"\php\v5.3\ext /Y net start w3svc
●アプリケーションプールのアイドルタイムアウトをゼロにする (要Full IIS)
@echo off %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
●IISが特定のIPアドレスからの接続だけアクセス許可するように制限を付ける (要Full IIS)
@echo off start /w pkgmgr /iu:IIS-IPSecurity %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/ipSecurity /allowUnlisted:True /commit:apphost %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/ipSecurity /+"[ipAddress='192.168.96.0',subnetMask='255.255.255.0',allowed='True']" /commit:apphost
●ファイル共有用にWindowsファイアウォールの設定を変更し、共有フォルダを作成する
@echo off netsh firewall set service type=fileandprint mode=enable profile=Current address=10.0.0.0/8 scope=custom net share appdata=%RoleRoot%\ /GRANT:yourusername(ex:RDP user),FULL
●IISの動的ファイルの圧縮を有効にする(特定のMIMETypeに対して) (要Full IIS)
@echo off %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json',enabled='True']" /commit:apphost %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/atom+xml',enabled='True']" /commit:apphost %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/xml',enabled='True']" /commit:apphost %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/atom%2bxml;charset=utf-8',enabled='True']" /commit:apphost