全程记录 Server Core 上部署 II7 + PHP FastCGI + MySQL

前言:

近段时间由于网站服务器断电而出现一系列问题,让人感到很是郁闷!虽然目前 Blog 能够正常运转,但是效率明显降低很多。于是萌发将系统升级到 Windows Server 2008 平台的想法,这几天一直都在做 Windows Server 2008 和 IIS7 的评估测试,收获颇丰!不敢独享,特以大家都很关注的 Server Core 为中心,撰写此篇关于在 Server Core 上部署 IIS7、PHP FastCGI 和 MySQL 的 Blog 与大家一同学习分享。同时也希望大家能参与讨论。之所以拿 Server Core 来讲,我个人感觉非常有代表性,而且在部署过程中通过相对复杂的命令行反而更能深入地了解和认识 Server Core 与 IIS7 的特性和相关知识。

目标:

此次部署过程将使大家详细了解如何在一台全新安装的 Windows Server 2008 Web Edition Server Core (以下简称:WS08WebCore)上部署以 IIS7 为 Web 平台的 PHP + MySQL 服务器,同时会向大家展现如何修改服务器名称、分配静态IP、开启远程桌面、在防火墙上开启远程桌面支持、开启自动更新、安装 II7、安装配置 PHP FastCGI 以及 安装 MySQL 的全部过程。

涉及到的关键词:Windows Server 2008 Web,Server Core,IIS7,FastCGI,PHP,Netsh,Scregedit.wsf,Pkgmgr,Ocsetup,Oclist,Appcmd

测试环境:

宿主:

ThinkPad X60 1706-BM8:T7200/2G*2/120G/3945ABG/Windows Vista Ultimate with SP1

虚拟机平台:Virtual PC 2007 with SP1

虚拟机:Windows Server 2008 Web Edition Server Core,分配 512M 内存和 20G VHD,桥接到宿主3945ABG,开启VT支持

Step By Step :

安装 WS08WebCore 的过程就不再复述,对于新一代操作系统的安装过程所体现出的特性,相信不少朋友与我有一样的认可度。

在开始之前我们先来了解并确定一些信息!根据新加坡 StreetDirectory.com 网站的数据了解到他们在 WS08 发布之际就已经开始在测试评估该产品,并取得了让人为之兴奋的成果,经过他们的实际评估,在 WS08 的 IIS7 上以 FastCGI 方式运行 PHP 的效率远远高出原生的 LAMP 环境,而这个数据着实的让人为之震惊和兴奋!足足的高出一倍还多——130%!注意这个数据是在没有进行任何优化的情况下得到的。如果这个数据还不能让你振奋,你现在就可以打开该网站亲身体验一下最终的效果。

WS08vsLinux

正如我之前提到的,此次使用 Server Core 主要还是为了让大家能够额外了解到 Core 的一些操作特性,在未来我还会与大家分享在 Windows Server 2008 上部署 II7、PHP FastCGI 等等的心得体会。如果您的工作领域涉及到 Web 服务,我想现在就选择升级到 WS08是非常明智的,不论你是运行 ASP 还是 ASP.NET(注意:Server Core 不支持 .NET),甚至是 PHP,WS08 都提供了更强劲的动力支持,它更加稳定、效率更高、更安全、针对资源的控制更为出色。很早以前我就开始了针对 WS08 系列产品的测试和评估,而这次当我怀着测试看看的心情接触了 WS08 的 Web 版本,我深深地被吸引了,要知道如果你仅仅只是为了部署一台用于 Web 服务的服务器,选择 WS08Web 意味着你拥有更大的剩余磁盘空间、减少更多不必要的角色和功能、更低的设备性能需求,更廉价得软件授权费用!从而在减少安全隐患的同时,还提升了运营系统的性能和稳定性,最终有效地降低了 TCO(总体拥有成本)。

下面让我们进入主题,跟随我一起来体验一下这让人振奋的过程。

