Linux部署Django:报错 nohup: ignoring input and appending output to ‘nohup.out’
一、部署 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’的更多相关文章
- nohup 命令(设置后台进程): appending output to ‘nohup.out’ 问题
一.Linux 下使用 nohup Unix/Linux下一般比如想让某个程序在后台运行,很多都是使用 & 在程序结尾来让程序自动运行. 比如我们要运行weblogic在后台:./startW ...
- 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. 我 ...
- 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 ...
- 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 ...
- 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 ...
- 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]解决方案 ...
- 【jvm】linux 调用 jmap 报错Permission denied
linux 调用 jmap 报错Permission denied 解决方案: 分别对java安装目录,java的bin目录以及jmap命令设置权限 chmod jdk1..0_79 chmod b ...
- Linux常见英文报错中文翻译(菜鸟必知)
Linux常见英文报错中文翻译(菜鸟必知) 1.command not found 命令没有找到 2.No such file or directory 没有这个文件或目录 3.Permission ...
- Linux常见英文报错中文翻译
Linux常见英文报错中文翻译(菜鸟必知) 1.command not found 命令没有找到 2.No such file or directory 没有这个文件或目录 3.Permission ...
随机推荐
- 最新 新华网java校招面经 (含整理过的面试题大全)
从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿.新华网等10家互联网公司的校招Offer,因为某些自身原因最终选择了新华网.6.7月主要是做系统复习.项目复盘.LeetCo ...
- zookeeper的shell下操作
zookeeper的shell下操作 进入%ZK_HOME%/bin 执行zkCli.sh [-server ip:port] #如不指定,则连接本机 创建: create [-s] [-e] p ...
- 多路径IO
多路径IO(MPIO)是一个微软架构,通过在存储设备和windows操作系统之间提供一个备用数据路径,来减轻主机总线适配器(HBA)故障的影响,MPIO能够支持多达32个备用路径,来增加Windows ...
- Centos 配置jdk环境变量
1.安装方法 windows 下载,复制到 linux,解压,配置环境变量 linux 使用 wget 下载,解压,配置环境变量 linux 使用 yum 直接安装,环境变量自动配置好 2.查看是否已 ...
- Reactor系列(三)创建Flux,Mono(续)
创建Mono 视频讲解:https://www.bilibili.com/video/av78944069/ FluxMonoTestCase.java package com.example.rea ...
- kibana 设置登录认证
kibana 设置登录认证 SlowGO 2018.11.21 14:56 字数 59 阅读 658评论 0喜欢 0 kibana 本身没有用户名密码的设置,可以使用 nginx 来实现. 步骤 (1 ...
- loback的介绍与配置-(通俗易通)
一.logback的配置介绍 Logback的配置分为三个内容:Logger.appender及layout Logger:作为日志的记录器,主要用于存放日志对象,也可以定义日志类型.级别. appe ...
- 记搜狗一次不成功的Python后端面试经历
面试搜狗Python后端结束快一个月了,终于有时间来做一个简单的总结了. 简介:工作不久,基础后端岗位,一面结束,失败. 先做了几个笔试题,面试开始会根据笔试题问一些内容.下面将整理一下还能想起来的内 ...
- virtual和override
偶然间看到的题,借此记录. class Program { static void Main(string[] args) { D d = new D(); //第一个D是申明类,第二个D是实例类 A ...
- zepto学习(二)之tap事件以及tap事件点透处理
前言 为什么通过touch可以触发click事件? touch事件的来源 PC网页上的大部分操作都是用鼠标的,即响应的是鼠标事件,包括mousedown.mouseup.mousemove和click ...