您的位置:首页 > 其它

精通Server Core系列之二 ---Server Core安装与基本配置

2014-11-12 15:54 507 查看
Server Core安装其实很简单,同前面的Windows Server 2008安装步骤一样,只要在选择安装操作系统这里,选择Server Core安装即可,这里使用Enterprise版本的服务器核心安装。如下图所示:
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://img1.51cto.com/attachment/201101/22/323260_1295678984TOJt.jpg" "558" height="497" />
其它安装步骤是一样的,这里也就不做介绍了,安装完毕之后,下图进入系统的界面,可以看到,只有一个CMD的管理工具,其它的界面都没有了。这样相对来说对服务器也算是减少压力了。
命令模式进入方法:按下Ctrl+Alt+Del键,进入任务管理器,运行新任务,输入cmd即可。
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image002[12]" border="0" alt="clip_image002[12]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678987xR2P.jpg" "558" height="443" />
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image004[5]" border="0" alt="clip_image004[5]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678989450S.jpg" "558" height="420" />
下面我们来进行一些基本的配置:
1. 设置管理员密码,使用如下命令
Net user Administrator [password]
中括号内部是要设置的密码,密码必须符合复杂性原则,即需要包含大写字母,小写字母,数字,特殊符号的三种组合;
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image006[4]" border="0" alt="clip_image006[4]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678989pjdX.jpg" "558" height="77" />
2. 配置网络连接:
netsh interface ipv4 show interface
查看网络连接情况,可以看到,有俩个网络接口,一个是本地连接,另一个是环路连接,前面的3和1就是俩个连接的标识号。后面配置网络连接的时候会用到。
为本地连接,标识号为3,配置IP地址:
Netsh interface ipv4 set address name=2 source=static
address=10.1.1.5 mask=255.255.255.0 gateway=10.50.0.131
手动设置DNS
Netsh interface ipv4 add dnsserver name=2 address=10.1.1.1 index=1
添加第一个IP地址
Netsh interface ipv4 add dnsserver name=2 address=10.50.0.131 index=2
添加第二个IP地址
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image008[4]" border="0" alt="clip_image008[4]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678990V95O.jpg" "557" height="236" />
我们来验证一下配置:
Ipconfig/all
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image010[4]" border="0" alt="clip_image010[4]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678991LqIZ.jpg" "558" height="291" />
当然也可以使用动态的方式,不过我们使用Server Core目的是方便管理,一般不使用DHCP获取IP地址。方法如下:idx表示网卡的标识号
设置网卡自动获得IP地址Netsh interface ipv4 set address name="idx" source=DHCP
动态指定DNS服务器地址netsh interface ipv4 set dnsserver name="<ID>" dhcp
3. 重命名计算机:将计算机名字命名为Hello,使用hostname查看结果,重启后才能看到。
Netdom renamecomputer %computername% /newname:Hello
或者使用下面的命令:
wmic computersystem where name="%computername%" rename name="Hello"
这里的%computername%表示目前的计算机的名称
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image012[4]" border="0" alt="clip_image012[4]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678992nONx.jpg" "558" height="233" />
4. 将计算机加入到网域:
Netdom join %computername% /domain:TEST /userd:SysAdmin /password:P@ssword
上面的将该计算机加入到TEST网域,sysadmin为TEST网域管理员,密码为管理员的密码。
从域中删除计算机
Netdom remove ComputerName /domain:DomainName /userd:UserName /passwordd: P@ssword
5. 配置自动更新:进入到windows\system32目录下
Cscript Scregedit.wsf /AU 4
可以看到AU 为4时启用自动更新,为1时禁用自动更新。
650) this.width=650;" style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" title="clip_image014[4]" border="0" alt="clip_image014[4]" src="http://img1.51cto.com/attachment/201101/22/323260_1295678993n5Me.jpg" "558" height="282" />
6. 重启或关闭计算机
Shutdown –r –t 0 (启动计算机)
Shutdwon –s –t 0(关闭计算机 –t设置关闭计算机的超时间,范围从0-600秒,默认为30秒)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: