Debian11为例 确保已安装python3 如需安装 apt update apt install python3 创建service nano /etc/systemd/system/my-http-server.service 写入配置 [Unit] Description=My HTTP Server After=network.target [Service] ExecStart=/usr/bin/python3 -m http.server 8080 WorkingDirectory=/path/to…