安裝IIS 5.0 DIY
2024-08-29 03:13:56
供稿:網(wǎng)友
作者:adam < [email protected] >
主頁:http://www.nsfocus.com
日期:2000-12-14
在安裝windows2000的時候,如果你選擇了安裝iis,那么在安裝的時候系統(tǒng)將會你的%systemdrive%里創(chuàng)建一個inetpub目錄,而且還會在inetpub目錄下創(chuàng)建一個scripts目錄,iis還會創(chuàng)建一個虛擬目錄scipts指向該目錄,并且給這
個目錄執(zhí)行權(quán)限。前段時間nsfocus安全小組研究發(fā)現(xiàn)的“unicode解碼目錄遍歷漏洞”大部分問題就是針對web站點(diǎn)的可執(zhí)行目錄而言的,所以我們建議把該目錄移到非系統(tǒng)盤在一定程度上可以保證一定的安全。
然而在我們選擇安裝系統(tǒng)組件的時候,無法自己定義iis的安裝盤符,所以才有了今天的這篇文章。:)
我們在安裝系統(tǒng)的時候不選擇安裝iis,等系統(tǒng)安裝完成后手動來做,我們可以使用無人值守的方式自定義安裝iis 5.0。首先確認(rèn)你的 windows 2000的安裝介質(zhì)是可用的,本例中的安裝介質(zhì)是光盤,因此只要將安裝光盤插入光驅(qū)即可,然后在你的硬盤或者軟盤上創(chuàng)建一個無人值守安裝文件,本例中我們將在d盤創(chuàng)建一個 iis5install.txt 作為無人值守安裝文件,下面我們看看該文件的內(nèi)容:
[components] '所安裝的組件
iis_common = on '公用文件
iis_inetmgr = on 'iis管理器
iis_www = on 'www服務(wù)
iis_ftp = on 'ftp服務(wù)
iis_htmla = on 'web方式的iis管理器
[internetserver]
path="d:/inetsrv" 'common文件放置位置(如果你是卸載了iis再手動裝,公用文件還是會位置保持不變)
pathftproot="d:/inetpub/ftproot" 'ftp的根路徑
pathwwwroot="d:/inetpub/wwwroot" 'www的根路徑
將該文件存盤后,運(yùn)行“sysocmgr /i:%windir%/inf/sysoc.inf /u:d:/iis5install.txt”,
不會有提示框出現(xiàn),系統(tǒng)將自動的為你安裝好iis,而且scripts目錄將會在d盤,使用“unicode解碼目錄遍歷漏洞”也就
失效了。
如果你需要安裝更多的iis組件,以下是一個比較詳細(xì)的無人值守安裝文件:
=========================================begin============================
;this is an example unattended installation file
;iis, mts, and index server are on
;target path should be new directory
;adminpassword is blank.
[unattended]
unattendmode = fullunattended
oempreinstall = no
targetpath = *
filesystem = leavealone
[userdata]
fullname = "your user name"
orgname = "your organization name"
computername = "computername"
[guiunattended]
timezone = "004"
adminpassword = *
autologon = yes
[licensefileprintdata]
automode = "perserver"
autousers = "0"
[display]
bitsperpel = 4
xresolution = 800
yresolution = 600
vrefresh = 70
[networking]
installdefaultcomponents = yes
[identification]
joinworkgroup = workgroup
;turns nt components (and their respective sections) on or off
[components]
iis_common = on
iis_inetmgr = on
iis_www = on
iis_ftp = on
iis_htmla = on
iis_doc = on
iis_pwmgr = on
iis_smtp = on
iis_smtp_docs = on
mts_core = on
msmq = off
terminalservices = off
reminst = off
certsrv = off
rstorage = off
indexsrv_system = on
certsrv_client = off
certsrv_server = off
certsrv_doc = off
[internetserver]
;without these keys specified iis will use the default settings
; note that the path is location for inetsrv, the core iis programs and files.
path=d:/securelocation
pathftproot=e:/inetpub/ftproot pathwwwroot=e:/inetpub/wwwroot