一、安装配置supervisor

1.安装python自动化工具    #yum install python-setuptools

2.#easy_install supervisor安装supervisor

3.测试安装是否成功 #echo_supervisord_conf

4.创建配置文件:

(1)创建supervisor配置文件目录/etc/supervisor/

#mkdir -m 755 -p /etc/supervisor/

(2)创建主配文件supervisord.conf

#echo_supervisord_conf > /etc/supervisor/supervisord.conf

(3)创建项目配置文件目录

# mkdir -m 755 conf.d

5.在配置文件目录中添加测试配置文件 
如:convert.ini

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkoAAAB3CAYAAAD8WG/DAAAfeklEQVR4nO2d3a7stnXH17j+SlwnRntjB4F9jmPHiaQmcV+jt6M5t30TSX2bIw3QizxI4EISkiBxE8dNi8Jui8ZxgCa2SlKiREok9TWa0ez9/wELe7YkkosURS6RFNeBiCqawXe/+53294svvTInqMa33/jW4rB/+J//XRz2q6+/Whz2lVe/uTjsf3/+n4vDvvbXr9NvfvPbxeEBAAAAsIwXp16oGkjg+jx58o74C4MJAAAAuB4vTLkIRhIAAAAAHiMDQynOK6qqitLwFuqAMeTI0kXxY8qr+r5zyWN/VvAw5eFSCrsDTVzKMT2ASCPOLefBdRD3fcE9WBoOAADuEMOIUkanw4FOWf0fRpP2x6WNJT88Unk60OFQSxAXs8JnLGxSaAdEPIklGt/3qCzmpbEY3qk/ZKt/Tf6KmILDibJrhQMAgDtk0tQb2B9VlVOaptQO/mijQnl73I9z8X+eD89x+AhiHvnNqBCTPJ6mQDtqxOQqhkhIqZI/Ne91Hg36cx3ziBmCS3S1pze/rJW4Gv3a8m5GZrQ8aPdIhmXHQpluM5qzIn/99CVj9cUWDgAAHipOQwmjSfvl6dN/IC/0mv9YZ5of6Rw0o0LBmY7NtFYRB3TKfPLLepTncCopirouLmZhgqQQo0J12Hg8cTGKQWLkkYc5UUrRxNk61TCL/NoImNK3x3WCbf66vLM8FkmrS3A+dlOHfGQrSKhoRrjq/E8bB7Gnt6Ss61HapGB/m/KtR+H48RNlrDyfH8+djjzO53GTnhzh9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UtS297nhv8bosz0H2Yi1NGd71PPefW1cervtMQyAQyC7k5grsS/a6lsKwdur+0huur3lQcu17hDxAIBDINeTmCtxetNdr7Be0lWgDdyv3/YFAIBAI5BpyaH7sH777cG5fP5SdDnTC2lMAAAAAXJD/B7CEtkQb4nmMAAAAAElFTkSuQmCC" alt="" />

然后在主配置文件supervisord.conf的最下面添加

[include]

file = ./conf.d/convert.ini

6.启动supervisor---手动启动

# supervisord -c /etc/supervisor/supervisord.conf

pstree -p | grep supervisord

查看supervisord.log发现program convert已启动

# cat /tmp/supervisord.log

7.#supervisorctl -c /etc/supervisor/supervisord.conf  进入到supervisor管理

status 查看状态

stop all停止

reload重启监控服务

注意:

(1)每次修改配置文件后需进入supervisorctl,执行reload, 改动部分才能生效

(2)两个命令

supervisord : supervisor的服务器端部分,用于supervisor启动

supervisorctl:启动supervisor的命令行窗口,在该命令行中可执行start、stop、status、reload等操作。

二、supervisord启动脚本

1.执行如下命令:

vim /etc/init.d/supervisord

2.输入如下内容:

