安装部署
VVCMS使用superviso守护安装部署
Supervisor(常叫 supervisord)是一个轻量级、跨平台、专为应用进程设计的进程管理工具,本文介绍了使用Supervisor来守护VVCMS运行
2026-05-04
21
什么是Supervisor
Supervisor(常叫 supervisord)是一个轻量级、跨平台、专为应用进程设计的进程管理工具,用 Python 写的,和 Systemd 不是一类东西,但用途很像:把你的程序放在后台、开机自启、崩了自动重启、统一管控。
一、一句话对比(先抓住定位)
- Systemd:系统级管家(PID=1),管整个操作系统,系统自带、功能最重。
- Supervisor:应用级管家,只管你自己的程序,需要安装、更轻、更简单。
二、Supervisor 能干嘛(核心能力)
- 后台常驻:把普通脚本 / 程序变成守护进程,不用 nohup。
- 自动重启:程序 crash、被 kill、退出,自动拉起来。
- 开机自启:系统重启后自动跑你的程序。
- 多进程管理:一个 Supervisor 可以管 N 个程序,统一启停。
- 简单命令:一套 supervisorctl 管所有服务。
- 日志集中:自动收集 stdout/stderr,不用自己重定向。
安装Supervisor
root@ecs-989b:~# sudo apt install supervisor
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
linux-image-6.1.0-9-amd64
Use 'sudo apt autoremove' to remove it.
Suggested packages:
supervisor-doc
The following NEW packages will be installed:
supervisor
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 311 kB of archives.
After this operation, 1,748 kB of additional disk space will be used.
Get:1 http://repo.huaweicloud.com/debian bookworm/main amd64 supervisor all 4.2.5-1 [311 kB]
Fetched 311 kB in 0s (1,363 kB/s)
Selecting previously unselected package supervisor.
(Reading database ... 50382 files and directories currently installed.)
Preparing to unpack .../supervisor_4.2.5-1_all.deb ...
Unpacking supervisor (4.2.5-1) ...
Setting up supervisor (4.2.5-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/supervisor.service → /lib/systemd/system/supervisor.service.
Processing triggers for man-db (2.11.2-2) ...
设置Supervisor开机自启并启动
root@ecs-989b:~# systemctl enable supervisor
Synchronizing state of supervisor.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable supervisor
root@ecs-989b:~# systemctl start supervisor下载并解压VVCMS
root@ecs-989b:~# cd /opt/
root@ecs-989b:~# cd mkdir/vvcms && cd /vvcms
root@ecs-989b:/vvcms# wget https://gitee.com/aveyuan/vvcms/releases/download/v5.3.0/vvcms-linux-amd64-v5.3.0.zip
--2026-05-04 16:09:49-- https://gitee.com/aveyuan/vvcms/releases/download/v5.3.0/vvcms-linux-amd64-v5.3.0.zip
Resolving gitee.com (gitee.com)... 180.76.198.225, 180.76.199.13, 180.76.198.77
Connecting to gitee.com (gitee.com)|180.76.198.225|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://gitee.com/aveyuan/vvcms/attach_files/2707492/download/vvcms-linux-amd64-v5.3.0.zip [following]
--2026-05-04 16:09:50-- https://gitee.com/aveyuan/vvcms/attach_files/2707492/download/vvcms-linux-amd64-v5.3.0.zip
Reusing existing connection to gitee.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://foruda.gitee.com/attach_file/1777474241822205264/vvcms-linux-amd64-v5.3.0.zip?token=c9573de10ea979e8bcc150953f2adff4&ts=1777882190&attname=vvcms-linux-amd64-v5.3.0.zip [following]
--2026-05-04 16:09:50-- https://foruda.gitee.com/attach_file/1777474241822205264/vvcms-linux-amd64-v5.3.0.zip?token=c9573de10ea979e8bcc150953f2adff4&ts=1777882190&attname=vvcms-linux-amd64-v5.3.0.zip
Resolving foruda.gitee.com (foruda.gitee.com)... 180.76.198.77, 180.76.199.13
Connecting to foruda.gitee.com (foruda.gitee.com)|180.76.198.77|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21876168 (21M) [application/zip]
Saving to: ‘vvcms-linux-amd64-v5.3.0.zip’
vvcms-linux-amd64-v5.3.0.zip 100%[===================================================================================>] 20.86M 1.42MB/s in 14s
2026-05-04 16:10:05 (1.45 MB/s) - ‘vvcms-linux-amd64-v5.3.0.zip’ saved [21876168/21876168]
root@ecs-989b:/vvcms# unzip vvcms-linux-amd64-v5.3.0.zip
测试启动微微CMS
root@ecs-989b:/vvcms# ls
dist themes vvcms-linux-amd64 vvcms-linux-amd64-v5.3.0.zip
root@ecs-989b:/vvcms# ./vvcms-linux-amd64
========================================
Welcome to VVCMS
Free · Secure · High-Performance CMS
========================================
Mode : Install
Address : http://127.0.0.1:8000
Config : ./configs/config.yaml
Tips : Open the address above to complete installation
========================================
2026/05/04 16:12:26 服务启动完成这个时候,开通外部8000端口,就可以同ip进行访问了。但是没有进行后台守护运行,本次通过supervisor进行守护,拉起vvcms
添加vvcms守护文件
root@ecs-989b:/opt# cd /etc/supervisor/conf.d/
root@ecs-989b:/etc/supervisor/conf.d# touch vvcms.conf
root@ecs-989b:/etc/supervisor/conf.d# vim vvcms.conf 配置文件
[program:vvcms]
directory=/opt/vvcms
command=/opt/vvcms/vvcms-linux-amd64
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true更新supervisor
root@ecs-989b:/etc/supervisor/conf.d# supervisorctl update
vvcms: added process group查看状态
root@ecs-989b:/opt/vvcms# supervisorctl
vvcms RUNNING pid 44938, uptime 0:00:52
supervisor> tail -f vvcms
==> Press Ctrl-C to exit <==
========================================
Welcome to VVCMS
Free · Secure · High-Performance CMS
========================================
Mode : Install
Address : http://127.0.0.1:8000
Config : ./configs/config.yaml
Tips : Open the address above to complete installation
========================================
2026/05/04 16:25:12 服务启动完成CURL访问测试
root@ecs-989b:/opt/vvcms# curl http://127.0.0.1:8000
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Installation Wizard</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<style>
html,
body {
width: 100%;
height: auto;
下一步:通过Nginx反向代理域名访问