2013年4月10日 星期三

[MCSA] Windows Server 2012 - Install Servers


License

Windows Server DataCenter & Standard 兩種版本都支援 Hyper-V,其中差別在於可用的 VM 數量不同;每一個 Windows Server 2012 的執行個體都可被分類為 POSE(Physical Operation System Environment) or VOSE(Virtual Operating System Environment)。

或有虛擬化的需求,則要按照以下流程安裝:
  1. 進行 POSE 的安裝
  2. 安裝 Hyper-V 的 Role
  3. 透過 Hyper-V Role 來建立 VM 並安裝 VOSE

以下是 Windows Server 2012 各版本合法授權內的 POSE & VOSE 的數量:
  • Datacenter:1 POSE + Unlimited VOSE
  • Standard:1 POSE + 2 VOSE
  • Foundation:1 POSE + 0 VOSE
  • Essentials:1 (POSE or VOSE) + 1 (POSE or VOSE)
以上是各版本合法授權內可用的 POSE & VOSE,但並不代表為軟體的限制;若安裝超過授權數量的軟體,必須購買足夠的授權才行。

Minimum Server Interface

安裝 Windows Server 2012 時,除了可以選擇傳統式的全圖形化安裝,也可選擇最精簡的 Server Core 的安裝方式。

除了上述兩者,還有另外一種折衷的選擇,稱作 Minimum Server Interface,僅留下 Server Manager & MMC Applications(例如:Device Manager & 完整的 PowerShell 介面),足以讓管理者用來管理本地 & 遠端伺服機。

若要讓 Server 變成僅有 Minimum Server Interface,可透過以下步驟執行:
  1. 點選左下角的 Server Manager
  2. 在 Server Manager 的視窗中點選右上角的 Manage -> Remove Roles and Features
  3. 經過了幾個畫面,到了 Features 的視窗,將 User Interfaces and Infrastructure -> Server Graphic Shell 取消勾選,並選擇 Remove
  4. 重新開機



























Features on Demand

Windows Serve 2012 安裝時,安裝程式會將所有相關元件程式放在 C:\Windows\WinSxS 資料夾中,因此若是隨時要啟用特定功能,就不需要使用光碟或是其他安裝媒體。

但若是很多功能都不需要時怎辦? 一堆其他不需要的元件程式都擺在 server 上,若是 server 很多台時,許多寶貴的磁碟空間就浪費掉了;於是,微軟提供了 Features on Demand 這樣的功能。

Features on Demand 針對每種系統程式功能提供了三種安裝狀態:
  • Enabled
  • Disabled
  • Disabled with payload removed

在之前的 Windows Server 版本中,只有提供前兩種,在 2012 裡面提供了第三種安裝狀態,第三種表示除了將特定功能停用外,也移除在 C:\Windows\WinSxS 資料夾中相對應的安裝程式,但此種方式只能透過 PowerShell 的 cmdlet 來完成,假設以上面要移除 Server Graphic Shell 來舉例,就要執行以下指令:
Uninstall-WindowsFeature Server-Gui-Shell -Remove
透過加上 -Remove 參數,指定 2012 將相關的安裝程式一併移除。

不過,將本機上的安裝程式移除了,也不代表沒辦法再度安裝相關的服務或功能,可以透過以下幾種方式重新安裝啟用服務:
  • Windows Update
  • 使用 PowerShell 中的 Install-WindowsFeature 指令搭配 -Source 指定 image 的位置
  • 系統管理員可以透過 Group Policy 指定多個安裝來源

Upgrade Servers

透過 Upgrade 的方式也可以升級至 2012(如果可以,還是儘量執行 clean installation 最穩定),但有以下限制:
  1. 無法從 2008 之前的版本升級
  2. 無法從 2012 pre-RTM 版本升級
  3. 無法從 WorkStation 版本升級
  4. 無法跨版本升級,例如 Enterprise -> Datacenter
  5. 無法跨平台升級,例如 32-bits -> 64 bits
  6. 無法從任何的 Itanium 版本升級
  7. 無法跨語言升級,例如 English -> Chinese

Migration

要從其他版本升級到 2012,比起 Upgrade,Migration 或許是比較好的方式,因為 Migration 是將目前系統中重要的設定,透過 Migration Tool 備份起來後,再移到 2012 上面。

透過 Migration,幾乎就沒有前述 Upgrade 的限制存在,不論是不同的 Version(例:2003 -> 2012)、Edition(例:Enterprise -> Datacenter)、Platform(例:x86 -> x64)、實體轉虛擬、不同的安裝選項(GUI -> Server Core),都可以透過 Migration Tool,搭配 2012 的 Migration Guide 來完成轉移的工作。

但要注意的是,在 2012 上的 Migration,並非像以往一次可以完成,而是將 Role 與 Role Service 分開處理的。

要進行 Migration,首先必須要在 2012 上安裝 Migration Tool,安裝方式如下:
  1. 點選左下角的 Server Manager
  2. 在 Server Manager 的視窗中點選右上角的 Manage -> Add Roles and Features
  3. 經過了幾個畫面,到了 Features 的視窗,勾選 Windows Server Migration Tools,選擇 Next -> Install 即可,如下圖:




























但 Migration Tool 的使用,又是另一個 topic 了,下回有讀到再來分享!

問答時間

Ralph recently took delivery of a new server with Windows Server 2012 Datacenter Edition already installed with the full GUI option. Ralph wants to configure the system as a web server, using the absolute minimum of hardware resources. His first step is to use Server Manager to install the Web Server (IIS) role.
With this in mind, answer the following questions:

1. What PowerShell command should Ralph use to convert the full GUI installation to Server Core?
Ans: Uninstall-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Restart

2. What PowerShell command should Ralph use to remove the GUI installation files completely from the system?
Ans: Uninstall-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Remove (加上 Remove 參數即可)

3. Which of the following roles implement what can be classified as infrastructure services? (Choose all that apply)
A. DNS
B. Web Server (IIS)
C. DHCP
D. Remote Desktop Services
Ans: A & C
【備註】IIS & RDS 屬於 Application Service,不屬於 Infrastructure Service

4. Which of the following is a valid upgrade path to Windows Server 2012?
A. Windows Server 2003 Standard to Windows Server 2012 Standard
B. Windows Server 2008 Standard to Windows Server 2012 Standard
C. Windows Server 2008 R2 32-bit to Windows Server 2012 64-bit
D. Windows 7 Ultimate to Windows Server 2012 Essentials
Ans: B

5. Which feature must you add to a Windows Server 2012 Server Core installation to convert it to the Minimal Server Interface?
A. Graphical Management Tools and Infrastructure
B. Server Graphical Shell
C. Windows PowerShell
D. Microsoft Management Console
Ans: A
【備註】B 選項會安裝成 Full GUI,C 選項僅有 Command Line 模式,D 選項是 Minimal Service Interface 的其中一個圖形化應用程式,無法單獨安裝

6. What is the name of the directory where Windows stores all of the operating system modules it might need to install at a later time?
A. Windows
B. System32
C. bin
D. WinSxS
Ans: D

7. Which of the following are valid reasons why administrators might want to install their Windows Server 2012 servers using the Server Core option? (Choose all that apply)
A. A Server Core installation can be converted to the full GUI without reinstalling the operating system.
B. The PowerShell 3.0 interface in Windows Server 2012 includes more than 10 times as many cmdlets as PowerShell 2.0
C. The new Server Manager in Windows Server 2012 makes it far easier to administer servers remotely.
D. A Windows Server 2012 Server Core license costs significantly less than a full GUI license.
Ans: A & B & C