跳至主要内容

统信UOS 离线安装 supervisor

 


1、python 安装(可忽略,系统一般已安装好)

https://www.python.org/downloads/source/
tar -zxvf Python-3.11.4.tgz
cd Python-3.11.4
./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3.11 /usr/local/bin/python3
ln -s /usr/local/python3/bin/pip3.11 /usr/local/bin/pip

2、setuptools 安装

https://pypi.org/project/setuptools/#files
tar -zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11 
python setup.py install

3、meld3 安装

https://pypi.org/project/meld3/#files
tar -zxvf meld3-2.0.1.tar.gz
cd meld3-2.0.1 
python3 setup.py install

4、supervisor 安装

https://pypi.org/project/supervisor/
tar -zxvf supervisor-4.2.5.tar.gz
cd supervisor-4.2.5
python3 setup.py install


supervisor 配置

mkdir /etc/supervisor
echo_supervisord_conf  > /etc/supervisor/supervisord.conf
vi /etc/supervisor/supervisord.conf

# 以下是要修改的内容
[unix_http_server]
file=/var/run/supervisor.sock  ; (the path to the socket file)

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

[include]
files = conf.d/*.conf
touch /var/run/supervisor.sock 
touch /var/log/supervisord.log 
touch /var/run//supervisord.pid 
mkdir /etc/supervisor/conf.d
chmod 777 /var/run
chmod 777 /var/log


supervisor 启动

unlink /var/run/supervisor.sock
supervisord -c /etc/supervisor/supervisord.conf
supervisorctl status
vi /usr/lib/systemd/system/supervisord.service

#以下是内容
[Unit] 

Description=Supervisor daemon 

[Service] 

Type=forking ExecStart=/usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf 

ExecStop=/usr/local/bin/supervisorctl shutdown 

ExecReload=/usr/local/bin/supervisorctl reload 

KillMode=process Restart=on-failure 

RestartSec=42s 

[Install] 

WantedBy=multi-user.target
systemctl enable supervisord
systemctl is-enabled supervisord


supervisor 常用命令

systemctl status supervisord
systemctl start supervisord
systemctl stop supervisord
supervisorctl status
supervisorctl start
supervisorctl stop

评论

此博客中的热门博文

Docker-Compose 安装 PolarDB

 version: '3.1' services:   polardb:     container_name: polardb     restart: always     image: polardb/polardb_pg_local_instance     ports:       - 5432:5432     networks:       - net_db     environment:       TZ: Asia/Shanghai     volumes:       - ./polardb:/var/polardb networks:   net_db:     external: true

OpenAI 开源的Whisper体验

近期有一个需求,类似于数字人,用户用语音控制进行菜单跳转,甚至于进行分析。 当用户对着麦克风进行说话的时候,要解析出来用户想干什么。当然好多付费的接口可以实现,但基于互联网免费的思路,当然要查找一翻。 Whisper 是用于自动语音识别 (ASR) 和语音翻译的预训练模型。 Whisper 模型经过 68 万小时的标记数据训练,表现出强大的泛化能力,无需进行微调即可推广到许多数据集和领域。 写的很强大,HuggingFace上有搭建好的模型当然要试用一下了,效果还不错,中文的解析正确率也挺高的,下面是接口请求方式。

Docker-Compose 安装 Portainer

 version: '3.1' services: portainer: image: portainer/portainer-ce:latest container_name: portainer hostname: portainer restart: always volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "./portainer_data:/data" - "./portainer_cn:/public" environment: TZ: Asia/Shanghai LANG: en_US.UTF-8 ports: - "9001:9000" networks:      - net_db networks: net_db: external: true