0%

CentOS搭建KMS服务

依赖工具

mircropython安装

参考README.md里关于The Unix version的内容

  1. 下载最新tag代码
1
2
3
4
git clone https://github.com/micropython/micropython.git
cd micropython
git tag
git checkout -b tag-1.9.3 v1.9.3
  1. 安装额外依赖
1
2
yum groupinstall "Development tools"
yum install libffi-devel
  1. 编译
1
2
3
4
5
git submodule update --init
cd ports/unix
make deplibs
make axtls
make
  1. 安装
1
2
./micropython
ls /usr/sbin/mkfs -l

~/.bash_profile中添加环境变量

1
2
MICROPYTHON_HOME=/root/kms/micropython/ports/unix
PATH=$PATH:$HOME/bin:$MICROPYTHON_HOME

py-kms 安装

  1. 安装
1
2
3
cd py-kms/
micropython -m upip install -r requirements-micropython.txt
chomod +x *.sh
  1. 启动
1
python server.py
  1. 测试
1
python client.py 0.0.0.0 1688

问题定位

1
2
3
4
$ micropython -m upip install -r requirements-micropython.txt
Installing to: /root/.micropython/lib/
Warning: pypi.python.org SSL certificate is not validated
Error installing 'micropython-argparse': Package not found, packages may be partially installed

解决:更新到v1.9.4