KMS激活服务器及在线生成一键激活脚本
以CentOS系统为例
- 下载"kms.tar.gz"到服务器并解压
wget https://github.com/lichenzero/kms_server_webui/raw/master/kms.tar.gz
tar xzf kms.tar.gz
- 查看服务器CPU架构
cat /proc/cpuinfo
- 进入对应目录,运行激活服务器
- 注意:需要根据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 #重载生效
- 查看PID
ps -ef | grep vlmcsd-x64-musl-static #请替换对应文件名
- 关闭
#19605替换为上个步骤显示的进程ID
kill -9 19605
需求
- Web服务器(Apache或Nginx)
- PHP支持(推荐7.0+)
- 开启网址重写并设置规则
网址重写
- 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;
}
}
上传源码
- 英文版请使用index_en.html作为index.html
- 2019.1.18 将Keys放到网页前端,使后端更加简洁。keys来自微软网站
KMS activation server and generate a key activation script Online
Take CentOS system as example
- 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
- Check sever CPU platform
cat /proc/cpuinfo
- 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
- Check PID
ps -ef | grep vlmcsd-x64-musl-static #please replace corresponding file name
- Exit
#19605 replace to the process shown in the previous stepID
kill -9 19605
Requirement
- Web sever(Apache or Nginx)
- PHP support(Recommend 7.0+)
- 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
-
Upload index.html、kms.php、clean.php to web sever root directory(Apache need to upload .htaccess to the web sever root directory)
- Englishe version please use index_en.html as index.html
- 2019.1.18 Place Keys in the onstage to make the back-end more concise。keys FromMicrosoft website