一、部署 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. logstash数据迁移

    logstash是一个非常强大的数据迁移工具.这里主要记录今天使用到的几个简单用法. 其中比较需要注意的是 迁移到elasticsearch的时候,output 的 elasticsearch 中的 ...

  2. bootstrap基础学习【网格系统】(三)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  3. HDU6739 Invoker 【dp】

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6739 借鉴了这个网址的题解:https://blog.csdn.net/qq_41785863/art ...

  4. [转帖]ubuntu 修改 apt源的方法

    https://www.cnblogs.com/dadonggg/p/11129973.html ubuntu 和 centos 是不一样的 ubunut 里面 用deb开头 放置到 /etc/apt ...

  5. SpreadJS:一款高度类似Excel的开发工具,功能涵盖Excel的 95% 以上

    Excel 作为一款深受用户喜爱的电子表格工具,借助其直观的界面.出色的计算性能.数据分析和图表,已经成为数据统计领域不可或缺的软件之一. 基于Excel对数据处理与分析的卓越表现,把Excel的功能 ...

  6. 什么是弹性公网IP?

    弹性公网IP(Elastic IP Address,简称EIP),是可以独立购买和持有的公网IP地址资源.目前,EIP可绑定到专有网络类型的ECS实例.专有网络类型的私网SLB实例.专有网络类型的辅助 ...

  7. Centos7下关闭Firewalls配置iptables

    在网上搜索了很多这种资料,现在总结一下以备后用. 1.关闭防火墙:sudo systemctl stop firewalld.service 2.关闭开机启动:sudo systemctl disab ...

  8. 一文让你明白Redis持久化

    网上虽然已经有很多类似的介绍了,但我还是自己总结归纳了一下,自认为内容和细节都是比较齐全的. 文章篇幅有 4k 多字,货有点干,断断续续写了好几天,希望对大家有帮助.不出意外地话,今后会陆续更新 Re ...

  9. 微信小程序修改radio和checkbox的默认样式和图标

    wxml: <view class="body"> <view class="body-content"> 第1题:企业的价值观是 ? ...

  10. cmder 增强型命令行工具

    下载 https://github.com/cmderdev/cmder/releases/download/1.3.13/cmder.zip Cmder加到右键菜单 https://www.jian ...