一、前期准備:
1、vlmcsd工具,官網可查資料:https://github.com/Wind4/vlmcsd/releases
2、CentOS 7.8.2003 (Core) 鏡像官網自取:https://www.centos.org/download/
二、開始配置KMS激活服務器:
1、 安裝vlmcsd:
wget https://github.com/Wind4/vlmcsd/releases/download/svn1111/binaries.tar.gz tar -xvf binaries.tar.gz cd binaries\Linux\Intel\static\ #安裝linux版本instel系列static目錄下的程序 mkdir /opt/kms #建立自己的程序目錄 cp vlmcsd-x64-musl-static /opt/kms/ #復制程序 chmod 777 /opt/kms/vlmcsd-x64-musl-static #賦權限,+X也可以 /opt/kms/vlmcsd-x64-musl-static #運行一下程序 ,沒有報錯即安裝成功 |
2、 開防火牆端口1688:
firewall-cmd --zone=public --add-port=1688/tcp –permanent firewall-cmd –reload firewall-cmd –zone=public –list-ports #查看1688是否成功加入防火牆開放端口 |
找一台電腦telnet192.168.8.114 1688測試端口服務是否正常開通
3、 配置成系統自啟動:
vim /usr/lib/systemd/system/vlmcsd-1688.service #創建自己的服務文件
[Unit] Description=Microsoft Key Management System After=network.target After=network-online.target Wants=network-online.target
[Service] Type=oneshot ExecStart= /opt/kms/vlmcsd-x64-musl-static RemainAfterExit=yes LimitNOFILE=65536
[Install] WantedBy=multi-user.target |
systemctl enable /usr/lib/systemd/system/vlmcsd-1688.service#安裝服務到系統
reboot
4、 檢查系統自啟動
systemctl status #查詢所有系統服務狀態
systemctl status vlmcsd-1688.service #指定查詢某個系統服務狀態
ps -ef | grep vlmcsd-1688 #查詢服務進程
ss -anltp | grep 1688 #查詢端口狀態
systemctl stop vlmcsd-1688.service
systemctl restart vlmcsd-1688.service
三、Windows系列激活命令
slmgr -upk #卸載密鑰 slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx #配置系統序列號 slmgr /skms 10.160.1.201 #配置KMS服務器地址 slmgr /ato #激活系統 slmgr /xpr #查看系統激活到期時間 slmgr /dlv #查看授權詳細信息 |
四、Office系列激活命令
1、 office2019專業增強版激活方式:
以下內容復制到txt,保存成bat,管理員權限運行即可,激活服務器地址自行更換
@echo off (cd /d "%~dp0")&&(NET FILE||(powershell start-process -FilePath '%0' -verb runas)&&(exit /B)) >NUL 2>&1 title Office 2019 Activator r/Piracy echo Converting... & mode 40,25 (if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul) cscript //nologo ospp.vbs /unpkey:6MWKP >nul&cscript //nologo ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul&set i=1 :server if %i%==1 set KMS_Sev=192.168.8.114 if %i%==2 set KMS_Sev=192.168.8.114 if %i%==3 set KMS_Sev=192.168.8.114 cscript //nologo ospp.vbs /sethst:%KMS_Sev% >nul echo %KMS_Sev% & echo Activating... cscript //nologo ospp.vbs /act | find /i "successful" && (echo Complete) || (echo Trying another KMS Server & set /a i+=1 & goto server) pause >nul exit |
2、 office2010專業版激活命令:
以下內容復制到txt,保存成bat,管理員權限運行即可,激活服務器地址自行更換
@echo off mode con cols=75 lines=25 title=KMS激活工具 setlocal EnableDelayedExpansion&color 70 & cd /d "%~dp0" %1 %2 ver|find "5.">nul&&goto :start mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :start","","runas",1)(window.close)&goto :eof
:start set KMS_Sev=192.168.8.114 cls echo Office2010、2013、2016自動激活KMS工具 echo echo echo 這個命令, echo 正在檢查本機網絡情況……......耐心等待 echo. ping 192.168.8.114 | find "超時" > NUL && goto fail ping 192.168.8.114 | find "目標主機" > NUL && goto fail echo 本機網絡良好……
goto office
goto office :office echo 檢查安裝的office…… call :GetOfficePath 14 Office2010 call :ActOffice 14 Office2010 call :GetOfficePath 15 Office2013 call :ActOffice 15 Office2013 if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" set _Office16Path=%ProgramFiles%\Microsoft Office\Office16 if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" set _Office16Path=%ProgramFiles(x86)%\Microsoft Office\Office16 if DEFINED _Office16Path (echo.&echo 已發現 Office2016 call :ActOffice 16 Office2016 ) else (echo.&echo 未發現 Office2016)
echo.&pause exit
:ActOffice if DEFINED _Office%1Path ( cd /d "!_Office%1Path!" if %1 EQU 16 call :Licens16 echo.&echo 嘗試激活 %2 ...&echo. cscript //nologo ospp.vbs /sethst:%KMS_Sev% >nul cscript //nologo ospp.vbs /act | find /i "successful" && ( echo.&echo ***** %2 激活成功 ***** & echo.) || (echo.&echo ***** %2 激活失敗 ***** & echo.) ) cd /d "%~dp0" goto :EOF
:GetOfficePath echo.&echo 正在檢測 %2 系列產品的安裝路徑... set _Office%1Path= set _Reg32=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot set _Reg64=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot reg query "%_Reg32%" /v "Path" > nul 2>&1 && FOR /F "tokens=2*" %%a IN ('reg query "%_Reg32%" /v "Path"') do SET "_OfficePath1=%%b" reg query "%_Reg64%" /v "Path" > nul 2>&1 && FOR /F "tokens=2*" %%a IN ('reg query "%_Reg64%" /v "Path"') do SET "_OfficePath2=%%b" if DEFINED _OfficePath1 (if exist "%_OfficePath1%ospp.vbs" set _Office%1Path=!_OfficePath1!) if DEFINED _OfficePath2 (if exist "%_OfficePath2%ospp.vbs" set _Office%1Path=!_OfficePath2!) set _OfficePath1= set _OfficePath2= if DEFINED _Office%1Path (echo.&echo 已發現 %2) else (echo.&echo 未發現 %2) goto :EOF
:Licens16 for /f %%x in ('dir /b ..\root\Licenses16\project???vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\standardvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\project???vl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\standardvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul cscript ospp.vbs /inpkey:NYH39-6GMXT-T39D4-WVXY2-D69YY >nul cscript ospp.vbs /inpkey:7WHWN-4T7MP-G96JF-G33KR-W8GF4 >nul cscript ospp.vbs /inpkey:RBWW7-NTJD4-FFK2C-TDJ7V-4C2QP >nul cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 >nul cscript ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT >nul cscript ospp.vbs /inpkey:PD3PC-RHNGV-FXJ29-8JK7D-RJRJK >nul goto :EOF
exit
:fail cls echo 無法連接到服務器…… pause |
Office Professional Plus 2010 密鑰:(office專業版批量零售版)
J33GT-XVVYK-VHBBC-VY7FB-MTQ4C
GRPWH-7CDHQ-K3G3C-JH2KX-C88H8
6CCCX-Y93YP-3WQGT-YCKFW-QTTT7
6QFDX-PYH2G-PPYFD-C7RJM-BBKQ8
BDD3G-XM7FB-BD2HM-YK63V-VQFDK
VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
DBXYD-TF477-46YM4-W74MH-6YDQ8
VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
7X9XM-HGMB4-TMGHY-9VDQV-R8CGB
HV7BJ-R6GCT-VHBXD-YH4FD-GTH2T