一、部署 Django 到远程 Linux 服务器

利用 xshell 通过 ssh 连接到 Linux服务器,常规的启动命令是

python3 manage.py runserver 0.0.0.0:

但是,关闭 xshell 后,就访问不了 Django 了。

这时候需要使用 nohup 命令启动(概念:如果你正在运行一个进程,而且你觉得在退出帐户时该进程还不会结束,那么可以使用nohup命令。该命令可以在你退出帐户/关闭终端之后继续运行相应的进程)

这时输入

nohup python3 manage.py runserver 0.0.0.0:

此时会报错

nohup: ignoring input and appending output to ‘nohup.out’

二、解决办法

1、原因

是因为使用 nohup 会产生日志文件,默认写入到 nohup.out

2、解决

将 nohup 的日志输出到 /dev/null,这个目录会让所有到它这的信息自动消失

nohup python3 manage.py runserver 0.0.0.0: > /dev/null > /dev/null &

Linux部署Django:报错 nohup: ignoring input and appending output to ‘nohup.out’的更多相关文章

  1. nohup 命令(设置后台进程): appending output to ‘nohup.out’ 问题

    一.Linux 下使用 nohup Unix/Linux下一般比如想让某个程序在后台运行,很多都是使用 & 在程序结尾来让程序自动运行. 比如我们要运行weblogic在后台:./startW ...

  2. Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name.

    Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name. 我 ...

  3. Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案

    我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...

  4. Django报错:OSError: raw write() returned invalid length 4 (should have been between 0 and 2)

    在使用Django时Django报错:Django报错:OSError: raw write() returned invalid length 4 (should have been between ...

  5. Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and you have APPEND_SLASH set.

    Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and ...

  6. Linux QtCreator 编译报错:No rule to make target '.../***' needed by '***.o'.stop

    Linux QtCreator 编译报错:No rule to make target 'mainwindow.cpp'  needed by  'mainwindow.o'.stop [1]解决方案 ...

  7. 【jvm】linux 调用 jmap 报错Permission denied

    linux 调用 jmap  报错Permission denied 解决方案: 分别对java安装目录,java的bin目录以及jmap命令设置权限 chmod jdk1..0_79 chmod b ...

  8. Linux常见英文报错中文翻译(菜鸟必知)

    Linux常见英文报错中文翻译(菜鸟必知) 1.command not found 命令没有找到 2.No such file or directory 没有这个文件或目录 3.Permission ...

  9. Linux常见英文报错中文翻译

    Linux常见英文报错中文翻译(菜鸟必知) 1.command not found 命令没有找到 2.No such file or directory 没有这个文件或目录 3.Permission ...

随机推荐

  1. 子组件props接受父组件传递的值,能不能修改的问题

    参考链接:https://www.cnblogs.com/pangchunlei/p/11139356.html

  2. jqGrid清空表格

    $("#jqGrid").jqGrid("setGridParam",{ datatype:'local', data : [], page:1 }).trig ...

  3. Reactor系列(十)collectMap集合

    #java#reactor#collect#hashMap# 转换成Map 视频讲解: https://www.bilibili.com/video/av80048104/ FluxMonoTestC ...

  4. navicat破解版的下载与激活

    原文链接:http://www.cnblogs.com/djwhome/p/9289295.html 以前一直使用的老版的破解版的navicat,但是最近老是报错 而且连接还特别慢,今天终于不忙了额, ...

  5. IO-file 02 文件的状态

    package com.bwie.io; import java.io.File; /** * 文件状态 * 1.不存在  exists * 2.存在 *      文件:isFile *      ...

  6. Android Stadio导入Android工程项目,只有Edit Configurations的解决办法

    这几天导入老的Android工程项目,导入后,也不发红也不报错,但是Run这一项没有可运行的App,就只有一个Edit Configurations.经过查询后,发现运行一下Sync Project ...

  7. 数据库学习其一 oracle11g数据泵导入导出

    一.检查环境一致性 需检查数据库客户端与服务端字符编码,以避免后续各种各样的问题 查询服务端编码 注意最好用sqlplus查询,用plsql有时候会出现查询不一致问题,如下图同一个语句在plsql和s ...

  8. Redis 学习笔记(篇八):事件

    Redis 服务器是一个事件驱动程序,服务器需要处理以下两类事件: 文件事件: Redis 服务器通过套接字与客户端(或者其他 Redis 服务器)进行连接,而文件事件就是服务器对套接字操作的抽象.服 ...

  9. poj 2342 【Anniversary party】树形dp

    题目传送门//res tp poj 题意 给出一棵有权树,求一个节点集的权值和,满足集合内的任意两点不存在边 分析 每个点有选中与不选中两种状态,对于第\(i\)个点,记选中为\(sel_i\),不选 ...

  10. fiddler笔记:Find Session窗口

    通过Edit菜单选项或CTRL+F打开Find Session窗口.其主要是用来搜索捕捉到的请求和响应. find 指定要搜索的文本 Options Search 支持的搜索选项:Requests a ...