[IIS7] IIS7安装场景对照表

[ 2008/07/22 13:58 | by gOxiA ]
Default Server Install Components

Server Manager

Update Name

Static Content

IIS-StaticContent

Default Document

IIS-DefaultDocument

Directory Browsing

IIS-DirectoryBrowsing

HTTP Errors

IIS-HttpErrors

HTTP Logging

IIS-HttpLogging

Logging Tools

IIS-LoggingLibraries

Request Monitor

IIS-RequestMonitor

Request Filtering

IIS-RequestFiltering

Static Content Compression

IIS-HttpCompressionStatic

IIS Management Console

IIS-ManagementConsole

ASP.NET Workload Server Options

Server Manager

Update Name

Static Content

IIS-StaticContent

Default Document

IIS-DefaultDocument

Directory Browsing

IIS-DirectoryBrowsing

HTTP Errors

IIS-HttpErrors

HTTP Logging

IIS-HttpLogging

Logging Tools

IIS-LoggingLibraries

Request Monitor

IIS-RequestMonitor

Request Filtering

IIS-RequestFiltering

Static Content Compression

IIS-HttpCompressionStatic

IIS Management Console

IIS-ManagementConsole

ASP.NETIIS-ASPNET
.NET ExtensibilityIIS-NetFxExtensibility
ISAPI FiltersIIS-ISAPIFilter
ISAPI ExtensionsIIS-ISAPIExtensions

Class ASP Workload Server Options

Server Manager

Update Name

Static Content

IIS-StaticContent

Default Document

IIS-DefaultDocument

Directory Browsing

IIS-DirectoryBrowsing

HTTP Errors

IIS-HttpErrors

HTTP Logging

IIS-HttpLogging

Logging Tools

IIS-LoggingLibraries

Request Monitor

IIS-RequestMonitor

Request Filtering

IIS-RequestFiltering

Static Content Compression

IIS-HttpCompressionStatic

IIS Management Console

IIS-ManagementConsole

ASPIIS-ASP
ISAPI ExtensionsIIS-ISAPIExtensions

FastCGI Workload Server Options

Server Manager

Update Name

Static Content

IIS-StaticContent

Default Document

IIS-DefaultDocument

Directory Browsing

IIS-DirectoryBrowsing

HTTP Errors

IIS-HttpErrors

HTTP Logging

IIS-HttpLogging

Logging Tools

IIS-LoggingLibraries

Request Monitor

IIS-RequestMonitor

Request Filtering

IIS-RequestFiltering

Static Content Compression

IIS-HttpCompressionStatic

IIS Management Console

IIS-ManagementConsole

CGIIIS-CGI

IIS Managed Modules and .NET Extensibility Server Workload

Server Manager

Update Name

Static Content

IIS-StaticContent

Default Document

IIS-DefaultDocument

Directory Browsing

IIS-DirectoryBrowsing

HTTP Errors

IIS-HttpErrors

HTTP Logging

IIS-HttpLogging

Logging Tools

IIS-LoggingLibraries

Request Monitor

IIS-RequestMonitor

Request Filtering

IIS-RequestFiltering

Static Content Compression

IIS-HttpCompressionStatic

IIS Management Console

IIS-ManagementConsole

.NET ExtensibilityIIS-NetFxExtensibility

Full Server Install Components

Server Manager

Update Name

Internet Information ServicesIIS-WebServerRole
World Wide Web ServicesIIS-WebServer
Common HTTP FeaturesIIS-CommonHttpFeatures

Static Content

IIS-StaticContent

Default Document

IIS-DefaultDocument

Directory Browsing

IIS-DirectoryBrowsing

HTTP Errors

IIS-HttpErrors

