后台启动项目
nohup 命令
用途:不挂断地运行命令。
nohup [具体的command] &
实例:
nohup python manage.py runserver 0.0.0.0:1234
Linux运行脚本
vi run.sh
填入自动运行的内容: nohup python manage.py runserver 0.0.0.0:1234
chmod +x run.sh
./run.sh
一般 .sh 的直接添加x(可执行属性) chmod +x xxx.sh 然后./xxx.sh就可以了
查找某端口的linux 进程
此处查找了 1234 端口的进程
ps -ef|grep 1234
根据进程id 删除某进程
此处删除了进程 id 为 24945 的进程。
kill -9 24945