Docker自建KMS服务器教程
一、安装Docker
1.安装Docker
官方源:
curl -fsSL https://get.docker.com | bash
阿里云(aliyun.com)源:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
此脚本支持Centos6,Centos7,Ubuntu16.04,Ubuntu18.04,Debian9,Debian10。其他版本未测试不代表不支持。
2.相关配置
(1)配置Docker开机自启:
systemctl enable docker
systemctl start docker
(2)配置Docker用户组(可选)
groupadd docker
usermod -aG docker $USER
3.配置阿里云镜像加速:
(1)获取镜像加速链接:打开阿里云镜像加速地址(https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors)复制加速链接。 链接格式为"https://xxxxx.mirror.aliyuncs.com" 其中xxxxx字符替换为自己的。
(2)配置加速镜像源
vi /etc/docker/daemon.json
将下方代码复制进上述.json文件(xxxxx请替换),并保存(Ecs→:wq→回车)
{
"registry-mirrors": ["https://xxxxx.mirror.aliyuncs.com"]
}
亦可使用其他源:
中科大源:http://docker.mirrors.ustc.edu.cn
163源:http://hub-mirror.c.163.com
4.重新加载docker配置
sudo systemctl daemon-reload
sudo systemctl restart docker
二、建设KMS
原作者Github:https://github.com/SystemRage/py-kms
SSH连接服务器,执行以下命令
docker run -d --name py-kms --restart always -p 1688:1688 pykmsorg/py-kms
##插入:非Docker版:bash <(curl -sL haoduck.com/sh/docker.sh)
注意:服务器需开放1688端口,KMS非http/https协议
支持激活的系统如下(仅VL版):Windows Vista
Windows 7
Windows 8
Windows 8.1
Windows 10 ( 1511 / 1607 / 1703 / 1709 / 1803 / 1809 )
Windows 10 ( 1903 / 1909 / 20H1 )
Windows Server 2008
Windows Server 2008 R2
Windows Server 2012
Windows Server 2012 R2
Windows Server 2016
Windows Server 2019
Microsoft Office 2010 ( Volume License )
Microsoft Office 2013 ( Volume License )
Microsoft Office 2016 ( Volume License )
Microsoft Office 2019 ( Volume License )
三、使用
slmgr /skms 服务器IP或域名
slmgr /ato
End...
内容转载自:hostloc.com haoduck.com haoduck.com ,对原文内容有删减和修改。