ubuntu部署supersor
1、安装pip
$ sudo apt-get install python-pip –y
$ sudo pip install - -upgrade pip //升级pip
2、安装supervisor
$ sudo pip install supervisor
3、建立配置文件存放目录
$ sudo mkdir –p /etc/supervisor/conf.d
4、 将默认配置导入supervisor.conf文件里,以下命令需用root执行
$ sudo -i //切换到用户root
# echo_supervisord_conf > /etc/supervisor/supervisor.conf
5、 修改配置文件
$ sudo vim /etc/supervisor/supervisor.conf
----------------------------------------------------------------->
#开启web连接,并设置用户和密码,0.0.0.0表示放行所有IP
[inet_http_server] ; inet (TCP) server disabled by default
port=0.0.0.0:9001 ; ip_address:port specifier, *:port for all iface
username=admin ; default is no username (open server)
password=123456 ; default is no password (open server) #修改配置文件路径与类型
[include]
files = conf.d/*.conf
6、 新建一个java配置
$ sudo vim /etc/supervisor/conf.d/java.conf
--------------------------------------------------------------------->
[program:java]
command=/usr/bin/java -jar /data/www/room/devshixin.jar ; 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)
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
;startretries=3 ; max # of serial start failures when starting (default 3)
autorestart=unexpected ; when to restart if exited after running (def: unexpected)
;exitcodes=0,2 ; 'expected' exit codes used with autorestart (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=/var/log/dev_room.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 (0 means none, 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=/var/log/err_dev_room.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 (0 means none, 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)
7、 启动supervisor
$ supervisor –c /etc/supervisor/supervisor.conf
8、 启动服务并添加开机启动
#启动服务
$ /usr/local/bin/supervisord -c /etc/supervisor/supervisor.conf #添加开机启动
$ sudo vim /etc/rc.local
---------------------------------->
/usr/local/bin/supervisord –c /etc/supervisor/supervisor.conf
9、 网页访问supervisor


ubuntu部署supersor的更多相关文章
- Ubuntu部署python3.5的开发和运行环境
Ubuntu部署python3.5的开发和运行环境 1 概述 由于最近项目全部由python2.x转向 python3.x(使用目前最新的 python3.5.1) ,之前的云主机的的默认python ...
- Ubuntu部署python3.7的开发和运行环境
Ubuntu部署python3.7的开发和运行环境 1 概述 由于最近项目全部由python2.x转向 python3.x(使用 python3.7.1) ,之前的云主机的的默认python版本都面临 ...
- Ubuntu 部署 nginx
Ubuntu 部署 nginx apt-get install nginx
- 阿里云Ubuntu部署java web - 文件夹
文件夹(点击章节标题阅读): 阿里云Ubuntu部署java web(1) - 系统配置 ssh链接server(使用终端远程链接) 加入用户 给用户赋予运 ...
- Ubuntu部署jmeter
一:ubuntu部署jdk 1:先下载jdk-8u74-linux-x64.tar.gz,上传到服务器,这里上传文件用到了ubuntu 下的 lrzsz. ubuntu下直接执行 sudo apt-g ...
- ubuntu部署django详细教程
教程使用的软件版本:Ubuntu 18.04.1 LTS,django2.0,Python 3.6.5.nginx-1.13.7.uWSGI (2.0.17.1),Ubuntu是纯净的,全新的.下面我 ...
- ubuntu部署.Net Core3.1(Nginx+pm2)
前言 虽然.NetCore已经出来很久了,但是很多初学者还是不会在linux部署.所以写一篇初学者在ubuntu下部署Core的全过程,大佬请无视. 环境搭建 ubuntu18.04 NetCore3 ...
- python3.6 ubuntu部署nginx、 uwsgi、 django
ubuntu部署nginx. uwsgi. django 将项目上传到服务器 python manager.py runserver 0:80 在浏览器输入服务器的域名或者ip地址,访问成功. 安装u ...
- 写给新手看的Flask+uwsgi+Nginx+Ubuntu部署教程
学习 Flask,写完一个 Flask 应用需要部署的时候,就想着折腾自己的服务器.根据搜索的教程照做,对于原理一知半解,磕磕碰碰,只要运行起来了,谢天谢地然后不再折腾了,到下一次还需要部署时,这样的 ...
随机推荐
- 关于树莓派Pi2通过UART连接攀藤G5传感器的python
1.准备工作:树莓派Pi2板子,攀藤G5传感器 关于树莓派40pin口网上很多,我们只了解与攀藤G5连接的问题 (1)攀藤G5pin1(VCC5v)要注意是5V,有很多板子接的是3V,而树莓派的pin ...
- Shell传参的多种方式
Shell 传参的多种方式 使用$1 $2 这种类似占位符的方式 # 命令行调用 start.sh 8080 9090 # 脚本中获取 port1=$1 # 8080 port2=$2 # 9090 ...
- Android TableLayout 表格布局
TableLayout继承LinearLayout 有多少个TableRow对象就有多少行, 列数等于最多子控件的TableRow的列数 直接在TableLayout加控件,控件会占据一行 Table ...
- Python OOP(2)-static method,class method and instance method
静态方法(Static Method): 一种简单函数,符合以下要求: 1.嵌套在类中. 2.没有self参数. 特点: 1.类调用.实例调用,静态方法都不会接受自动的self参数. 2.会记录所有实 ...
- 【Flask】查询分页问题处理
遇到两次查询结果分页的问题, 查询出结果后, 翻页时导致查询条件失效. 处理方式 1. 路由中不放page参数 写成 @testfile.route("/test-file", m ...
- 算法(Algorithms)第4版 练习 2.2.11(最终)
package com.qiusongde; import edu.princeton.cs.algs4.In; import edu.princeton.cs.algs4.StdOut; publi ...
- 异步刷新页面的前进与后退的实现--pushState replaceState
实现目标 页面的跳转(前进后退,点击等)不重新请求页面 页面URL与页面展现内容一致(符合人们对传统网页的认识) 在不支持的浏览器下降级成传统网页的方式 使用到的API history.state 当 ...
- SmartGit(试用期30后),个人继续使用的方法。
在我们做项目的过程中,我们会用到SmartGit这个软件来将本地的MAVEN项目push到国内的码云(https://git.oschina.net)或者是国外的github网站进行项目的管理,这个时 ...
- pom详解
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- Python入门经典练习题
[程序1] 题目:有1.2.3.4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? num_list=[]cou=0for i in range(1,5): for j in range( ...