使用Windows Server 2008 R2 Core 架设IIS服务器

时间:2021-10-07 00:29:44

1.修改hostname(未加入域)

netdom renamecomputer %computername% /NewName:SQLServer /reboot:0

2.重命名网络适配器

netsh interface set interface name="local area connection" newname="Internal"

3.修改静态ip

netsh interface ipv4 set address name=Internal static 192.168.1.202 255.255.255.0 192.168.1.1

4.修改dns

netsh interface ipv4 set dnsserver name=Internal static 61.139.2.69 primary

5.安装.NET Framework

dism /online /enable-feature /featurename:NetFx2-ServerCore

dism /online /enable-feature /featurename:NetFx3-ServerCore

6.配置Web服务器角色

dism /online /enable-feature /featurename:IIS-WebServerRole

7.为服务器安装IIS-ASPNET角色

dism /online /enable-feature /featurename:IIS-ISAPIFilter

dism /online /enable-feature /featurename:IIS-ISAPIExtensions

dism /online /enable-feature /featurename:IIS-NetFxExtensibility

dism /online /enable-feature /featurename:IIS-ASPNET

8.验证IIS服务是否已经开始运行

sc query w3svc

9.安装IIS管理服务

dism /online /enable-feature /featurename:IIS-ManagementService

10.安装WAS-WindowsActivationService和WAS-ConfigurationAPI

dism /online /enable-feature /featurename:WAS-WindowsActivationService

dism /online /enable-feature /featurename:WAS-ConfigurationAPI

11.更改注册表键值来激活管理服务

Reg Add HKLM\Software\Microsoft\WebManagement\Server /V EnableRemoteManagement /T REG_DWORD /D 1

12.启用IIS管理服务

net start wmsvc

13.验证IIS管理服务是否已经开始运行

sc query wmsvc