IT:如何在Server 2008 R2 Core上安装和管理Active Directory

WindowsActiveDIrectory1

Installing Active Directory on Server Core is not a task that can be achieved using  the Optional Component Setup tool–instead we actually have to use DCPROMO from the command line. Here’s how to do it.

在服务器核心上安装Active Directory并不是使用“可选组件设置”工具可以完成的任务-而是实际上我们必须从命令行使用DCPROMO。 这是操作方法。

Note: this is part of our ongoing series teaching IT administration basics, and might not apply to everybody.

注意:这是我们正在进行的系列教学IT管理基础知识的一部分,可能并不适用于所有人。

Before we install Active Directory there are a few things that need to be done first–we need to set static IP information for the network adapter as well as change the name of our server. This all needs to be done from the command line, so lets take a look at how to go about doing these tasks.

在安装Active Directory之前,首先需要完成几件事-我们需要为网络适配器设置静态IP信息以及更改服务器的名称。 所有这些都需要从命令行完成,因此让我们看一下如何去完成这些任务。

设置静态IP地址 (Setting a Static IP Address)

Active Directory requires that the Server has a static IP assigned, so we need to get a list of the network adapters attached to this server. To do this we use a netsh command:

Active Directory要求为服务器分配一个静态IP,因此我们需要获取连接到该服务器的网络适配器的列表。 为此,我们使用netsh命令:

netsh interface ipv4 show interface

netsh界面ipv4显示界面

sshot-1

Now that you can see the names of all the network cards in your machine, you can change the settings for a specific card. To change the IP address we again use the netsh command:

现在您可以看到计算机中所有网卡的名称,可以更改特定网卡的设置。 要更改IP地址,我们再次使用netsh命令:

netsh interface ipv4 set address name=”Local Area Connection” source=”static” address=”10.10.10.1″ mask=”255.255.255.0″ gateway=”10.10.10.254″

netsh接口ipv4设置地址名称=“本地连接”源=“静态”地址=“ 10.10.10.1”掩码=“ 255.255.255.0”网关=“ 10.10.10.254”

Where the following values should be substituted:

应替换以下值的地方:

  • Name – Name of the interface that you wish to change the settings for

    名称–您希望更改其设置的接口的名称
  • Address – IP address that you want to assign the interface

    地址–您要分配接口的IP地址
  • Mask – The subnet mask for the interface

    掩码–接口的子网掩码
  • Gateway – The default gateway for the interface

    网关–接口的默认网关
sshot-15

To set up DNS information for the server, we run the following command:

要为服务器设置DNS信息,我们运行以下命令:

netsh interface ipv4 add dnsservers name=”Local Area Connection” address=”127.0.0.1″ index=1 validate=no

netsh接口ipv4添加dnsservers名称=“本地连接”地址=“ 127.0.0.1”索引= 1 validate =否

Where the following values should be substituted:

应替换以下值的地方:

  • Name – Name of the interface that you wish to change the settings for

    名称–您希望更改其设置的接口的名称
  • Address – IP address of the DNS Server (we are using the loopback address)

    地址-DNS服务器的IP地址(我们正在使用回送地址)
  • Index – Specify 1 to set the Primary DNS Server, Specify 2 to set the Secondary DNS Server

    索引–指定1设置主DNS服务器,指定2设置辅助DNS服务器
sshot-16

更改计算机名称 (Changing The Computer Name)

We would also want to rename the server before promoting it to a domain controller, to do that we use the netdom command. You should substitute DC1 in the following command, to whatever you want to call your server.

我们还想在将服务器提升为域控制器之前重命名服务器,为此我们要使用netdom命令。 您应该在以下命令中将DC1替换为您要调用的服务器。

netdom renamecomputer %computername% /newname:DC1

netdom重命名计算机%computername%/ newname:DC1

sshot-17

For the changes to take effect you need to reboot your PC, to do this from the command line run the following command:

