使用vlmcsd搭建KMS服务器激活环境
操作系统环境CentOS6.6
vlmcsd发布地址:
http://forums.mydigitallife.info/threads/50234-Emulated-KMS-Servers-on-non-Windows-platforms
1.找到二进制和源码下载
下载地址: http://rghost.net/6G8wYxwnX
解压密码2015
2.解压
解压后找到vlmcsd-svn812-2015-08-30-Hotbird64\binaries\Linux\intel\glibc文件夹,找到该文件夹下的vlmcsd-x86-glibc,如果是64位则是vlmcsd-x64-glibc,其他系统自行选择,服务端主要是找vlmcsd这个程序。
3.复制文件
在/usr/local新建vlmcsd,拷贝vlmcsd-x86-glibc到该文件夹下
mkdir /usr/local/vlmcsd
cp vlmcsd-x86-glibc /usr/local/vlmcsd/
给vlmcsd-x86-glibc加入执行权限,并改名为vlmscd
cd /usr/local/vlmcsd/
chmod u+x vlmcsd-x86-glibc
mv vlmcsd-x86-glibc vlmcsd
4.测试启动
执行命令
./vlmcsd
查看执行的进程
ps aux|grep vlmcsd
结果
root 8227 0.0 0.0 2364 240 ? Ss 11:41 0:00 ./vlmcsd
root 8279 0.0 0.0 2280 552 pts/1 S+ 11:42 0:00 grep vlmcsd
说明进程已经启动
kill pid可以关闭进程
如果有其他端口占用1688,会报如下错误
Warning: 0.0.0.0:1688: Address already in use
Fatal: Could not listen on any socket.
找出占用的进程关闭即可,可以使用lsof命令和netstat命令
上文中supervisor关闭命令为
supervisorctl shutdown
5.开机自启
把命令加到/etc/rc.local或/etc/rc.d/rc.local,并加上可执行权限,为了查看日志,加上vlmcsd -l /var/log/vlmcsd.log
echo “/usr/local/vlmcsd/vlmcsd -l /var/log/vlmcsd.log > /dev/null 2>&1” >> /etc/rc.local
chmod +x /etc/rc.local
注意:CentOS 7中系统启动管理已经由传统的Linux SysV init改为systemd,配置方法跟原来的不一样
6.重启服务器
执行命令
reboot
7.客户端测试
windows找到vlmcsd-svn812-2015-08-30-Hotbird64\binaries\Windows\intel目录下的vlmcs-Windows-x86.exe对于64位的找vlmcs-Windows-x64.exe
将其改名为vlmcs.exe
cd跳转到改目录下
执行命令
vlmcs.exe -v -l 3 wwwb.vvvtimes.com
-v输出详细信息
-l 3表示发送Windows Server 2008 Datacenter的激活请求,具体版本对应列表可以通过vlmcs.exe -x查看
wwwb.vvvtimes.com表示KMS服务器的域名
结果如下
Request Parameters
==================
Protocol version : 4.0
Client is a virtual machine : No
Licensing status : 2 (OOB grace)
Remaining time (0 = forever) : 43200 minutes
Application ID : 55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
Activation ID (Product) : 68b6e220-cf09-466b-92d3-45cd964b9509 (Windows Server 2008 Datacenter)
Key Management Service ID : 8a21fdf3-cbc5-44eb-83f3-fe284e6680a7 (Windows 2008 C)
Client machine ID : 53532ed6-0511-4848-ad75-40e3944c3b99
Previous client machine ID : 00000000-0000-0000-0000-000000000000
Client request timestamp (UTC) : 2015-12-16 05:39:30
Workstation name : ftp.htc.info
N count policy (minimum clients): 5
Connecting to 1.2.3.4:1688 … successful
Performing RPC bind …
… NDR64 … BTFN … NDR32 … successful
Sending activation request (KMS V4) 1 of 1
Response from KMS server
========================
Size of KMS Response : 160 (0xa0)
Protocol version : 4.0
KMS host extended PID : 03612-00206-183-962764-03-4108-10240.0000-2582015
Client machine ID : 53532ed6-0511-4848-ad75-40e3944c3b99
Client request timestamp (UTC) : 2015-12-16 05:39:30
KMS host current active clients : 10
Renewal interval policy : 10080
Activation interval policy : 120
py-kms搭建的服务器响应的结果如下
Request Parameters
==================
Protocol version : 4.0
Client is a virtual machine : No
Licensing status : 2 (OOB grace)
Remaining time (0 = forever) : 43200 minutes
Application ID : 55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
Activation ID (Product) : 68b6e220-cf09-466b-92d3-45cd964b9509 (Windows Server 2008 Datacenter)
Key Management Service ID : 8a21fdf3-cbc5-44eb-83f3-fe284e6680a7 (Windows 2008 C)
Client machine ID : 2955b0ed-37e4-4689-b9de-9e5f1c3784c0
Previous client machine ID : 00000000-0000-0000-0000-000000000000
Client request timestamp (UTC) : 2015-12-16 05:40:09
Workstation name : mx1.acer.pl
N count policy (minimum clients): 5
Connecting to 1.2.3.4:1688 … successful
Performing RPC bind …
… NDR32 … BTFN … successful
Sending activation request (KMS V4)
Warning: RPC stub size is 172, should be 176 (probably incorrect padding)
1 of 1
Response from KMS server
========================
Size of KMS Response : 158 (0x9e)
Protocol version : 4.0
KMS host extended PID : 05426-00206-152-263095-03-1033-9200.0000-2222013
Client machine ID : 2955b0ed-37e4-4689-b9de-9e5f1c3784c0
Client request timestamp (UTC) : 2015-12-16 05:40:09
KMS host current active clients : 26
Renewal interval policy : 10080
Activation interval policy : 120
附:虚拟机搭建
在vlmcsd-svn812-2015-08-30-Hotbird64中找到floppy144.vfd将其改名为floppy144.flp或floppy144.img,然后用vmware加载为软盘就能运行了。启动后直接就能用了