#!/bin/bash
#
# supervisord This scripts turns supervisord on
# chkconfig: 345 83 04
# description: supervisor is a process control utility. It has a web based
# xmlrpc interface as well as a few other nifty features.
# # source function library
. /etc/rc.d/init.d/functions set -a PREFIX=/usr SUPERVISORD=$PREFIX/bin/supervisord
SUPERVISORCTL=$PREFIX/bin/supervisorctl PIDFILE=/var/supervisor/supervisord.pid
LOCKFILE=/var/supervisor/supervisord.lock OPTIONS="-c /etc/supervisor/supervisord.conf" # unset this variable if you don't care to wait for child processes to shutdown before removing the $LOCKFILE-lock
WAIT_FOR_SUBPROCESSES=yes # remove this if you manage number of open files in some other fashion
ulimit -n 96000 RETVAL=0 running_pid()
{
# Check if a given process pid's cmdline matches a given name
pid=$1
name=$2
[ -z "$pid" ] && return 1
[ ! -d /proc/$pid ] && return 1
(cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1
return 0
} running()
{
# Check if the process is running looking at /proc
# (works for all users) # No pidfile, probably no daemon present
[ ! -f "$PIDFILE" ] && return 1
# Obtain the pid and check it against the binary name
pid=`cat $PIDFILE`
running_pid $pid $SUPERVISORD || return 1
return 0
} start() {
echo "Starting supervisord: " if [ -e $PIDFILE ]; then
echo "ALREADY STARTED"
return 1
fi # start supervisord with options from sysconfig (stuff like -c)
$SUPERVISORD $OPTIONS # show initial startup status
$SUPERVISORCTL $OPTIONS status # only create the subsyslock if we created the PIDFILE
[ -e $PIDFILE ] && touch $LOCKFILE
} stop() {
echo -n "Stopping supervisord: "
$SUPERVISORCTL $OPTIONS shutdown
if [ -n "$WAIT_FOR_SUBPROCESSES" ]; then
echo "Waiting roughly 60 seconds for $PIDFILE to be removed after child processes exit"
for sleep in 2 2 2 2 4 4 4 4 8 8 8 8 last; do
if [ ! -e $PIDFILE ] ; then
echo "Supervisord exited as expected in under $total_sleep seconds"
break
else
if [[ $sleep -eq "last" ]] ; then
echo "Supervisord still working on shutting down. We've waited roughly 60 seconds, we'll let it do its thing from here"
return 1
else
sleep $sleep
total_sleep=$(( $total_sleep + $sleep ))
fi fi
done
fi # always remove the subsys. We might have waited a while, but just remove it at this point.
rm -f $LOCKFILE
} restart() {
stop
start
} case "$1" in
start)
start
RETVAL=$?
;;
stop)
stop
RETVAL=$?
;;
restart|force-reload)
restart
RETVAL=$?
;;
reload)
$SUPERVISORCTL $OPTIONS reload
RETVAL=$?
;;
condrestart)
[ -f $LOCKFILE ] && restart
RETVAL=$?
;;
status)
$SUPERVISORCTL $OPTIONS status
if running ; then
RETVAL=0
else
RETVAL=1
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
exit 1
esac exit $RETVAL

注意:该文件中的如下几个变量,都需要根据你实际的目录来改写。

PREFIX=/usr

SUPERVISORD=$PREFIX/bin/supervisord      ##supervisord   程序的安装路径

SUPERVISORCTL=$PREFIX/bin/supervisorctl  ##supervisorctl 程序的安装路径

PIDFILE=/var/supervisor/supervisord.pid   ##需要先创建/var/supervisor目录

LOCKFILE=/var/supervisor/supervisord.lock

OPTIONS="-c /etc/supervisor/supervisord.conf"   ##配置文件的路径

保存完毕之后,可以执行以下命令修改文件权限:

chmod 777 /etc/init.d/supervisord

/etc/init.d/supervisord  start

service supervisord start

这样supervisor就启动了

3. 配置开机启动

执行以下命令:

chkconfig supervisord  on

可以以下命令查看是否成功

chkconfig --list | grep  supervisord