HTTP RedirectionIIS-HttpRedirect
Application developmentIIS-ApplicationDevelopment
ASP.NETIIS-ASPNET
.NET ExtensibilityIIS-NetFxExtensibility
ASPIIS-ASP
CGIIIS-CGI
ISAPI ExtensionsIIS-ISAPIExtensions
ISAPI FiltersIIS-ISAPIFilter
Ser-Side IncludesIIS-ServerSideInclude
Health and diagnosticsIIS-HealthAndDiagnostics

HTTP Logging

IIS-HttpLogging

Logging Tools

IIS-LoggingLibraries

Request Monitor

IIS-RequestMonitor

TracingIIS-HttpTracing
Custom LoggingIIS-CustomLogging
ODBC LoggingIIS-ODBCLogging
SecurityIIS-Security
Basic AuthenticationIIS-BasicAuthenticaition
Windows AuthenticationIIS-WindowsAuthentication
Digest AuthenticationIIS-DigestAuthentication
Client Certificate Mapping AuthenticationIIS-ClientCertificateMappingAuthentication
IIS Client Certificate Mapping AuthenticationIIS-IISCertificateMappingAuthentication
URL AuthorizationIIS-URLAuthorization

Request Filtering

IIS-RequestFiltering

IP and Domain RestrictionsIIS-IPSecurity
PerformanceIIS-Performance

Static Content Compression

IIS-HttpCompressionStatic

Dynamic Content CompressionIIS-HttpCompressionDynamic
Management ToolsIIS-WebServerManagementTools

IIS Management Console

IIS-ManagementConsole

IIS Management Scripts and ToolsIIS-ManagementScriptingTools
Management ServiceIIS-ManagementService
IIS6 Management CompatibilityIIS-IIS6ManagementCompatibility
IIS Metabase CompatibilityIIS-Metabase
IIS 6 WMI CompatibilityIIS-WMICompatibility
IIS 6 Scripting ToolsIIS-LegacyScripts
IIS 6 Management ConsoleIIS-LegacySnapin
FTP Publishing ServiceIIS-FTPPublishingService
FTP ServerIIS-FTPServer
FTP Management ConsoleIIS-FTPManagemnt
Windows Process Activation serviceWAS-WindowsActivationService
Process ModelWAS-ProcessModel
.NET EnvironmentWAS-NetFxEnvironment
Configiuration APIsWAS-ConfigurationAPI

[IIS7] 脚本方式安装 IIS7

[ 2008/07/19 20:39 | by gOxiA ]
使用此脚本将完整安装的 IIS,并可根据自己的需要进行编辑以安装需要的功能包。注意该脚本命令行不支持 Server Core 下的 II7 安装,如需 Server Core 下的完整安装脚本请访问:在 Server Core 下执行 IIS7 的完整安装,因为 Server Core 不支持 .Net Framework,所以 IIS7 也就无法支持 DotNet。
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
而下面的脚本则进行 IIS7 的默认安装,即最小化安装。
start /w pkgmgr /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel
注意:以上脚本中均不包含换行。

执行如下命令:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IISStaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IISHttpRedirect;IIS-ApplicationDevelopment;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IISHttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IISCustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IISWindowsAuthentication;
IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IISRequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IISHttpCompressionDynamic;IIS-WebServerManagementTools;IISManagementScriptingTools;IIS-IIS6ManagementCompatibility;IIS-Metabase;IISWMICompatibility;IIS-LegacyScripts;IIS-FTPPublishingService;IIS-FTPServer;WASWindowsActivationService;WAS-ProcessModel


注意:中间没有换行!

        微软近来对 PHP 的支持尤为突出,最近才发布的 Expression Studio 2 中的 Expression Web 2 就直接提供了对 PHP 的支持,而早些时候发布的 FastCGI RTM ,使 PHP 在 Windows  的 IIS 平台上的执行效率大大提高,并且内置在了 Windows Server 2008 中。新加坡一家公司曾经测试在 Windows 的 IIS 平台上运行 PHP,执行效率足足提高了 130% 以上,这是一个惊人的数字。
        FastCGI 除了支持 Windows Server 2008 还支持 Windows Server 2003,下面是 FastCGI 的原文介绍:
