[Server Core+II7] 全程记录 Server Core 上部署 II7 + PHP FastCGI + MySQL
全程记录 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%!注意这个数据是在没有进行任何优化的情况下得到的。如果这个数据还不能让你振奋,你现在就可以打开该网站亲身体验一下最终的效果。
正如我之前提到的,此次使用 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(总体拥有成本)。
下面让我们进入主题,跟随我一起来体验一下这让人振奋的过程。
即刻参与 Vista 和 Office 产品术语定制
微软截至到8月25日之前,向公众征集 Vista 和 Office 产品的术语定义,任何人都有机会参与微软产品的术语制定。希望广发 IT 专业人士能够积极参与进来。
参与地址:https://members.microsoft.com/wincg/mtcf_home.aspx?s=1&langid=1420&cult=zh-cn
[IIS7] IIS7安装场景对照表
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.NET | IIS-ASPNET |
.NET Extensibility | IIS-NetFxExtensibility |
ISAPI Filters | IIS-ISAPIFilter |
ISAPI Extensions | IIS-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 |
ASP | IIS-ASP |
ISAPI Extensions | IIS-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 |
CGI | IIS-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 Extensibility | IIS-NetFxExtensibility |
Full Server Install Components
Server Manager | Update Name |
Internet Information Services | IIS-WebServerRole |
World Wide Web Services | IIS-WebServer |
Common HTTP Features | IIS-CommonHttpFeatures |
Static Content | IIS-StaticContent |
Default Document | IIS-DefaultDocument |
Directory Browsing | IIS-DirectoryBrowsing |
HTTP Errors | IIS-HttpErrors |
HTTP Redirection | IIS-HttpRedirect |
Application development | IIS-ApplicationDevelopment |
ASP.NET | IIS-ASPNET |
.NET Extensibility | IIS-NetFxExtensibility |
ASP | IIS-ASP |
CGI | IIS-CGI |
ISAPI Extensions | IIS-ISAPIExtensions |
ISAPI Filters | IIS-ISAPIFilter |
Ser-Side Includes | IIS-ServerSideInclude |
Health and diagnostics | IIS-HealthAndDiagnostics |
HTTP Logging | IIS-HttpLogging |
Logging Tools | IIS-LoggingLibraries |
Request Monitor | IIS-RequestMonitor |
Tracing | IIS-HttpTracing |
Custom Logging | IIS-CustomLogging |
ODBC Logging | IIS-ODBCLogging |
Security | IIS-Security |
Basic Authentication | IIS-BasicAuthenticaition |
Windows Authentication | IIS-WindowsAuthentication |
Digest Authentication | IIS-DigestAuthentication |
Client Certificate Mapping Authentication | IIS-ClientCertificateMappingAuthentication |
IIS Client Certificate Mapping Authentication | IIS-IISCertificateMappingAuthentication |
URL Authorization | IIS-URLAuthorization |
Request Filtering | IIS-RequestFiltering |
IP and Domain Restrictions | IIS-IPSecurity |
Performance | IIS-Performance |
Static Content Compression | IIS-HttpCompressionStatic |
Dynamic Content Compression | IIS-HttpCompressionDynamic |
Management Tools | IIS-WebServerManagementTools |
IIS Management Console | IIS-ManagementConsole |
IIS Management Scripts and Tools | IIS-ManagementScriptingTools |
Management Service | IIS-ManagementService |
IIS6 Management Compatibility | IIS-IIS6ManagementCompatibility |
IIS Metabase Compatibility | IIS-Metabase |
IIS 6 WMI Compatibility | IIS-WMICompatibility |
IIS 6 Scripting Tools | IIS-LegacyScripts |
IIS 6 Management Console | IIS-LegacySnapin |
FTP Publishing Service | IIS-FTPPublishingService |
FTP Server | IIS-FTPServer |
FTP Management Console | IIS-FTPManagemnt |
Windows Process Activation service | WAS-WindowsActivationService |
Process Model | WAS-ProcessModel |
.NET Environment | WAS-NetFxEnvironment |
Configiuration APIs | WAS-ConfigurationAPI |