1 / 41

Windows Server 2008

Windows Server 2008. 曹祖聖 台灣微軟資深講師 jimycao@syset.com http:// teacher.syset.com MCP, MCP+I, MCSA, MCSE,MCDBA, MCAD, MCSD, MCT, MVP. 伺服器管理. Server Manager. 初始化組態設定. 作業系統安裝. demo. 什麼是 Windows PowerShell ?. 微軟的一個新的 Windows 與伺服器管理平台 整個平台上的管理功能會不斷的增加 是一個互動式的命令列環境 全部物件化的腳本指令 …

ailsa
Télécharger la présentation

Windows Server 2008

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Server 2008 曹祖聖 台灣微軟資深講師 jimycao@syset.com http://teacher.syset.com MCP, MCP+I, MCSA, MCSE,MCDBA, MCAD, MCSD, MCT, MVP

  2. 伺服器管理 Server Manager 初始化組態設定 作業系統安裝

  3. demo

  4. 什麼是 Windows PowerShell ? • 微軟的一個新的 Windows 與伺服器管理平台 • 整個平台上的管理功能會不斷的增加 • 是一個互動式的命令列環境 • 全部物件化的腳本指令 … • 只有 Windows 平台上才有 !

  5. 過去的管理架構 圖形介面管理工具(例如: MMC 嵌入式管理單元) Windows Server 功能 命令列工具 Component Object Model (COM) 元件 WMI 類別

  6. 新一代的管理架構 MMC嵌入式管理單元 其它 指令碼 Windows PowerShell Cmdlets Microsoft .NET Framework Windows Server 功能

  7. Windows PowerShell • 支援現有的技術: • Windows Management Instrumentation (WMI) • Active Directory Services Interface (ADSI) • Microsoft .NET Framework 與 COM • 相容性: • 現有的命令列工具 100% 可以用 • 這表示你可以延用先前的技術,而且更方便、功能更強大

  8. Cmdlet與參數 • Comlet • Cmdlet是 PowerShell中的 "指令" • 是使用 .NET Framework 程式語言所撰寫出來的類別( Visual Basic , Visual C# ) • 內建 129 個 Comlet • 可以外掛其它 Comlet,例如 Exchnage … • 參數 • Comlet可以加上參數 • 其實是 Comlet類別的屬性

  9. 物件 ? • 用來表示真實 Windows 下的各種東西,例如: 服務、行程、磁碟、… • 屬性: 用來描述物件的狀態 • Name • StartMode • Status • 方法: 用來進行物件的操作動作 • Stop • Start • Pause

  10. Pipeline • 所有的cmdlets處理的都物件,不是文字 ! • 所有的 cmdlets都在一個 pipeline 中執行 • 所有的 pipeline 都會由一個特別的 comlet做結束,用來將結果的物件以文字顯示出來 • 選擇要顯示的屬性,以及他們的數值 • 將屬性格式化成表格呈現出來

  11. 一個簡單的 Pipeline 範例 Cmdlet Out-Default Pipeline Property = Value Property = Value Property = Value Property = Value

  12. 多重 Cmdlet Pipeline 範例 Cmdlet Cmdlet Out-Default Pipeline Property = Value Property = Value Property = Value Property = Value

  13. 如何取得協助 ? • PowerShell提供一組 comlets來讓你查詢 PowerShell的用法 • Get-Command cmdlet可以顯示出有那些功能可以用 • Get-Help cmdlet則顯示該怎麼用這些 comlets • Get-Member cmdlet則可以列出物件的屬性與方法 • 如果你是開發人員 • 有點像是 MSDN Help … • 標準的命名規則 • Get-*, Stop-*, … • 很容 "猜" 出指令與參數 !

  14. 懶得打字 ?! • 提供 Comlet的簡短別名 • cd = Set-Location • dir = Get-ChildItem • type = Get-Content • ren = Rename-Item • 可以使用 Get-Alias 來查詢 ! • 可以用New-Alias 來建立你自己的指令別名 !

  15. demo

  16. Windows Server Core • 安裝最小化安裝模式 • 命令列管理介面 • 簡化管理 • 減少受攻擊的可能 伺服器角色 DNS DHCP File AD Server Core Security, TCP/IP, File Systems, RPC,plus other Core Server Sub-Systems GUI, CLR, IE, Media Player, Outlook Express, …

  17. Windows Server Core

  18. System32 資料夾的內容 – 完整安裝 System32 資料夾的內容 – Server Core

  19. GUI, CLR, Shell, IE, Media, OE, Etc. Server Core 架構 Server, Server Roles TS IAS WebServer SharePoint Etc… Server With .NetFx, Shell, Tools, etc. Server Core Server Roles File ADLDS Print MediaServer IIS 7 WVS DNS DHCP AD Server Core Security, TCP/IP, File Systems, RPC,plus other Core Server Sub-Systems

  20. Tools and Commands • Net User – Set administrator password • Netsh – Manage network interfaces/firewall • Netdom – Join domain/rename • OCSetup – Add features and roles (case sensitive) • DNS-Server-Core-Role • DHCPServerCore • FRS-Infrastructure • Printing-ServerCore-Role • DirectoryServices-ADAM-ServerCore • MediaServer (requires separate download) • DCPromo with unattend file – Active Directory

  21. 遠端管理 Server Core #1 • 更改密碼 • net user administrator * • 設定主機 IP, DNS • netshintip set address “網路名稱” static 192.168.99.3 255.255.255.0 192.168.99.254 • netshintip set dnsserver “網路名稱” static 192.168.99.1 • 設定電腦名稱: • netdomrenamecomputer %computername% /newname:MyPC • 加入網域 • netdom join MyPC /domain:mcg.com /usero:Administrator /passwordo:P@ssw0rd /userd:Administrator /passwordd:P@ssw0rd /reboot

  22. 遠端管理 Server Core #2 • 啓動 Windows • slmgr.vbs -ato • 允許遠端桌面 • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\ fDenyTSConnections = 0 • netsh firewall set portopeningtcp 3389 "Remote Desktop" • 允許 MMC 遠端管理 • 開啟 UDP 137, 138 以及 TCP 139, 445 ports

  23. Roles & Features 安裝與管理 • OCList.exe • 只有在 Server Core 才有的指令 • 列出所有可以用的 Roles 和 Features 套件 • 還可以標示出那一個套件已安裝 • OCSetup.exe • 安裝 Roles 或 Features • 使用Ocsetup加上 /uninstall 參數來解除安裝

  24. 使用 Windows Remote Shell 管理 • Windows Remote Management (WinRM) • WS-Management • Windows Remote Shell (WinRS) • 支援 Windows Vista / Windows Server 2008 • 只能執行命令列工具或腳本 • 不支援互動模式 • 例如: "請按任意鍵繼續 …"

  25. 設定 WinRM • 使用命令列 • WinRMquickconfig • 使用unattend檔 • 在 <settings pass=“specialize”> 區段中加入: <component name=“Microsoft-Windows-Web-Services-for-Management-Core” publicKeyToken=“31bf3856ad364e35” language=“neutral” versionScope=“nonSxS” processorArchitecture=“x86”>   <ConfigureWindowsRemoteManagement> true </ConfigureWindowsRemoteManagement>   </component> • 也可以使用群組原則來設定

  26. 使用 WinRS • WinRS -r:<遠端主機> 命令 • 遠端主機可以是: • -r:https://myserver.com • -r:myserver • -r:http://127.0.0.1 • -r:http://169.51.2.101:80 • 例如 • winrs -r:myserver dir c:\windows\system32\*.dll

  27. WinRS 範例 • 啓用 Terminal Services 遠端管理 • winrs -r:myserver cscript \windows\system32\scregedit.wsf /ar 0 • 允許舊的 TS 用戶端 (Vista 之前) • winrs -r:myserver cscript \windows\system32\scregedit.wsf /cs 0 • 加入網域 • winrs -r:myserver netdom add myserver /domain:testdomain /userd:administrator /passwordd:<password> • 將網域管理員加入本機管理者群組 • winrs -r:myserver net localgroup administrators testdomain\administrator /add

  28. Server Core 硬體管理 • Server Core 支援隨插即用硬體 • 會在背景自動安裝驅動程式 • 如果沒有內建驅動程式 … • 手動拷貝驅動程式檔案到 Server Core 中 • pnputil -i -a driverinf • 列出所有已安裝的驅動程式 • sc query type= driver • 移除驅動程式 • sc delete 服務名稱

  29. Server Core 的控制台 ?! • 只有部份的控制台項目可以使用 • 變更時區 • control timedate.cpl • 變更鍵盤與語言 • control intl.cpl

  30. demo

  31. Terminal Services

  32. Terminal Services Gateway Intranet DMZ Internet Strips off RDP / HTTPs Tunnels RDP over HTTPs 內部防火牆 外部防火牆 RDP 通訊轉送到 TS Terminal Servers and other RDP Hosts Internet 遠端使用者 Terminal Services Gateway Network Policy Server Active Directory DC

  33. Terminal Services RemoteApp™ • 使用 Remote Programs 主控台來管理應用程式 • 允許設定透過 TS Web Access 來執行應用程式 • 遠端程式與本機電腦整合 • 集中管理所有的 Terminal Server Terminal Services Gateway Server

  34. Terminal Services RemoteApp™ • 程式就好像是在本機執行一樣 • 只支援使用遠端桌面的用戶 必須使用遠端桌面 Terminal Services Gateway Server

  35. demo

  36. Internet Information Services (IIS) 7.0 100% 管控 IIS 所有功能 模組化架構 可延伸的設計 延伸/修改 IIS 各項功能 減少受攻擊面 與 .NET 完全整合 應用程式 快速部署 高管理性 內建要求追蹤功能 IIS 7.0 加強功能 快速診斷

  37. 模組化設計 • 模組化 pipeline • 各項能被被計成單一的模組 • 可以視需求新增/移除/取代每一個模組 • 減少被攻擊的機會 • 減少記憶體使用與提高安全性 • 增加效能 • 模組可以是 native code 或 manage code • 延伸 .NET 的強大能力到 IIS 7.0 上 • 容易整合新的技術 • 模組化管理介面 • 外加自訂介面到管理介面上 (windows forms) • 使用 IIS 管理介面來管理您的應用程式

  38. IIS 7.0 處理機制 伺服器的功能細分成超過 40 個 模組... 身份驗證 身份驗證 NTLM 基本 匿名 授權 … 解析快取 IIS 決定由誰處理 CGI 各個模組會掛到generic request pipeline … … 靜態檔案 ExecuteHandler ISAPI … … 每個模組透過一個 public module API 來延伸伺服器功能 更新快取 傳送回應 傳送回應 記錄檔 壓縮

  39. 管理 IIS 7.0 HTTPS IIS7 IIS7 IIS7 UNC 共用組態 權力委派 Internet 遠端管理 更好用的工具: 以工作為導向的管理工具 透過 .NET API 管理 IIS IIS/ASP.NET 支援 WMI 提供者 完整的命令工具支援,例如: appcmd 豐富的執行時期資訊 自動化錯誤追蹤與記錄 XML XML XCopy部署 AppHost.config Web.config 系統管理人員 應用程式 共用應用程式平台 網站管理員 Web Farm 安全的遠端管理 完善的管理工具 委派管理 Web Farms 共用 IIS 7.0 組態

  40. IIS 7.0 與 ASP.NET 整合 基本 • 傳統模式 • 使用 ISAPI 執行 ASP.NET • 整合模式 • .NET modules / handlers 直接接到 IIS 7.0 處理管道中 • 可以處理任何要求 • 100% 執行時期支援 匿名 身份驗證 授權 解析快取 aspnet_isapi.dll … 靜態檔案 身份驗證 執行 Handler 表單 Windows … … ISAPI ASPX 對應Handler 更新快取 Trace 傳送回應 壓縮 … … 記錄

  41. demo

More Related