Overview
The FastCGI Extension for IIS 6.0 enables popular application frameworks that support FastCGI protocol to be hosted on the IIS web server in a high-performance and reliable way. FastCGI provides a high-performance alternative to the Common Gateway Interface (CGI), a standard way of interfacing external applications with Web servers that has been supported as part of the IIS feature-set since the very first release.
CGI programs are executables launched by the web server for each request in order to process the request and generate dynamic responses that are sent back to the client. Because many of these frameworks do not support multi-threaded execution, CGI enables them to execute reliably on IIS by executing exactly one request per process. Unfortunately, it provides poor performance due to the high cost of starting and shutting down a process for each request.
FastCGI addresses the performance issues inherent to CGI by providing a mechanism to reuse a single process over and over again for many requests. Additionally, FastCGI maintains compatibility with non-thread-safe libraries by providing a pool of reusable processes and ensuring that each process will only handle one request at a time.
For additional support information, go to
http://support.microsoft.com.
Features
The Microsoft FastCGI Extension for IIS  provides full support for hosting and executing FastCGI enabled applications on IIS in high performance and reliable way.
Some of the important features provided in this release of FastCGI Extension are listed below:
Reliable hosting of non thread-safe applications (such as PHP) in FastCGI mode by enforcing single request concurrency per FastCGI process
Support for hosting of FastCGI application frameworks on shared servers by providing necessary configurability.
Rich set of configuration options for tweaking performance of FastCGI extension and FastCGI processes.
The following list describes the most important changes since the Go Live release:
Changes to fcgiext.ini take effect without restarting web service process
When any configuration change is made to fcgiext.ini file the change is picked up by the FastCGI Extension right away, without any need to restart the Web Server process. Because of that it is recommended to use the configuration script (fcgiconfig.js) included in this release instead of the one provided with Go Live release. The configuration script that was included with Go Live release recycled the application pool or restarted the web service every time a configuration change was made. It is not necessary to perform these operations anymore, so the application pool recycling functionality has been removed from the configuration script.
RapidFailsPerMinute configuration setting can be used to control Rapid Failure Protection mode
By default the FastCGI extension goes into Rapid Failure Protection mode, if it encounters more than 10 failures per minute in the FastCGI process pool. The RapidFailsPerMinute setting can be used to specify the number of failures per minute that would trigger Rapid Failure Protection mode.
Configuration script (fcgiconfig.js) can re-create IIS script mappings from fcgiext.ini file
The new command “-syncini” has been added to fcgiconfig.js to allow for re-creation of IIS script mappings by using FastCGI process pool configuration information available in the fcgiext.ini file. For example this command can be used in situations when the FastCGI extension is un-installed and then re-installed, since all script mappings are removed during un-install.
The following bugs have been fixed since Go Live release:
Responses with empty header values caused the FastCGI extension to fail response processing
The status codes logged by the FastCGI extension may be different from what was sent to the client
On 64 bit machines with Enable32BitAppOnWin64 set, fcgiext.dll would look for configuration in windowssyswow64inetsrv instead of windowssystem32inetsrv
Stability under heavy load has been improved
Benefits
Most applications built to for IIS take advantage of the native, multi-threaded extensibility model of IIS. Many popular applications, particularly those written or originally designed for Linux, are not multi-threaded, and instead take a multi-process approach to concurrency. While the PHP engine itself is multi-thread capable, many of the popular PHP extensions are not, requiring a single concurrent request guarantee to operate reliably. This forces the use of CGI and results in poor performance on the Windows platform. FastCGI helps these application frameworks to achieve improved performance on Windows over CGI, while allowing stable operation in production environments.
Requirements
To use FastCGI extension, you must have one of the following operating systems with IIS installed:
Windows Server 2003 SP2 (IIS 6.0)
Windows Server 2003 x64 edition (IIS6.0)

