【python】后台运行 django

注意 python 版本 python3,还有 manage.py 的路径。

在后台运行 django:

nohup python3 manage.py runserver 0.0.0.0:8000 &

ps:&可以不写,这样启动测试服务器后,就可以常驻后台运行了。

启动程序并输入到指定日志:

nohup python3 manage.py runserver 0.0.0.0:8000 > /home/stat.log  2&>1 &

查看后台某个进程:

ps -ef|grep "python"

杀死进程:

kill -9 34353

原文链接:https://blog.csdn.net/hellokandy/article/details/95944001

posted @ 2025-01-18 23:45  ReRound  阅读(22)  评论(0)    收藏  举报