WindowsServer2008 R2 Enterprise(ServerCore) + SqlServer2008 R2

操作系统:WindowsServer2008 R2 Enterprise(ServerCore)

数据库:SqlServer2008 R2 

1.修改hostname(未加入域)

netdom renamecomputer %computername% /NewName:SQLServer /reboot:0

2.重命名网络适配器

netsh interface set interface name="local area connection" newname="Internal"

3.修改ip

静态ip

netsh interface ipv4 set address name=Internal static 192.168.1.202 255.255.255.0 192.168.1.1

自动获取ip

netsh interface ipv4 set address name=Internal source=DHCP

4.修改dns

netsh interface ipv4 set dnsserver name=Internal static 61.139.2.69 primary

5.安装windows组件

Dism /online /enable-feature /featurename:NetFx2-ServerCore /featurename:ServerCore-WOW64 /featurename:NetFx3-ServerCore-WOW64 /featurename:NetFx2-ServerCore-WOW64 /featurename:NetFx3-ServerCore /featurename:MicrosoftWindowsPowerShell

6.安装SqlServer2008 R2

7.设置防火墙

netsh advfirewall firewall add rule name="SQL" dir=in action=allow protocol=tcp localport=1433

8.修改sqlserver tcp访问

net stop mssqlserver

regedit

编辑注册表 HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\TCP将Enabled 值设为 1

net start mssqlserver

9.设置共享文件夹(完全控制)

net share 共享名=文件夹名称 /grant:用户名,full

10.设置远程桌面

启用远程桌面 c:\windows\system32\cscript scregedit.wsf /ar 0









你可能感兴趣的:(环境)