为了使更改生效,您需要重新启动PC,要从命令行执行以下命令,请执行以下操作:

shutdown /r /t 0

关机/ r / t 0

安装活动目录 (Installing Active Directory)

There is a couple of ways to install Active Directory on a Server Core, however we will go with the answer file method. So I have created an answer file (seen in the screenshot below) this is a basic answer file but if you have special needs you should see  this TechNet article which will give you a full list of parameters. You can create a file exactly like this in notepad and  just call it DCPROMO.txt

有两种方法可以在服务器核心上安装Active Directory,但是我们将使用答案文件方法。 因此,我已经创建了一个应答文件(如下面的屏幕快照所示),这是一个基本的应答文件,但是如果您有特殊需要,则应该参阅此TechNet文章 ,它将为您提供完整的参数列表。 您可以在记事本中创建一个完全像这样的文件,然后将其命名为DCPROMO.txt

sshot-18

So what does this do:

那么这是怎么做的:

  • Creates a new domain at the root of a new forest called howtogeek.local

    在名为howtogeek.local的新林的根目录下创建一个新域
  • Sets the forest functional level to Server 2008 R2

    将林功能级别设置为Server 2008 R2
  • Installs DNS with an Active Directory Integrated Zone

    使用Active Directory集成区域安装DNS
  • Makes this sever a Global Catalog

    使此服务器成为全球目录
  • Sets the AD Restore Mode password to Pa$$w0rd

    将AD Restore Mode密码设置为Pa $$ w0rd
  • Reboots on completion

    完成重启

You use the answer files by running the following command:

您可以通过运行以下命令来使用应答文件:

dcpromo :/unattend:”path to answer file”

dcpromo:/无人参与:“答案文件的路径”

sshot-19

This will kick off the installation of Active Directory and reboot on completion.

这将启动Active Directory的安装,并在完成后重新启动。

sshot-20

That’s all there is to installing Active Directory on Server Core.

这就是在Server Core上安装Active Directory的全部内容。

管理活动目录 (Managing Active Directory)

The easiest way to manage a Server Core Server is to use the RSAT (Remote Server Administrator Tools) which allows you to load up MMC consoles on any Windows 7 machine and connect to an instance of the role running on the server. You can grab the RSAT from here. The installation is in the form of a Windows Update, once installed open the Turn Windows features on or off option from the Programs and Features section in Control Panel. You need to add the AD DS Snap-ins and Command-line tools, check the screenshot to see how to get there.

管理服务器核心服务器的最简单方法是使用RSAT(远程服务器管理员工具),该工具使您可以在任何Windows 7计算机上加载MMC控制台,并连接到服务器上运行的角色的实例。 您可以从这里获取RSAT。 安装采用Windows Update的形式,安装后,打开“控制面板”中“程序和功能”部分的“打开或关闭Windows功能”选项。 您需要添加AD DS管理单元和命令行工具,检查屏幕快照以了解如何到达那里。

sshot-21

Once the components have been added, you can open a run box by hitting the Windows + R key combination and type MMC before hitting enter.

添加完组件后,您可以通过按Windows + R组合键打开运行框,并在按Enter之前键入MMC。

sshot-22

This will open a blank MMC console, click on file and then choose Add/Remove Snap-in..

这将打开一个空白的MMC控制台,单击文件,然后选择“添加/删除管理单元”。

sshot-23

Choose Active Directory Users and Computers from the list and hit the Add button.

从列表中选择“ Active Directory用户和计算机”,然后单击“添加”按钮。

sshot-24

If you are logged in with a Domain Admin account, it will automatically connect to the Active Directory instance, if not you will have to connect to it manually.

如果使用Domain Admin帐户登录,它将自动连接到Active Directory实例,如果没有,则必须手动连接到该实例。

sshot-25

翻译自: https://www.howtogeek.com/99335/it-how-to-install-and-manage-active-directory-on-server-2008-r2-core/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值