averainy's Blog

averainy

05 May 2022

Create Kms Service in Linux

I create a kms service for the lan computers in a linux server recently,so record the steps

  1. download kms source and compile it
cd vlmcsd-master  
make
  1. create a systemd service file /usr/lib/systemd/system/kms.service
[Unit]
Description=KMS Service.
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=forking
PIDFile=/var/run/kms.pid
ExecStart=/home/admin/kms/vlmcsd-master/bin/vlmcsd -p /var/run/kms.pid
ExecReload=/bin/kill -s HUP ${MAINPID}
ExecStop=/bin/kill -s TERM ${MAINPID}
Restart=always
[Install]
WantedBy=multi-user.target
  1. start kms service
systemctl start kms
systemctl enable kms