第一篇supervisor集群管理工具cesi安装详解-如何安装supervisor

  • 环境
  • 准备
  • 安装python3.7.4
    • 问题
    • 解决方法
  • 安装supervisor
  • 配置supervisor服务
  • 启动supervisord
  • 添加一个服务
  • 管理服务

环境

系统 centos7
python 默认2.7.5
没有外网 没有yum环境

准备

我在网上下载好了

python3.7.4

wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

supervisor-4.2.2.tar.gz

supervisor也去官方下载吧
https://pypi.org/project/supervisor/

安装python3.7.4

[root@host-192-168-65-94 supervisor]# tar -xf Python-3.7.4.tgz
[root@host-192-168-65-94 supervisor]# ll
total 22484
drwxr-xr-x. 18  501  501     4096 Jul  9  2019 Python-3.7.4
-rw-r--r--.  1 root root 23017663 May 24 11:08 Python-3.7.4.tgz
[root@host-192-168-65-94 supervisor]# cd Python-3.7.4/
[root@host-192-168-65-94 Python-3.7.4]# ./configure --prefix=/data/supervisor/python3.7
[root@host-192-168-65-94 Python-3.7.4]# make -j 4 && make install

问题

from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named ‘_ctypes’
make: *** [install] Error 1
如果和上面安装方式一样,python3.7在make install时会报错
from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' make: *** [install] Error 1

解决方法

安装libffi-devel,没有yum源的话,可以参考本地yun源搭建安装本地yum源_yum仓库

yum install libffi-devel

安装上libffi后,再重新编译python

./configure --prefix=/data/supervisor/python3.7
make -j 8 && make install

OK,python安装上了

安装supervisor

上传supervisor-4.2.2.tar.gz

[root@host-192-168-65-94 supervisor]# tar -xf supervisor-4.2.2.tar.gz
[root@host-192-168-65-94 supervisor]# ll
total 22940
drwxr-xr-x.  6 root root        56 May 24 15:47 python3.7
drwxr-xr-x. 19  501   501     4096 May 24 15:53 Python-3.7.4
-rw-r--r--.  1 root root  23017663 May 24 11:08 Python-3.7.4.tgz
drwxr-xr-x.  5  501 games      224 Feb 27 04:45 supervisor-4.2.2
-rw-r--r--.  1 root root    463657 May 20 09:29 supervisor-4.2.2.tar.gz
[root@host-192-168-65-94 supervisor]#
[root@host-192-168-65-94 supervisor]# cd supervisor-4.2.2/
[root@host-192-168-65-94 supervisor-4.2.2]# ../python3.7/bin/python3.7 setup.py build
[root@host-192-168-65-94 supervisor-4.2.2]# ../python3.7/bin/python3.7 setup.py install
[root@host-192-168-65-94 supervisor-4.2.2]# ls ../python3.7/bin/ -l
total 27384
lrwxrwxrwx. 1 root root        8 May 24 16:02 2to3 -> 2to3-3.7
-rwxr-xr-x. 1 root root      117 May 24 16:02 2to3-3.7
-rwxr-xr-x. 1 root root      257 May 24 16:02 easy_install-3.7
-rwxr-xr-x. 1 root root      443 May 24 16:16 echo_supervisord_conf
lrwxrwxrwx. 1 root root        7 May 24 16:02 idle3 -> idle3.7
-rwxr-xr-x. 1 root root      115 May 24 16:02 idle3.7
-rwxr-xr-x. 1 root root      417 May 24 16:16 pidproxy
-rwxr-xr-x. 1 root root      239 May 24 16:02 pip3
-rwxr-xr-x. 1 root root      239 May 24 16:02 pip3.7
lrwxrwxrwx. 1 root root        8 May 24 16:02 pydoc3 -> pydoc3.7
-rwxr-xr-x. 1 root root      100 May 24 16:02 pydoc3.7
lrwxrwxrwx. 1 root root        9 May 24 16:02 python3 -> python3.7
-rwxr-xr-x. 2 root root 13994184 May 24 16:01 python3.7
lrwxrwxrwx. 1 root root       17 May 24 16:02 python3.7-config -> python3.7m-config
-rwxr-xr-x. 2 root root 13994184 May 24 16:01 python3.7m
-rwxr-xr-x. 1 root root     2918 May 24 16:02 python3.7m-config
lrwxrwxrwx. 1 root root       16 May 24 16:02 python3-config -> python3.7-config
lrwxrwxrwx. 1 root root       10 May 24 16:02 pyvenv -> pyvenv-3.7
-rwxr-xr-x. 1 root root      457 May 24 16:02 pyvenv-3.7
-rwxr-xr-x. 1 root root      427 May 24 16:16 supervisorctl
-rwxr-xr-x. 1 root root      423 May 24 16:16 supervisord
[root@host-192-168-65-94 supervisor-4.2.2]#

欧了,现在我把supervisor也安装上了

配置supervisor服务