supervisor centos安装的更多相关文章

  1. CentOS安装Supervisor

    什么是Supervisor Supervisor是一个进程控制系统. 它是一个C/S系统,服务端是supervisord进程,控制端使用supervisorctl来进行控制启动进程.同时它也提供了一个 ...

  2. centos 安装nginx

    centos 安装nginx 安装依赖 更换源 yum install http://mirrors.163.com/centos/6.8/extras/x86_64/Packages/epel-re ...

  3. Linux Supervisor的安装与使用入门

    在linux或者unix操作系统中,守护进程(Daemon)是一种运行在后台的特殊进程,它独立于控制终端并且周期性的执行某种任务或等待处理某些发生的事件.由于在linux中,每个系统与用户进行交流的界 ...

  4. Supervisor 的安装与配置教程

    简介 Supervisor是一个进程控制系统. 它是一个C/S系统(注意: 其提供WEB接口给用户查询和控制), 它允许用户去监控和控制在类UNIX系统的进程. 它的目标与launchd, daemo ...

  5. Linux进程管理工具Supervisor的安装配置

    目录 Linux进程管理工具Supervisor的安装配置 简介 安装Python包管理工具 安装Supervisor 配置 配置文件参数说明 配置进程管理 启动supervisor 控制进程 交互终 ...

  6. CentOS安装gitlab,gerrit,jenkins并配置ci流程

    CentOS安装gitlab,gerrit,jenkins并配置ci流程 By Wenbin juandx@163.com 2016/4/9 这是我参考了网上很多的文档,配置了这三个软件在一个机器上, ...

  7. 【推荐】CentOS安装Subversion-1.8.11+HTTP协议支持配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. 我们需要搭建一个自己的SVN服务器. 此外,搭建好的SVN服务器除了需要支持svn协议外,最好还需要支持HTTP协议和HTTPS协 ...

  8. 【推荐】CentOS安装PHP-5.6.4+扩展安装+安全配置+性能配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 前段时间PHP官方发布了一个重要的安全升级公告,修复了两个unserialize函数的严重漏洞,目前受影响的版本有: ...

  9. CentOS安装Apache-2.4.10+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Nginx之前,请确保已经使用yum安装了各基础组件,并且配置了www用户和用户组,具体见<CentOS ...

随机推荐

  1. JS高级程序设计 笔记

    1.instanceof 可以判断实例是否在某个对象的原型上: function A() { this.a = "a"; } function B() { this.b = &qu ...

  2. Webpack参考资料

    学习是一种进步,只有不断的向别人学习,才能提升自己.三人行必有我师焉 1. http://www.cnblogs.com/zhengjialux/p/5861845.html

  3. 链表栈的C语言实现

    #ifndef _CONST_H_#define _CONST_H_ #include <stdio.h>#include <stdlib.h> typedef enum { ...

  4. Log4j源代码学习

    了解log4j的源代码来源于项目中一次需求,我们想将系统所有的warn日志统一收集到common-warn.log的日志中去,以便于系统对其进行监控处理.于是模拟自动生成的error配置完成了warn ...

  5. bootstrap-table填坑之旅<二>事件

    接着研究bootstrap-table... ... 这一篇研究bootstrap-table的事件及回调函数 先上一个demo HTML <div class="alert aler ...

  6. javascript学习内容--改变样式、取消设置、显示内容、隐藏内容

    <head> <style> body{font-size:12px;} #txt{ height:400px; width:600px; border:#333 solid ...

  7. js 判断 是否位数字

    isNaN(val) val为数字返回false 不为数字返回truedocument.write(isNaN(123)); document.write(isNaN(-1.23)); documen ...

  8. js 获取URL传递过来的值

    URL: http://127.0.0.1:8080/jspews/pews/inspection/InspectCheckCard.jsp?checkDate=2015-03-31 传递的值: ch ...

  9. IE下,js改变绝对定位的属性不生效

    如果想要动态改变定位位置的值,例如改变TOP的值,IE下必须要给TOP一个初始值,不然不生效..

  10. 2017年1月1日 java学习第二天复习

    今天是新年的第一天,以前学习没有总结习惯,学习效率和成果都很不好.  学习的过程就是反复的复习和不断学习的过程,开始今天的学习总结   学习java的第二天. 今天学习了java最基础的一些内容,照着 ...