共有5个实验:
实验Lab12A:安装DC
实验Lab12B:安装Server Core的DC
实验Lab12C:传送FSMO
实验Lab12D:配置GC与通用组成员缓存
实验Lab12E:配置SYSVOL卷的DFS-R复制
==========
实验12A:安装DC
共3个练习
练习1:使用安装向导创建额外的DC
练习2:从命令行添加一台DC
练习3:从安装介质创建一台DC
练习1:使用安装向导创建额外的DC
任务:使用安装向导提升一台DC
1. 启动HQDC2服务器,这是一台普通服务器,没有加入contoso.com域。以本地管理员身份登录。
2. 打开“命令提示符”,运行: dcpromo
3. 根据向导完成安装。
4. 在“摘要”对话窗口,点击“导出”按钮,将配置信息输出到一个AdditionalDC.txt文本文件(自动应答文件)。 这个文件可用于无人值守安装。
5. 回到“摘要”对话窗口,单击“取消”按钮。
练习2:从命令行添加一台DC
任务1:创建dcpromo命令
1. 打开上一个练习保存的AdditionalDC.txt文件。文件内容为:
; DCPROMO unattend file (automatically generated by dcpromo) ; Usage: ; dcpromo.exe /unattend:C:\LabFiles\AdditionalDC.txt ; ; You may need to fill in password fields prior to using the unattend file. ; If you leave the values for "Password" and/or "DNSDelegationPassword" ; as "*", then you will be asked for credentials at runtime. ; [DCInstall] ; Replica DC promotion ReplicaOrNewDomain=Replica ReplicaDomainDNSName=contoso.com SiteName=Default-First-Site-Name InstallDNS=Yes ConfirmGc=Yes CreateDNSDelegation=No UserDomain=contoso.com UserName=contoso.com\administrator Password=* DatabasePath="C:\Windows\NTDS" LogPath="C:\Windows\NTDS" SYSVOLPath="C:\Windows\SYSVOL" ; Set SafeModeAdminPassword to the correct value prior to using the unattend file SafeModeAdminPassword= ; Run-time flags (optional) ; CriticalReplicationOnly=Yes ; RebootOnCompletion=Yes |
2. 在文本编辑工具(例如:记事本)编辑上述文本。最前面加上“dcpromo.exe /unattend”。每个选项前面添加一个“/”符号,将“=”符号换成“:”。然后将所有参数都集中在一行上面。 结果如下:
dcpromo.exe /unattend /ReplicaOrNewDomain:Replica /ReplicaDomainDNSName:contoso.com /SiteName:Default-First-Site-Name /InstallDNS:Yes /ConfirmGc:Yes /CreateDNSDelegation:No /UserDomain:contoso.com /UserName:contoso.com\administrator /Password:* /DatabasePath:"C:\Windows\NTDS" /LogPath:"C:\Windows\NTDS" /SYSVOLPath:"C:\Windows\SYSVOL" /SafeModeAdminPassword:Pa$$w0rd /RebootOnCompletion:Yes |
3. 选项“Password”的值用“*”符号,表示在命令行运行时根据提示输入。也可以在上述命令行中用明文写上密码。选项“SafeModeAdminPassword”的值必须改为密码的明文,否则运行时会报错。
4. 上述命令行可直接运行,就可以创建一台DC。本实验只是示例,无需运行。
任务2:从文件参数执行命令行
1. 用文本工具编辑C:\LabFiles\AdditionalDC.txt文件。在选项“SafeModeAdminPassword=”后面填上密码的明文。
2. 打开命令提示窗口。运行:
C:\Users\administrator>dcpromo.exe /unattend:C:\LabFiles\AdditionalDC.txt 正在验证环境和参数... |
无法创建该 DNS 服务器的委派,因为无法找到有权威的父区域或者它未运行 Windows DNS ---------------------------------------- |
3. 安装完成后,HQDC2服务器自动重启。运行完成后,dcpromo.exe会修改无人值守文件,将其中的密码清空。
练习3:从安装介质创建一台DC
任务1(附加):将HQDC2降级
1. 在命令提示符下面运行:dcpromo
2. 根据向导完成降级操作。
3. 无人值守文件如下:
; DCPROMO unattend file (automatically generated by dcpromo) ; Usage: ; dcpromo.exe /unattend:C:\Users\administrator.CONTOSO\Desktop\a.txt ; ; You may need to fill in password fields prior to using the unattend file. ; [DCInstall] ; Demotion RetainDcMetadata=No IsLastDCInDomain=No ; Set AdministratorPassword to the correct value prior to using the unattend file AdministratorPassword= |
任务2:创建安装介质
1. 转到HQDC1。在命令提示符下面运行:
C:\Users\Administrator>ntdsutil Defragmentation Status (% complete) 0 10 20 30 40 50 60 70 80 90 100 正在复制注册表文件... C:\Users\Administrator> |
任务3:使用安装介质提升一台DC
1. 把HQDC1服务器的C:\IFM文件夹复制到HQDC2服务器,文件夹仍为C:\IFM 。
2. 转到HQDC2服务器,以本地管理员身份登录。
3. 在命令提示符下面运行:dcpromo
4. 根据向导完成安装。
5. 无人值守文件如下:
; DCPROMO unattend file (automatically generated by dcpromo) ; Usage: ; dcpromo.exe /unattend:C:\Users\Administrator.HQDC2\Desktop\ab.txt ; ; You may need to fill in password fields prior to using the unattend file. ; If you leave the values for "Password" and/or "DNSDelegationPassword" ; as "*", then you will be asked for credentials at runtime. ; [DCInstall] ; Replica DC promotion ReplicaOrNewDomain=Replica ReplicaDomainDNSName=contoso.com SiteName=Default-First-Site-Name InstallDNS=Yes ConfirmGc=Yes CreateDNSDelegation=No UserDomain=contoso.com UserName=contoso.com\administrator Password=* ReplicationSourcePath="C:\IFM" DatabasePath="C:\Windows\NTDS" LogPath="C:\Windows\NTDS" SYSVOLPath="C:\Windows\SYSVOL" ; Set SafeModeAdminPassword to the correct value prior to using the unattend file SafeModeAdminPassword= ; Run-time flags (optional) ; CriticalReplicationOnly=Yes ; RebootOnCompletion=Yes |
==========
实验12B:安装Server Core的DC
共2个练习:
练习1:将服务器加入域
练习2:提升为DC
练习1:将服务器加入域
任务1:为计算机修改IP地址和DNS
1. 运行以下命令:
C:\Users\Administrator>ipconfig Windows IP 配置
连接特定的 DNS 后缀 . . . . . . . : localdomain 隧道适配器 isatap.localdomain: 媒体状态 . . . . . . . . . . . . : 媒体已断开
C:\Users\Administrator>netsh interface ipv4 set address name="本地连接" source=static address =192.168.1.3 mask=255.255.255.0 gateway=192.168.1.254
C:\Users\Administrator>netsh interface ipv4 set dns name="本地连接" source=static address=192.168.1.1 primay
C:\Users\Administrator>ipconfig /all Windows IP 配置 主机名 . . . . . . . . . . . . . : WIN-CBSPR8S3TEF 以太网适配器 本地连接: 连接特定的 DNS 后缀 . . . . . . . : 隧道适配器 isatap.{06FA56D7-89EA-4ACD-9745-222EFC40FCB4}: 媒体状态 . . . . . . . . . . . . : 媒体已断开 |
任务2:修改计算机名
1. 运行以下命令:
C:\Users\Administrator>netdom renamecomputer %computername% /newname:HQDC3 需要重新启动计算机才能完成此操作。
C:\Users\Administrator>shutdown -r -t 0 |
任务3:将计算机加入域
1. 运行以下命令:
C:\Users\Administrator>netdom join %computername% /domain:contoso.com /UserD:contoso\Administrator /PasswordD:*
需要重新启动计算机才能完成此操作。
C:\Users\Administrator>shutdown -r -t 0 |
练习2:提升为DC
任务1:添加DNS角色
1. 在contoso\administrator帐户登录到HQDC3服务器。
2. 检查DNS-Server-Core-Role角色是否已经安装。运行以下命令:dclist
C:\Users\Administrator.CONTOSO>oclist 不支持使用 OCSetup.exe 添加或删除 Active Directory 角色。该操作可能导致服务器处于不稳定状态。请始终使用 DCPromo 安装或卸载 Active Directory。 =========================================================================== |
3. 安装角色。注意角色名称输入时对大小写敏感。
C:\Users\Administrator.CONTOSO>ocsetup DNS-Server-Core-Role
C:\Users\Administrator.CONTOSO>oclist 不支持使用 OCSetup.exe 添加或删除 Active Directory 角色。该操作可能导致服务器处于不稳定状态。请始终使用 DCPromo 安装或卸载 Active Directory。 =========================================================================== |
任务2:提升为DC
1. 在命令提示符下面运行:
C:\Users\Administrator.CONTOSO>dcpromo.exe /unattend /ReplicaOrNewDomain:Replica /ReplicaDomainDNSName:contoso.com /ConfirmGc:Yes /UserName:contoso.com\administrator /Password:* /SafeModeAdminPassword:Pa$$w0rd |
2. 安装完成后自动重启服务器。