使用以下命令 nohup php swoole_server.php > /dev/null 2>&1 & swoole_server.php就是你的swoole文件 如果要关闭使用kill命令执行你对应的pid进程