Install KMS Service Script with One Click

[ad_1]
KMS is the abbreviation of Key Management System, which is also the key management system. The KMS mentioned here is undoubtedly the KMS used to activate VOL versions of Windows and Office. You can often see KMS server addresses provided by others on the Internet, so have you ever thought about setting up such a service yourself?Such a service already exists on Githubopen source codeAchieved.
This article is based on this open source code and developed a one-click installation script for the KMS service suitable for the three major Linux distributions.
This script is applicable to the environment
System support: CentOS 6+, Debian 7+, Ubuntu 12+
Virtual technology: any
Memory requirements: ≥128M
Date: October 25, 2018
About this script
1. This script is suitable for the three major Linux distributions, and other versions are not supported.
2. After the KMS service is installed, it will start automatically at boot.
3. Logs are recorded by default, and the logs are located in /var/log/vlmcsd.log.
Instructions
Log in as the root user and run the following command:
wget --no-check-certificate https://github.com/teddysun/across/raw/master/kms.sh && chmod +x kms.sh && ./kms.sh
After the installation is complete, enter the following command to view the listening status of port number 1688
netstat -nxtlp | grep 1688
The return value is similar to the following, which means OK:
tcp 0 0 0.0.0.0:1688 0.0.0.0:* LISTEN 3200/vlmcsd tcp 0 0 :::1688 :::* LISTEN 3200/vlmcsd
After the installation of this script is completed, the KMS service will be added to start automatically at boot.
Use command:
Start: /etc/init.d/kms start
Stop: /etc/init.d/kms stop
Restart: /etc/init.d/kms restart
Status: /etc/init.d/kms status
Uninstall method:
Log in as root user and run the following command:
./kms.sh uninstall
How to use KMS service
KMS service for online activation of VOL versions of Windows and Office.
The prerequisite for activation is that your system is a volume licensing version, that is, the VL version. Generally, the enterprise version is the VL version. The VL version of the image generally has a built-in GVLK key for KMS activation.
The VL versions of the products included in the list below or the products that can use keys to enter the KMS channel all support KMS activation.
Office 2019 & Office 2016:https://docs.microsoft.com/en-us/DeployOffice/vlactivation/gvlks
Office 2013:https://technet.microsoft.com/zh-cn/library/dn385360.aspx
Office 2010:https://technet.microsoft.com/zh-cn/library/ee624355(v=office.14).aspx
Windows:https://docs.microsoft.com/zh-cn/windows-server/get-started/kmsclientkeys
Run cmd with administrator privileges to view the system version. The command is as follows:
wmic os get caption
Run cmd with administrator privileges to install the key obtained from the above list. The command is as follows:
slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Run cmd with administrator privileges and set the KMS server address to your own IP or domain name, followed by the port number (:1688). The command is as follows:
slmgr /skms Your IP or Domain:1688
Notice:This is what this script does. When your KMS service is started, this can be set to your own KMS server address.
Use administrator privileges to run cmd to manually activate the system. The command is as follows:
slmgr /ato
Regarding the activation of Office, it must be the VOL version, otherwise it cannot be activated.
Find your Office installation directory, the 32-bit default is generally C:\Program Files (x86)\Microsoft Office\Office16
The 64-bit default is generally C:\Program Files\Microsoft Office\Office16
Office16 is Office 2016, Office15 is Office 2013, and Office14 is Office 2010.
Open the directory mentioned above, there should be an OSPP.VBS file.
Run cmd with administrator privileges to enter the Office directory. The command is as follows:
cd "C:\Program Files (x86)\Microsoft Office\Office16"
Run cmd with administrator privileges to register the KMS server address:
cscript ospp.vbs /sethst:Your IP or Domain
Use administrator privileges to run cmd to manually activate Office. The command is as follows:
cscript ospp.vbs /act
Notice: Activated via KMS, its validity period is only 180 days.
The system will automatically request renewal from the KMS server every once in a while. Please ensure that your own KMS service is running normally.
Solutions to common mistakes
If you encounter an error during execution, please check according to the following steps:
1. Is your KMS server down?
2. Is your KMS service started normally?
3. Is your system or Office a batch VL version?
4. Has the Key been modified in your system or Office or has the GVLK Key not been installed?
5. Are you running cmd with administrator rights?
6. Is your network connection normal?
7. Is your local DNS resolution normal?
8. If you have eliminated the above countermeasures, please search for the cause yourself based on the error prompt code.
Change log
October 25, 2018:Correct the git link of vlmcsd, that is, each new installation will be the latest official version. Note: If you want to upgrade the version, you need to stop the kms service first, delete the /usr/bin/vlmcsd file, and then re-download the latest script for installation.