我们今天拿一个新装好的机器来说。 第一、硬盘的分区已经操作系统的安装
①、硬盘我们直接分成NTFS的。因为这个格式对2003的iis非常有帮助。一般个人习惯,我是把C盘分为14G。其他的就按照硬盘的总大小来进行分划。
②、我们今天就按照web服务器版的为例,安装过程不说。就是把一些dns、dhco没特别安装的就不要安。在安装过程中网卡属性中只保留tcp/ip这项同时禁用NETBOIS。
第二、系统的权限设置以及安全配置
2.2最少的服务如果实现
黑色为自动 绿色为手动 红色为禁用
Alerter Application Experience Lookup Service Application Layer Gateway Service Application Management Automatic
Updates [Windows自动更新,可选项] Background Intelligent Transfer Service ClipBook COM+ Event System COM+ System
Application Computer Browser Cryptographic Services DCOM Server Process Launcher DHCP Client Distributed File
System Distributed Link Tracking Client Distributed Link Tracking Server Distributed Transaction Coordinator DNS
Client Error Reporting Service Event Log File Replication Help and Support HTTP SSL Human Interface Device
Access IIS Admin Service IMAPI CD-Burning COM Service Indexing Service Intersite Messaging IPSEC Services [如果
使用了IP安全策略则自动,如无则禁用,可选操作] Kerberos Key Distribution Center License Logging Logical Disk
Manager [可选,多硬盘建议自动] Logical Disk Manager Administrative Service Messenger /li> Microsoft Search
Microsoft Software Shadow Copy Provider MSSQLSERVER MSSQLServerADHelper Net Logon NetMeeting Remote Desktop
Sharing Network Connections Network DDE Network DDE DSDM Network Location Awareness (NLA) Network Provisioning
Service NT LM Security Support Provider Performance Logs and Alerts Plug and Play Portable Media Serial Number
Service [微软反盗版工具,目前只针对多媒体类] Print Spooler Protected Storage Remote Access Auto Connection
Manager Remote Access Connection Manager Remote Desktop Help Session Manager Remote Procedure Call (RPC) Remote
Procedure Call (RPC) Locator Remote Registry Removable Storage Resultant Set of Policy Provider Routing and
Remote Access Secondary Logon Security Accounts Manager Server Shell Hardware Detection Smart Card Special
Administration Console Helper SQLSERVERAGENT System Event Notification Task Scheduler TCP/IP NetBIOS Helper
Telephony Telnet Terminal Services Terminal Services Session Directory Themes Uninterruptible Power Supply
Upload Manager Virtual Disk Service Volume Shadow Copy WebClient Windows Audio [服务器没必要使用声音] Windows
Firewall/Internet Connection Sharing (ICS) Windows Image Acquisition (WIA) Windows Installer Windows Management
Instrumentation Windows Management Instrumentation Driver Extensions Windows Time Windows User Mode Driver
Framework WinHTTP Web Proxy Auto-Discovery Service Wireless Configuration WMI Performance Adapter Workstation
World Wide Web Publishing Service 以上操作完成以后是否就"最小的权限+最少的服务=最大的安全"呢?其实不然,任何事物
都是相对的
第三、现在就是iis、终端服务、ftp、sql等服务的配置
IIS6与IIS5有着很多不同之处,不一一列举,也不是我一个脑袋可以装下的东西。都在资料上!IIS6有一个非常不方便的东西,
就是他限制了在线上传不得大于200K,如何修改,请看:
首先停用IIS服务,> 服务 > iis admin service > 停用
C:\windows\system32\inetsrv\ metabase.xml 文件 用记事本打开它
找到 ASPMaxRequestEntityAllowed 处。默认为 204800 即 204800字节(200K)
修改为想要的数字如: 2048000 [2M] 保存,重启IIS服务即可!
设置基本参数
打开IIS管理器 > 网站 > 属性 >
网站 > 启动日志记录 > 关闭
主目录 > 配置 > 应用程序扩展 > 只保留 asp,asa
主目录 > 配置 > 选项 > 启用父目录
主目录 > 配置 > 调试 > 向客户端发送文本错误消息
网站 > 自定义错误 > 全部改成默认值 [上一章已经删除IIS使用的错误信息页面]
IIS管理器 > WEB服务扩展 > 启用 Active Server Pages
注:停用IIS默认站点,切勿删除,有可能会造成IIS的不稳定。
站点的建立将在第四节中详细介绍。
IIS支持PHP的配置
http://www.php.net/downloads.php以 PHP 5.1.1 为例
下载php-5.1.1-Win32.zip 解压到 D:\php 或任意目录 赋予该目录IIS用户组读取权限
将ext目录中的所有文件复制到 C:\Windows\System32目录下面
以记事本打开php.ini-dist文件
查找 extension_dir = "./" 更改为 extension_dir = "D:\php\ext"
查找 ; Windows Extensions 更改下面的参数
如要开通GD库支持 则将;extension=php_gd2.dll 前面的冒号删除
依此类推,更多设置参考PHP.INI中文版。完成设置好另存在C:\Windows\php.ini
尔后在IIS设置中 IIS管理器 > 网站 > 属性 > 主目录 > 配置 > 映射
添加 D:\php\php5isapi.dll 扩展名.php
其次在WEB服务扩展中 添加一个新的扩展名 PHP 执行位置 D:\php\php5isapi.dll 设为允许即可
由于WIN平台对MYSQL与PHP的组合无法体现性能优势。个人建议WIN平台PHP程序要使用数据库建议远程
或搭配文本数据库。
终端服务配置
开始 > 程序 > 管理工具 > 终端服务配置 > 连接
选择右侧列出的连接 属性 > 权限 删除所有用户组 添加单一的允许使用的管理员账户,这样即使服务器
被创建了其它的管理员.也无法使用终端服务。
另外在会话设置中可以进一步设置断1 D、注销等一些参数。
FTP的配置
目前大多数服务器使用Serv-U Server 为FTP SYSTEM。这里同时建议使用此软件
以 Serv-U FTP Server 6.1.0.5 final [最新版]为例,这里建议使用汉化版本.www.hanzify.org
安装原版至D:\Serv-U_3434999fdaf [复杂无规则的目录名可有效防止黑客的猜解]
尔后退出Serv-U,安装汉化包。
运行SERV-U管理器 IP地址可为空、安装为系统服务 设置密码防止溢出
PASV设置
Serv-U管理器 > <<本地服务器>> > 设置 > 高级
PASV端口范围 这里SERV-U只允许 50个端口范围 端口的设置范围 如 1025 - 1075 [1024以前的端口为系统使用]
更多个人化设置参考以下文档
SERV-U 技巧现在很多的朋友都用SERV-U做个人FTP的服务器,有关如何使用SERV-U架设服务器的文章很多了,这儿我就不多说
了。不过大家不知道注意到了没有,当你登陆很多FTP的时候,会显示一些欢迎信息,比如说显示你的IP,告诉你目前有多少人