下载地址:FastCGI Extension for Internet Information Services 6.0
上述介绍原文地址:FastCGI Extension for IIS6.0 - RTM
FastCGI 在 Windows Server 2003 上的安装非常简单,一路 Next 即可完成。而今天的主题则是与大家分享在 Windows Server 2003 上配置 PHP 的 FastCGI 模式。与以往的 PHP 常规配置不同,PHP 使用 FastCGI 来解释脚本,所以我们将会使用 fcgiext.dll 来解释 PHP,之后我们便需要编写 FastCGI 的配置文件(FCGIEXT.ini)使 PHP 与之集成。具体操作步骤如下:
1. 运行 Inetmgr.exe 启动 IIS 管理器;
2. 进入“网站”属性(如果只希望为某个站点启用 FastCGI PHP 支持,则需要单独配置该站点);
3. 切换到“主目录”配置页,并单击“配置”进入“应用程序配置”;
4. 在“影射”配置下单击“添加”创建一个应用程序扩展;
5. 在“可执行文件”中键入用于解释 PHP 脚本的 FastCGI 地址:“C:WINDOWSsystem32inetsrvfcgiext.dll”,“限制为”指定只允许“GET,HEAD,POST”。
image
至此就完成了应用程序影射的添加。
之后,编辑 PHP.ini 文件,配置如下参数:
1. fastcgi.impersonate = 1
2. cgi.fix_pathinfo = 1
3. cgi.force_redirect = 0
完成后,将 PHP.ini 拷贝到 Windows 目录,或者在之后的 FCGIEXT.ini 配置 PHP.ini 的位置。
最后,编辑 FCGIEXT.ini 文件,在“[Types]”字段下添加如下内容:
php=c:\php\php-cgi.exe
Arguments=-c c:\windows\php.ini
至此就完成了整个配置,我们可以编写一个 PHP 测试脚本,内容如下:
<? phpinfo (); ?>
打开浏览器来测试一下吧!
image

The W3C Extended log file format is the default log file format for IIS. It is a customizable ASCII text-based format. You can use IIS Manager to select which fields to include in the log file, which allows you to keep log files as small as possible. Because HTTP.sys handles the W3C Extended log

      Windows Server 2003TM, Service Pack 1 enables IIS 6.0 to run 32-bit Web applications on 64-bit Windows using the Windows-32-on-Windows-64 (WOW64) compatibility layer. IIS 6.0 using WOW64 is intended to run 32-bit personal productivity applications needed by software developers and administrators, including 32-bit Internet Information Services (IIS) Web applications. For more information about running 32-bit applications on 64-bit Windows, see Running 32-bit Applications on 64-bit Windows.

To enable IIS 6.0 to run 32-bit applications on 64-bit Windows

1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
 
2. Type the following command:

cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”

 
3. Press ENTER.

