KMS服务器

1. 一键安装包(本脚本安装完成后,会将 KMS 服务加入开机自启动)
wget --no-check-certificate https://github.com/teddysun/across/raw/master/kms.sh && chmod +x kms.sh && ./kms.sh

如果是国内的服务器可能无法下载成功,尝试以下命令

wget --no-check-certificate -O kms.sh https://pa.ci/download/shell/kms.sh && chmod +x kms.sh && bash kms.sh

安装完成如下所示
在这里插入图片描述

2.安装完成后,输入以下命令查看端口号 1688 的监听情况
netstat -nxtlp | grep 1688
    返回值类似于如下这样就表示 OK 了:
    tcp  0   0 0.0.0.0:1688          0.0.0.0:*                  LISTEN      3200/vlmcsd         
    tcp  0    0 :::1688            :::*                        LISTEN      3200/vlmcsd 
3.使用方法

启动:bash kms.sh start
停止:bash kms.sh stop
重启:bash kms.sh restart
状态:bash kms.sh status
卸载方法:bash kms.sh uninstall

也可以这么写
启动:/etc/init.d/kms start
停止:/etc/init.d/kms stop
重启:/etc/init.d/kms restart
状态:/etc/init.d/kms status
卸载方法:./kms.sh uninstall

4.激活office
(1)cscript ospp.vbs /sethst:VPS的IP或者绑定的域名
/*
    例如 windows下 进入D:\Program Files\Microsoft Office\Office16
    cscript ospp.vbs /sethst:144.168.62.230

    D:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /sethst:xxx.xxx.xxx.xxx
    Microsoft (R) Windows Script Host Version 5.812
    版权所有(C) Microsoft Corporation。保留所有权利。
    ---Processing--------------------------
    ---------------------------------------
    Successfully applied setting.
    ---------------------------------------
    ---Exiting-----------------------------
*/
(2)cscript ospp.vbs /act  /*立即激活*/
/*
    D:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /act
    Microsoft (R) Windows Script Host Version 5.812
    版权所有(C) Microsoft Corporation。保留所有权利。

    ---Processing--------------------------
    ---------------------------------------
    Installed product key detected - attempting to activate the following product:
    SKU ID: d450596f-894d-49e0-966a-fd39ed4c4c64
    LICENSE NAME: Office 16, Office16ProPlusVL_KMS_Client edition
    LICENSE DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel
    Last 5 characters of installed product key: WFG99
    <Product activation successful>
    ---------------------------------------
    ---------------------------------------
    ---Exiting-----------------------------
*/
(3)cscript ospp.vbs /dstatus /*查看状态*/
/*
    REMAINING GRACE: 180 days  (259200 minute(s) before expiring)
    Last 5 characters of installed product key: WFG99
    Activation Type Configuration: ALL
    DNS auto-discovery: KMS name not available
    KMS machine registry override defined: xxx.xxx.xxx.xxx:1688
    Activation Interval: 120 minutes
    Renewal Interval: 10080 minutes
    KMS host caching: Enabled
*/
如果出现错误:

(1)/* -bash: netstat: command not found*/

yum install net-tools
常见问题
  1. 如果非vps,如腾讯云或者阿里云必须开放1688端口
  2. 安装KMS脚本需要挂载VPN才能有
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值