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 应用需要部署的时候,就想着折腾自己的服务器.根据搜索的教程照做,对于原理一知半解,磕磕碰碰,只要运行起来了,谢天谢地然后不再折腾了,到下一次还需要部署时,这样的 ...
随机推荐
- 最新版本express 4.2.0的快速建站--简单举例
express是Node.js的官方唯一推荐的框架,它扩展了http工具以及一些好用的功能.如此好用的东西,赶紧的安装起来: npm install express -g 新版本的express的命令 ...
- ELK常用API使用方法
以下ELK系列文章参考自http://www.tianyiqingci.com/ 总目录: Monitor API ElasticSearch聚合分析API Elasticsearch信息检索API ...
- c#学习内容
学习winform+DevExpress 界面制作 wpf UIAutomation 控制别的程序 ok c#通过句柄控制别的程序 ok c# 截图 ok c# 多线程 ok c# 数据库myq ...
- 《python基础教程(第二版)》学习笔记 文件和素材(第11章)
<python基础教程(第二版)>学习笔记 文件和素材(第11章) 打开文件:open(filename[,mode[,buffering]]) mode是读写文件的模式f=open(r' ...
- Idea 使用过程中遇到的问题记录
1.在Idea启动Tomcat,有时候提示项目启动 failed,请查看日志,此时的日志在Tomcat主目录的日志文件中是没有的,此时的日志记录在: C:\Users\wanhua.lu\.Intel ...
- Mac系统给移动硬盘分区(图文)
刚买的硬盘500G 准备分几个区 移动硬盘分区格式化有3中形式: 1.Mac OS 扩展日志 格式 此格式mac专用,这种格式的硬盘在PC上不可见,可以用来给 Time Machine 备份, T ...
- C++(四)— 字符串、数字翻转3种方法
1.使用algorithm中的reverse函数,string类型字符建议使用. #include <iostream> #include <string> #include ...
- guava_学习_00_资源帖
一.精选 1.Google Guava 官方教程 二.参考资源 1.Google Guava官方教程(中文版) 2.使用Guava编写优雅代码 3.Google guava工具类的介绍和使用
- spring MVC--配置注解
<context-param> 作用:该元素用来声明应用范围(整个WEB项目)内的上下文初始化参数 param-name 设定上下文的参数名称.必须是唯一名称 param-value 设定 ...
- BEC listen and translation exercise 39
What about jigsaw puzzle design for visually handicapped?给视觉障碍人士设计拼图怎么样? Length is 50cm, and then th ...