即可实现在Windows 64bit 系统上应用下列 32bit 程序:

  • Internet服务API扩展
  • ISAPI过滤器
  • ASP应用程序
  • ASP.NET应用程序
  • 获取更多信息:http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/13f991a5-45eb-496c-8618-2179c3753bb0.mspx?mfr=true


    匿名访问:如果启用了匿名访问,访问站点时,不要求提供经过身份验证的用户凭据。当需要让大家公开访问那些没有安全要求的信息时,使用此选项最合适。用户尝试连接您的网站时,IIS 会将该连接分配给 IUSER_ComputerName 帐户,其中 ComputerName 是运行 IIS 的服务器的名称。默认情况下,IUSER_ComputerName 帐户为 Guests 组的成员。此组具有 NTFS 文件系统权限所规定的安全限制,这些限制指定访问级别以及可提供给公共用户的内容的类型。要编辑用于匿名访问的 Windows 帐户,请在“匿名访问”框中单击浏览
    重要说明:如果启用匿名访问,IIS 会始终先使用匿名身份验证来尝试验证用户身份,即使您启用其他身份验证方法也是如此。


    集成 Windows 身份验证:以前称为 NTLMWindows NT 质询/响应身份验证,此方法以 Kerberos 票证的形式通过网络向用户发送身份验证信息,并提供较高的安全级别。Windows 集成身份验证使用 Kerberos 版本 5 和 NTLM 身份验证。要使用此方法,客户端必须使用 Microsoft Internet Explorer 2.0 或更高版本。另外,不支持通过 HTTP 代理连接进行 Windows 集成身份验证。如果某个 Intranet 中的用户和 Web 服务器计算机在同一个域中,并且管理员可以确保每个用户都使用 Internet Explorer 2.0 或更高版本,那么对于这个 Intranet,使用此选项是最合适的。
    注意:如果选择了多个身份验证选项,IIS 会首先尝试协商最安全的方法,然后它按可用身份验证协议的列表向下逐个试用其他协议,直到找到客户端和服务器都支持的某种共有的身份验证协议。


    Windows 域服务器的摘要式身份验证:摘要式身份验证需要用户 ID 和密码,可提供中等的安全级别,如果您要允许从公共网络访问安全信息,则可以使用这种方法。这种方法与基本身份验证提供的功能相同。但是,此方法会将用户凭据作为 MD5 哈希或消息摘要在网络中进行传输,这样就无法根据哈希对原始用户名和密码进行解码。要使用此方法,客户端必须使用 Microsoft Internet Explorer 5.0 或更高版本,Web 客户端和 Web 服务器必须是相同域的成员或者被相同域信任。
    如果启用摘要式身份验证,请在领域框中键入领域名称。


    基本身份验证(以明文形式发送密码):基本身份验证需要用户 ID 和密码,提供的安全级别较低。用户凭据以明文形式在网络中发送。这种形式提供的安全级别很低,因为几乎所有协议分析程序都能读取密码。但是,它与大多数 Web 客户端兼容。如果允许用户访问的信息没有什么隐私性或不需要保护,使用此选项最为合适。
    如果启用基本身份验证,请在“默认域”框中键入要使用的域名。您还可以选择在领域框中输入一个值。


    Microsoft .NET Passport 身份验证:.NET Passport 身份验证提供了单一登录安全性,为用户提供对 Internet 上各种服务的访问权限。如果选择此选项,对 IIS 的请求必须在查询字符串或 Cookie 中包含有效的 .NET Passport 凭据。如果 IIS 不检测 .NET Passport 凭据,请求就会被重定向到 .NET Passport 登录页。
    注意:如果选择此选项,所有其他身份验证方法都将不可用(显示为灰色)。

    获取 IUSR 帐户密码
    cscript.exe adsutil.vbs get w3svc/anonymoususerpass 

    获取 IWAM 帐户密码
    cscript.exe adsutil.vbs get w3svc/wamuserpass 

    设置 IUSR 帐户密码
    cscript.exe adsutil.vbs set w3svc/anonymoususerpass "password" 

    设置 IWAM 帐户密码
    cscript.exe adsutil.vbs set w3svc/wamuserpass "password"

    注:在获取密码的时候如果现实的结果密码为“******”,那么应当修改Adsutil.vbs文件

    将    

            If (Attribute = True) Then
            IsSecureProperty = True

    中的

            IsSecureProperty = True

    改为

            IsSecureProperty = False

    关于 IWAM 帐号的同步可察看另外一篇Blog:IIS帐号同步

    如果服务器使用IIS中的FTP服务,并且启用了TCP/IP筛选,而此时又需要启用被动模式连接(Passive),那么为了方便开放端口,我们可以指定Passive的范围,操作如下:

    adsutil.vbs set /MSFTPSVC/PassivePortRange "4000-4020"

    分页: 2/5 第一页 上页 1 2 3 4 5 下页 最后页 [ 显示模式: 摘要 | 列表 ]