适用于已安装宝塔面板的 Linux 服务器 (CentOS 7+ / Rocky / AlmaLinux / Debian 10+ / Ubuntu 20+)。 脚本将自动完成: 系统依赖安装 · Python 虚拟环境 · 项目依赖 · systemd 服务 · 端口放行。
curl -fsSL http://hmm.mkdu.cn/install.sh -o /tmp/install.sh && bash /tmp/install.sh
curl -fsSL http://hmm.mkdu.cn/install.sh -o /tmp/install.sh && bash /tmp/install.sh
systemctl start auth-server # 启动 systemctl stop auth-server # 停止 systemctl restart auth-server # 重启 systemctl status auth-server # 状态 tail -f /www/wwwroot/auth/run.log # 实时日志
可在执行命令前通过环境变量覆盖默认配置:
APP_PORT=9000 \ INSTALL_DIR=/www/wwwroot/myauth \ ADMIN_USER=root ADMIN_PASS=YourStrongPass \ bash /tmp/install.sh
APP_PORT — 监听端口,默认 8000INSTALL_DIR — 安装目录,默认 /www/wwwroot/authADMIN_USER / ADMIN_PASS — 初始管理员账号密码PROJECT_URL — 远程项目压缩包 URL (本机已存在源码时可省略)