[root@host-192-168-65-94 supervisor]# mkdir /var/log/supervisor
[root@host-192-168-65-94 supervisor]# mkdir -p conf/conf.d
[root@host-192-168-65-94 supervisor]# cat conf/supervisord.ini
; supervisor config file[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)[inet_http_server]         ; inet (TCP) server disabled by default
port=192.168.65.94:9001        ; (ip_address:port specifier, *:port for all iface)
username=super             ; (default is no username (open server))
password=KsKFaCIX50fDv7kz               ; (default is no password (open server))[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP); the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.[include]
files = conf.d/*.ini

启动supervisord

[root@host-192-168-65-94 supervisor]# python3.7/bin/supervisord -c conf/supervisord.ini

添加一个服务

[root@host-192-168-65-94 conf.d]# cd /data/supervisor/conf/conf.d/
[root@host-192-168-65-94 conf.d]# cat gateway.ini
[program:gateway]
command=/usr/local/java/jdk1.8.0_151/bin/java -Xms512M -Xmx512M -Dio.netty.maxDirectMemory=512M -XX:MaxDirectMemorySize=512M -Dreactor.netty.pool.leasingStrategy=lifo -Dio.netty.leakDetection.targetRecords=40 -Dio.netty.leakDetection.level=advanced -jar /pro/gateway/carsoa-gateway.jar --server.port=9528
autostart=true
autorestart=true
user=root
startsecs=1
startretries=3
redirect_stderr=true
stdout_logfile=/pro/gateway/nohup.out
stderr_logfile=/pro/gateway/nohup.out

管理服务

[root@host-192-168-65-94 conf.d]# /data/supervisor/python3.7/bin/supervisorctl -c /data/supervisor/conf/supervisord.ini
supervisor> start gateway
gateway: started
supervisor>
supervisor> status
gateway                          RUNNING   pid 11970, uptime 0:00:23

可以了,如果您觉得有帮忙请点赞!

第一篇supervisor集群管理工具cesi安装详解-如何安装supervisor相关推荐

  1. 第二篇supervisor集群管理工具cesi安装详解-如何安装supervisor-cesiwebUI

    第二篇supervisor集群管理工具cesi安装详解-如何安装supervisor-cesiwebUI 介绍 安装 解压 安装依赖 修改配置 注册为系统服务 启动 登录一下,发现报错了 解决方法 介 ...

  2. kafka集群管理工具kafka-manager

    一.kafka-manager简介 kafka-manager是目前最受欢迎的kafka集群管理工具,最早由雅虎开源,用户可以在Web界面执行一些简单的集群管理操作.具体支持以下内容: 管理多个集群 ...

  3. 集群管理工具KafkaAdminClient——改造

    欢迎支持笔者新作:<深入理解Kafka:核心设计与实践原理>和<RabbitMQ实战指南>,同时欢迎关注笔者的微信公众号:朱小厮的博客. 欢迎跳转到本文的原文链接:https: ...

  4. docker集群管理工具_太多选择:如何选择正确的工具来管理Docker集群

    docker集群管理工具 There are all kinds of ways to play the Docker game and, obviously, no one of them is g ...

  5. redis-manger集群管理工具

    redis-manger集群管理工具 源起 安装 优点 源起 缺少一个redis集群管理工具 安装 链接: github地址 优点 安装简单,功能够用

  6. Redis 集群搭建及集群管理工具

    目录 一.简介 二.架构图 三.搭建集群 3.1.下载 3.2.编译安装 3.3.配置文件修改 3.4.创建集群 四.集群管理工具redis-cli 4.1.查看集群信息 4.2.检查集群 4.3.修 ...

  7. Redis核心解读–集群管理工具(Redis-sentinel)

    Redis-sentinel是Redis实例的监控管理.通知和实例失效备援服务,是Redis集群的管理工具.在一般的分布式中心节点数据库中,Redis-sentinel的作用是中心节点的工作,监控各个 ...

  8. Docker swarm集群管理工具

    1. 简介 Docker Swarm 是Docker的集群管理工具,简单方便.易于上手. Swarm集群由以下两个组件构成: Mananger:负责整个集群的管理工作包括集群配置.服务管理等所有跟集群 ...

  9. 虚拟化之Proxmox VE集群管理工具pvecm介绍和使用

    一.pvecm简介   Proxmox VE 集群管理工具 pvecm 用于创建一个由多个物理服务器节点构成的"组".这样的一组服务器称为一个"集群".Prox ...

最新文章

  1. win10安装tesserocr配置 Python使用tesserocr识别字母数字验证码
  2. 几何分布和超几何分布
  3. 语言ppt课件猜拳_八年级语文上册第22课 孟子三章讲解及课件下载
  4. Android编译系统简要介绍和学习计划
  5. JavaScript中的Function类型总结
  6. FPGA异步时钟域处理之格雷码转换
  7. Keil MDK下载程序时的相关设置
  8. 使用Wireshark成功解决JavaWeb项目的页面一直加载中的问题
  9. 数据结构 data structure
  10. Jave基本知识(一)
  11. R语言文本聚类实例——以《金庸全集》为例
  12. Tbase 源码 (九)
  13. 把抽奖活动写成一篇技术博客是怎样一种体验
  14. 云技术:弹性计算ECS
  15. JavaScript 资源大全中文版
  16. C语言题目:打印华氏温度与摄氏温度对照表(for循环思路一)(有能力的同学老师们赞一下呀)
  17. delphi11中使用python4delphi组件
  18. Linux系统- Redhat7.6配置网卡team和网桥详解
  19. msysgit使用说明
  20. 用msi安装包安装MySQL详细步骤

热门文章

  1. 跟这台计算机连接的一个USB设备运行不正常,Windows无法识别
  2. 15.9 文本查询程序再探(继承)
  3. Twitter与微博
  4. 医学影像组学之数据增强免费教程
  5. C语言fgetc和fputc函数用法讲解
  6. SIM7600CE http post
  7. 高仿微信上划取消录音
  8. java游戏管理器 闪退_手游频繁崩溃”闪退”? 从程序上找原因
  9. sql server 2008 r2 忘记sa密码, 没有window账户登录, 解决办法
  10. 如何将kindle上的书导出成epub格式