• gunicorn flask nginx环境配置


    防火墙端口设置****修改后要重启生效(有时在控制面板中设置80端口无法生效)

    /etc/init.d/iptables status
    service iptables stop
    firewall-cmd --state
    firewall-cmd --list-ports
    firewall-cmd --zone=public --add-port=80/tcp --permanent
    firewall-cmd --list-ports
    firewall-cmd --zone=public --add-port=79-85/tcp --permanent
    firewall-cmd --list-ports
    firewall-cmd --reload
    firewall-cmd --list-ports

     启动gunicorn服务:nohup gunicorn -w 2 -b 0.0.0.0:8080 hello:app &

    1.nohup

    用途:不挂断地运行命令。

    语法:nohup Command [ Arg … ] [ & ]

      无论是否将 nohup 命令的输出重定向到终端,输出都将附加到当前目录的 nohup.out 文件中。

      如果当前目录的 nohup.out 文件不可写,输出重定向到 $HOME/nohup.out 文件中。

      如果没有文件能创建或打开以用于追加,那么 Command 参数指定的命令不可调用。

    退出状态:该命令返回下列出口值:   
      126 可以查找但不能调用 Command 参数指定的命令。   
      127 nohup 命令发生错误或不能查找由 Command 参数指定的命令。   
      否则,nohup 命令的退出状态是 Command 参数指定命令的退出状态。

    2.&

    用途:在后台运行

    一般两个一起用

    nohup command &

  • 相关阅读:
    计算机算法设计与分析之棋盘覆盖问题
    在uboot里面加入环境变量使用run来运行
    软件project师的属性与发展
    Oracle 表三种连接方式(sql优化)
    POJ 1700 cross river (数学模拟)
    八:Java之I/O
    为 Python Server Pages 和 Oracle 构建快速 Web 开发环境。
    WebBot
    WebBrowserProgramming
    Skulpt
  • 原文地址:https://www.cnblogs.com/ameile/p/9187528.html
Copyright © 2020-2023  润新知