python manage.py createsuperuser
python manage.py migrate

生成网站的supervisor配置文件:

echo_supervisord_conf >myWeb.conf

修改配置文件:

/etc/supervisor/conf.d/myWeb.conf

[program:myWeb]

command=/usr/bin/python /data/myWeb/manage.py runserver  0.0.0.0:8000              ; the program (relative uses PATH, can take args)

;process_name=%(program_name)s ; process_name expr (default %(program_name)s)

;numprocs=1                    ; number of processes copies to start (def 1)

;directory=/tmp                ; directory to cwd to before exec (def no cwd)

;umask=022                     ; umask for process (default None)

;priority=999                  ; the relative start priority (default 999)

autostart=true                ; start at supervisord start (default: true)

autorestart=true        ; whether/when to restart (default: unexpected)

;startsecs=1                   ; number of secs prog must stay running (def. 1)

;startretries=3                ; max # of serial start failures (default 3)

;exitcodes=0,2                 ; 'expected' exit codes for process (default 0,2)

;stopsignal=QUIT               ; signal used to kill process (default TERM)

;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)

;stopasgroup=false             ; send stop signal to the UNIX process group (default false)

;killasgroup=false             ; SIGKILL the UNIX process group (def false)

;user=chrism                   ; setuid to this UNIX account to run the program

;redirect_stderr=true          ; redirect proc stderr to stdout (default false)

stdout_logfile=/data/myWeb/out.log        ; stdout log path, NONE for none; default AUTO

;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)

;stdout_logfile_backups=10     ; # of stdout logfile backups (default 10)

;stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)

;stdout_events_enabled=false   ; emit events on stdout writes (default false)

stderr_logfile=/data/myWeb/err.log        ; stderr log path, NONE for none; default AUTO

;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)

;stderr_logfile_backups=10     ; # of stderr logfile backups (default 10)

;stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)

;stderr_events_enabled=false   ; emit events on stderr writes (default false)

;environment=A=1,B=2           ; process environment additions (def no adds)

;serverurl=AUTO                ; override serverurl computation (childutils)

启动和停止网站:

supervisord -c /etc/supervisor/conf.d/myWeb.conf

supervisorctl -c myWeb.conf stop  myWeb

最新文章

  1. 《learning hard C#学习笔记》读书笔记(19)多线程
  2. ABP集合贴(转)
  3. Android基于mAppWidget实现手绘地图(八)–获取用户地理位置
  4. Jsp九大内置对象及其作用域
  5. idea集成git
  6. js设置输入框失去光标与光标选中时样式
  7. sphinx 配置sphinx.conf
  8. TCP/IP 子网掩码浅析
  9. JavaScript: 世界上最被误解的语言|Douglas Crockford
  10. java设计模式--行为型模式--命令模式
  11. chrome浏览器的桌面通知
  12. 执行shell脚本提示“syntax error near unexpected token for((i=0;i<$length;i++))”
  13. cc2530 -----SampleApp.c解析
  14. IO之同步、异步、阻塞、非阻塞 (2)
  15. 【js】【图片显示】js控制html页面显示图片方式
  16. Linux 查看进程之PS命令
  17. 【xsy1154】 DNA配对 FFT
  18. javascript promise编程
  19. php 查看使用多少内存
  20. Mac下使用Wine安装文件内容搜索工具Search and Replace

热门文章

  1. eclipse报An error has occurred,See error log for more details. java.lang.NullPointerException错误
  2. 使用Node.js和Redis实现push服务--转载
  3. 将Excel数据导入Oracle中
  4. 51nod 1392 装盒子
  5. bzoj3163: [Heoi2013]Eden的新背包问题
  6. jquery form表单序列号
  7. php定时执行脚本
  8. WebAPI 安全性 使用TOKEN+签名验证(下)
  9. [jQuery].scrollTop() 函数详解
  10. WLS_Oracle Weblogic管理概述(概念)