KMS activation server and generate onekey activation script on website(一键生成KMS激活脚本)
  • php; 97.9%
  • PHP 2.1%
Find a file
lichenzero d485aa3269
Update README.md
firewalld rules
2019-10-14 10:15:26 +08:00
res 添加前端使用的文件,国外镜像不可用时可使用本地镜像 2019-06-13 15:02:32 +08:00
.gitattributes Create .gitattributes 2018-07-20 16:11:38 +08:00
.htaccess Apache重写规则 2019-01-18 20:06:15 +08:00
clean.php 优化生成脚本换行 2019-01-18 19:16:06 +08:00
index.html 修改前端UI,整合系统分类,并将密钥放在前端 2019-01-18 19:16:56 +08:00
index_en.html English Ver. 2019-01-18 20:18:13 +08:00
kms.php 修改前端UI,整合系统分类,并将密钥放在前端 2019-01-18 19:16:56 +08:00
kms.tar.gz KMS激活文件 2018-07-20 16:29:03 +08:00
README.md Update README.md 2019-10-14 10:15:26 +08:00

中文版

KMS激活服务器及在线生成一键激活脚本

安装

以CentOS系统为例

  1. 下载"kms.tar.gz"到服务器并解压
wget https://github.com/lichenzero/kms_server_webui/raw/master/kms.tar.gz
tar xzf kms.tar.gz
  1. 查看服务器CPU架构
cat /proc/cpuinfo
  1. 进入对应目录,运行激活服务器
  • 注意需要根据CPU架构选择对应二进制文件这里使用的是"vlmcsd-x64-musl-static"
cd binaries/Linux/intel/static
./vlmcsd-x64-musl-static
  • 如开启firewalld需要开放1688(TCP)端口
firewall-cmd --zone=public --add-port=1688/tcp --permanent #添加
firewall-cmd --reload   #重载生效

关闭

  1. 查看PID
ps -ef | grep vlmcsd-x64-musl-static    #请替换对应文件名
  1. 关闭
#19605替换为上个步骤显示的进程ID
kill -9 19605

激活

需求

  1. Web服务器Apache或Nginx
  2. PHP支持推荐7.0+
  3. 开启网址重写并设置规则

网址重写

  • Apache放置在根目录下.htaccess文件
RewriteEngine On 
RewriteBase / 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}.php -f 
RewriteRule ^(.+)$ /$1.php [L,QSA]
  • Nginx规则添加到对应的conf文件
location / {
  if (!-e $request_filename){
    rewrite ^(.+)$ /$1.php break;
  }
}

上传源码

  1. 打开kms.php修改KMS服务器地址

  2. 将index.html、kms.php、clean.php上传到网页目录Apache需要将.htaccess上传至网站根目录

  • 英文版请使用index_en.html作为index.html

完成Have a good time!

更新

  • 2019.1.18 将Keys放到网页前端使后端更加简洁。keys来自微软网站

English

KMS activation server and generate a key activation script Online

Setup

Take CentOS system as example

  1. Download"kms.tar.gz" to the sever and unzip
wget https://github.com/lichenzero/kms_server_webui/raw/master/kms.tar.gz
tar xzf kms.tar.gz
  1. Check sever CPU platform
cat /proc/cpuinfo
  1. Enter the corresponding catalog and run the activation server
  • Notice: You need to choose the corresponding binary files need to be selected according to the CPU platform, which is used here."vlmcsd-x64-musl-static"
cd binaries/Linux/intel/static
./vlmcsd-x64-musl-static
  • If you want to use the firewalld, you need to add 1688(TCP) port
firewall-cmd --zone=public --add-port=1688/tcp --permanent #add
firewall-cmd --reload   #reload to valid

Exit

  1. Check PID
ps -ef | grep vlmcsd-x64-musl-static    #please replace corresponding file name
  1. Exit
#19605 replace to the process shown in the previous stepID
kill -9 19605

Activation

Requirement

  1. Web severApache or Nginx
  2. PHP supportRecommend 7.0+
  3. Your URL rewrite and set the rules is available

Rewrite URL

  • Place Apache in the root directory .htaccess file
RewriteEngine On 
RewriteBase / 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}.php -f 
RewriteRule ^(.+)$ /$1.php [L,QSA]
  • Nginx rules add to corresponding conf files
location / {
  if (!-e $request_filename){
    rewrite ^(.+)$ /$1.php break;
  }
}

Upload source code

  1. Open kms.php and change KMS sever URL

  2. Upload index.html、kms.php、clean.php to web sever root directoryApache need to upload .htaccess to the web sever root directory

  • Englishe version please use index_en.html as index.html

FinishedHave a good time!

Update

  • 2019.1.18 Place Keys in the onstage to make the back-end more concise。keys FromMicrosoft website