rConfig 8.2.19 常用 CLI 与运维命令详解
rConfig V8 Core 8.2.19 全部 38 条 rconfig:* 命令逐条实测:清单报表、配置下载、缓存队列、安全加固、数据维护与第三方导入六大类,含参数说明、真实回显、运维组合与已停用命令(search-configs)实测结论。
rConfig 8.2.19 常用 CLI 与运维命令详解
目标:系统梳理 rConfig V8 Core 8.2.19 自带的
rconfig:*命令族——清单报表、配置下载、缓存队列、安全加固、数据维护五大类,每条命令给出参数说明与实测回显,并把可直接复用的运维组合写进注意事项。全部命令均在 Ubuntu 22.04.5 LTS 实测环境逐条运行采集。
一、环境信息
| 项目 | 实测值 |
|---|---|
| 操作系统 | Ubuntu 22.04.5 LTS(x86_64) |
| rConfig 版本 | V8 Core 8.2.19(2026-10-27 发布) |
| 应用路径 | /var/www/html/rconfig |
| 命令入口 | php artisan <命令>(在应用目录内执行) |
| 实测数据规模 | 1 台设备(lab-router-01,127.0.0.1)、3 个类别、2 个标签、3 条下载命令配置 |
| 设备侧说明 | 本文实测不含真实网络设备,设备端为本地运行的 Cisco IOS 风格 SSH 模拟脚本(监听 22 端口,凭据 admin/q1w2e3r4,提示符 rconfig-lab#,支持 show run/show version/show ip interface brief 等命令),位于 /opt/data/quzuo/tmp/rconfig/fake_ios_device.py;命令行交互行为与真实设备一致,配置下载链路全程真实 |
💡 说明:rConfig 的运维命令分两层——
rconfig:*是应用自带命令族(本文主体);supervisorctl/systemctl是操作系统层的服务管理(本文在关联处引用,不展开)。
二、工具概览
2.1 命令全景(rconfig:list 实测)
一条命令列出全部 rconfig:* 命令与官方描述:
cd /var/www/html/rconfig
php artisan rconfig:list
实测回显(38 条命令,完整表格):
┌────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Command │ Description │
├────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ rconfig:archive-logs │ Will archive x amount of activity log rows or days │
│ rconfig:check-worker-user │ Check that Horizon, the scheduler and the Supervisor config run nothing as root │
│ rconfig:clear-all │ Clear all cache and config elements for Laravel, NPM and other dependencies │
│ rconfig:clear-horizon │ Clear Horizon Queue History │
│ rconfig:clone-templates │ Clone templates from git repo https://github.com/rconfig/rconfig-templates │
│ rconfig:config-summaries-sync │ Sync Config Summaries │
│ rconfig:download-category │ Download configurations for one or multiple categories of devices │
│ rconfig:download-device │ Download configurations for one or multiple devices via the CLI │
│ rconfig:download-tag │ Download configurations for devices with one or multiple tags │
│ rconfig:download-task │ Download configurations for devices with one or multiple tasks │
│ rconfig:list │ List all rconfig:* commands with their descriptions │
│ rconfig:list-categories │ List all category IDs and names in rConfig │
│ rconfig:list-devices │ List all Device IDs and names in rConfig │
│ rconfig:list-tags │ List all tag IDs and names in rConfig │
│ rconfig:list-tasks │ List all task IDs and names in rConfig │
│ rconfig:netmri-connection │ Manage NetMRI API connection configuration │
│ rconfig:netmri-device-mappings │ Manage device type mappings for NetMRI import │
│ rconfig:netmri-import-devices │ Import devices from NetMRI JSON file to rConfig database │
│ rconfig:netmri-load-devices │ Load devices from NetMRI API to create rConfig import JSON │
│ rconfig:oxidized-device-mappings │ Manage device type mappings for Oxidized import │
│ rconfig:oxidized-import-devices │ Import devices from JSON file to rConfig database │
│ rconfig:oxidized-load-devices │ Import devices from Oxidized to rConfig │
│ rconfig:purge-failedconfigs │ Purge failed configs for some or all devices │
│ rconfig:rancid-device-mappings │ Manage device type mappings for RANCID import │
│ rconfig:rancid-import-devices │ Import devices from RANCID JSON file to rConfig database │
│ rconfig:rancid-load-devices │ Load devices from RANCID to create rConfig import JSON │
│ rconfig:redis-secure │ Secure Redis by setting a password and requiring it on the live instance │
│ rconfig:redis-security-check │ Report whether Redis requires a password (the only real control on the queue) │
│ rconfig:report-lastDownload │ Output report of all devices latest downloaded configs │
│ rconfig:search-configs │ Search all config files for a given string │
│ rconfig:set-config-permissions │ Re-apply secure permissions to downloaded device configs already on disk │
│ rconfig:setup-cron │ Install the scheduler cron file in /etc/cron.d as the web user (runs setup_cron.sh, needs root) │
│ rconfig:solarwinds-connection │ Manage SolarWinds SWIS API connection configuration │
│ rconfig:solarwinds-device-mappings │ Manage device type mappings for SolarWinds import │
│ rconfig:solarwinds-import-devices │ Import devices from SolarWinds JSON file to rConfig database │
│ rconfig:solarwinds-load-devices │ Load devices from SolarWinds SWIS API to create rConfig import JSON │
│ rconfig:ssl-self-signed │ Serve rConfig over HTTPS with a self-signed certificate │
│ rconfig:sync-tasks │ Sync the schedule of the app with the schedule monitor │
│ rconfig:web-user │ Print the OS user Horizon and the scheduler should run as on this host │
└────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┘
2.2 命令分类速查
| 类别 | 命令 | 典型场景 |
|---|---|---|
| 清单报表 | list、list-devices、list-categories、list-tags、list-tasks、report-lastDownload、web-user | 查 ID、审计备份状态 |
| 配置下载 | download-device、download-category、download-tag、download-task | 按需备份、连通性排障 |
| 缓存队列 | clear-all、clear-horizon、sync-tasks、config-summaries-sync | 改配置后生效、队列清理 |
| 安全加固 | redis-secure、redis-security-check、check-worker-user、set-config-permissions、ssl-self-signed、clone-templates、setup-cron | 加固、审计、合规 |
| 数据维护 | archive-logs、purge-failedconfigs、search-configs(已停用) | 日志归档、失败记录清理 |
| 第三方导入 | rancid-*、oxidized-*、netmri-*、solarwinds-* 四族 | 从既有平台迁移设备清单 |
💡 说明:8.2.19 的
rconfig:list比官方文档站列出的命令多出 NetMRI 与 SolarWinds 两族导入命令及rconfig:web-user、rconfig:setup-cron——官方文档(2026-10-27 更新)尚未同步,以实际rconfig:list输出为准。
三、前置条件
- 通过 SSH 登录 rConfig 服务器,能切换 root(官方要求全部
rconfig:*命令以 root 或 sudo 运行,因为要读写应用目录、cron 与服务配置); - 进入应用目录再执行,所有命令格式统一为
php artisan [命令] [参数] [选项]:
cd /var/www/html/rconfig
- 下载类命令依赖设备连接配置(设备、类别/标签/任务、命令组)已在 Web 端或数据库中就绪——先用第四章的清单命令确认对象 ID;
- 本地模拟设备环境(如需复现本文回显):先启动设备端模拟脚本监听 22 端口,再在 rConfig 中添加指向 127.0.0.1 的设备。
四、清单与报表类命令
4.1 清单四件套:list-devices / list-categories / list-tags / list-tasks
下载类命令都要传对象 ID,这四条命令用于查 ID(输出即实测):
php artisan rconfig:list-devices
Results for Devices List:
+----+---------------+-----------+----------------+
| ID | DEVICE NAME | DEVICE IP | |
+----+---------------+-----------+----------------+
| 1 | lab-router-01 | 127.0.0.1 | /device/view/1 |
+----+---------------+-----------+----------------+
php artisan rconfig:list-categories
Results for Categories List:
+----+---------------+----------------+
| ID | CATEGORY NAME | |
+----+---------------+----------------+
| 1 | Routers | /commandgroups |
| 2 | Switches | /commandgroups |
| 3 | Firewalls | /commandgroups |
+----+---------------+----------------+
php artisan rconfig:list-tags
Results for Tags List:
+----+----------+-------+
| ID | TAGNAME | |
+----+----------+-------+
| 1 | Routers | /tags |
| 2 | Switches | /tags |
+----+----------+-------+
php artisan rconfig:list-tasks
实测回显(本环境无定时任务,表格为空):
Results for Tasks List:
+----+------+-------------+
| ID | NAME | DESCRIPTION |
+----+------+-------------+
💡 说明:表格末列(设备明细页/管理页的站内路径)是命令自带的跳转提示;
list-tasks为空说明环境尚未创建定时下载任务,对应download-task也无可下载对象。
4.2 备份状态报表:report-lastDownload
审计每台设备最近一次配置下载情况的核心报表命令:
php artisan rconfig:report-lastDownload
实测回显:
Results for Latest Configs List:
+----+-----------+---------------+----------+--------------+-----------+---------------------+
| ID | DEVICE ID | DEVICE_NAME | CATEGORY | COMMAND | FILE SZIE | CREATED DATE |
+----+-----------+---------------+----------+--------------+-----------+---------------------+
| 7 | 1 | lab-router-01 | Routers | show clock | 42 | 2026-10-28 00:35:03 |
| 8 | 1 | lab-router-01 | Routers | show version | 519 | 2026-10-28 00:35:03 |
| 9 | 1 | lab-router-01 | Routers | show run | 957 | 2026-10-28 00:35:03 |
+----+-----------+---------------+----------+--------------+-----------+---------------------+
按设备×命令逐行列出最近一次成功下载的时间与文件大小(表头 FILE SZIE 为应用原文,系官方拼写笔误)。运维上用它快速定位「久未备份」的设备:把该命令接入每日巡检脚本,对 CREATED DATE 超过阈值的行告警。
4.3 运行身份查询:web-user
打印 Horizon 与调度器在本机应以哪个 OS 用户运行(实测 Ubuntu 上为 www-data):
php artisan rconfig:web-user
实测回显:
www-data
五、配置下载类命令
5.1 单设备下载:download-device
最常用的按需备份与排障命令。参数为设备 ID(可多个、空格分隔),-d 打开调试输出:
php artisan rconfig:download-device 1
实测回显:
Start rconfig:download-device IDs:1
Start device download for lab-router-01 ID:1
Config downloaded for lab-router-01 with command: "show clock" was successful
Config downloaded for lab-router-01 with command: "show version" was successful
Config downloaded for lab-router-01 with command: "show run" was successful
End rconfig:download-device
每条下载命令对应一个配置文件落盘(目录结构:storage/app/rconfig/data/<类别>/<设备名>/<年>/<月>/<日>/),实测:
ls -la /var/www/html/rconfig/storage/app/rconfig/data/Routers/lab-router-01/2026/Oct/28/ | tail -4
实测回显:
-r--r----- 1 www-data www-data 42 Oct 28 00:35 showclock_040.txt
-r--r----- 1 www-data www-data 519 Oct 28 00:35 showver_041.txt
-r--r----- 1 www-data www-data 957 Oct 28 00:35 showrun_042.txt
(权限 0440、属主 www-data,与《rConfig 8.2.19 配置参数详解》5.7 节的权限参数一致。)
排障时加 -d,会输出连接过程、发送的命令与设备回显全文(官方文档定位连接问题的首选手段):
php artisan rconfig:download-device 1 -d
5.2 按类别下载:download-category
对某类别(Command Group)下全部设备批量下载,参数为类别 ID,可一次多个:
php artisan rconfig:download-category 1
实测回显(输出节选,实测尾部):
Config downloaded for lab-router-01 with command: "show clock" was successful
Config downloaded for lab-router-01 with command: "show version" was successful
Config downloaded for lab-router-01 with command: "show run" was successful
End rconfig:download-category
多类别一次执行:php artisan rconfig:download-category 1 2 3。
5.3 按标签下载:download-tag
对打了指定标签的全部设备下载,参数为标签 ID:
php artisan rconfig:download-tag 1
实测回显(标签 1 未挂接设备时的真实输出):
Start rconfig:download-tag IDs:1
No devices returned for this category with ID: 1. Downloader will try next category in the list, or terminate!
End rconfig:download-tag
⚠️ 注意:标签下没有设备时命令正常结束(不报错),提示语沿用了「category」字样——遇到该提示先确认标签是否已在 Web 端关联设备,而不是连接故障。
5.4 按定时任务下载:download-task
对指定定时任务关联的设备组触发一次立即下载,参数为任务 ID:
php artisan rconfig:download-task 2
实测回显(任务不存在时的真实输出):
This operation can take some time, depending on how many devices are configured for this task!!!
Start rconfig:download-task IDs:2
No task records returned. Download will now terminate!
⚠️ 注意:命令会先打印「耗时可能较长」的固定提示再执行;
No task records returned说明任务 ID 无效或任务下无设备,先用rconfig:list-tasks核对。
六、缓存与队列运维命令
6.1 一键清缓存:clear-all
改配置、排障后最常用的命令:清空并重建全部缓存、重启队列(实测完整回显):
php artisan rconfig:clear-all
------ Begin rConfig Laravel Clear Out! ------
------ Config Cleared! ------
------ Cache Cleared! ------
------ Routes Cleared! ------
------ Views Cleared! ------
------ Config Cached! ------
------ Routes Cached! ------
------ Views Cached! ------
------ Optimized! ------
------ Queues Restarted! ------
------ Horizon Restarted! ------
官方 8.2.19 行为说明:该命令通过 horizon:terminate 让 Horizon 退出、由 Supervisor 重新拉起(新配置生效),不再重启 Supervisor 本身,因此无需 sudo 也不会波及同机其他应用;8.2.19 起 update.sh 升级时会自动清缓存重建,升级后无需手动执行。
⚠️ 注意:root 身份执行会重建出 root 属主的缓存文件,执行后必须补一条
chown -R www-data:www-data storage bootstrap/cache(或改用sudo ./update.sh --no-pull)。顺序与原因见安装指南第九章 Q5。
6.2 清理队列历史:clear-horizon
清空 Horizon 队列执行历史与失败任务表,用于数据库清理和队列卡死后的重置:
php artisan rconfig:clear-horizon
实测回显(输出节选,实测尾部):
each individual failed job flushed
failed_jobs flushed
6.3 任务计划同步:sync-tasks
把应用中的定时下载任务同步到调度监视器,新建/修改任务或任务不跑时执行:
php artisan rconfig:sync-tasks
实测回显:
Syncing tasks...
Start syncing schedule with database...
Syncing 0 tasks...
6.4 配置统计同步:config-summaries-sync
把各设备配置数量统计写入汇总表(仪表盘加速用),官方计划每天 03:00 自动执行;批量导入配置后、仪表盘统计异常时手动跑:
php artisan rconfig:config-summaries-sync
实测回显:
Config count sync started!
Config count sync completed!
七、安全与加固类命令
7.1 Redis 密码加固:redis-secure 与 redis-security-check
redis-security-check 只读检查 Redis 认证状态(退出码 0=已要求密码,1=未要求密码,2=连不上):
php artisan rconfig:redis-security-check
实测回显:
INFO Redis requires authentication.
Password required ...................................................... yes
App can authenticate ................................................... yes
Bind (context only) .......................................... 127.0.0.1 ::1
Protected mode (context only) .......................................... yes
Bind and protected-mode are context only and never indicate a secure instance.
输出末行是官方强调的设计口径:只绑定本机不算安全控制,只有强制密码才算——所以即使 bind 127.0.0.1,健康面板仍以「是否要求密码」为准。
redis-secure 生成强密码并写入 .env 的 REDIS_PASSWORD、下发到运行中的 Redis 并持久化到其配置文件,最后重启队列消费者。支持预演与轮换:
php artisan rconfig:redis-secure --dry-run # 预演,不改任何东西
php artisan rconfig:redis-secure # 首次加固
php artisan rconfig:redis-secure --force # 轮换密码(已设密码时用)
php artisan rconfig:redis-secure --no-restart # 只应用密码不重启队列
实测回显(已加固状态下预演):
INFO [dry run] Redis is already secured and in sync. Nothing would change.
⚠️ 注意:安装向导已自动执行过该命令(
.env中REDIS_PASSWORD即其产物)。若.env与 Redis 服务端密码不一致(队列报NOAUTH),用--force重新生成并下发,详见《rConfig 8.2.19 配置参数详解》第七章 Q2。
7.2 队列降权审计:check-worker-user
检查 Horizon 进程、调度器 cron 文件(/etc/cron.d/rconfig-core)、root 的 crontab 与 Supervisor 配置中有没有以 root 运行的部分,8.2.19 新增:
sudo php artisan rconfig:check-worker-user # 以 root 跑才会检查 root 的 crontab
sudo php artisan rconfig:check-worker-user --json # 脚本/监控用机器可读输出
判定口径:无 FAIL 行即通过(退出码 0);出现 FAIL(退出码 1)时官方修复入口为 sudo ./update.sh --no-pull。仪表盘 Worker Privilege 健康项读取的就是这份报告。
⚠️ 注意:该命令的逐项检查依赖主机形态,本文实测环境未采集到逐项 PASS/FAIL 报告原文;判定口径与修复路径以上述官方文档为准,属本文未实测项。
7.3 配置文件权限修复:set-config-permissions
对已落盘的设备配置文件与目录重新套用 0440/0750 安全权限(8.2.14 新增)。升级后、改过 .env 权限参数后、安全审计时使用:
php artisan rconfig:set-config-permissions --dry-run # 预演不改动
php artisan rconfig:set-config-permissions -v # 逐路径显示当前/目标权限
php artisan rconfig:set-config-permissions # 实际应用
实测回显(预演):
[dry run] Applying file mode 440 and directory mode 750
Scanning /var/www/html/rconfig/storage/app/rconfig/data/
Scanning /var/www/html/rconfig/storage/app/rconfig/tempdir/
[dry run] 1 file(s) and 1 director(ies) would be changed.
扫描范围含配置数据目录、各级子目录、全部配置文件以及比对配置用的临时目录。命令应以配置属主(通常 www-data)或 root 运行;有跳过的路径时会以非零退出码报告。
7.4 HTTPS 一键加固:ssl-self-signed
把全新安装从 HTTP 迁到 HTTPS:生成自签名证书、添加 HTTPS 虚拟主机与 80→443 重定向、放行防火墙端口、重启 Apache 并更新 APP_URL(8.2.19 新增,须 root):
cd /var/www/html/rconfig
sudo php artisan rconfig:ssl-self-signed --dry-run # 预演
sudo php artisan rconfig:ssl-self-signed # 执行
sudo php artisan rconfig:ssl-self-signed --hostname=rconfig.example.com # 指定证书域名
常用选项:--days=825(证书有效期,1~3650 天,默认 825)、--no-redirect(保留 HTTP 不重定向)、--force(重新签发)。行为要点:只写自己的文件(Ubuntu 上为 /etc/apache2/sites-available/rconfig-ssl.conf 与 /etc/ssl/ 下的证书私钥),不动 rconfig-vhost.conf,因此不影响 update.sh 拉取代码;重启前先跑 apachectl configtest,配置被拒则全部回滚;重复执行安全(已设置则提示并跳过)。
⚠️ 注意:自签名证书浏览器会告警,生产建议替换为 Let's Encrypt 或企业 PKI 签发的受信证书。该命令要求 root 并直接改写 Apache 配置与证书文件,对运行环境有硬性前提,本文未在实测环境中执行(属未实测项),以上口径来自官方文档。
7.5 设备模板更新:clone-templates
从官方模板仓库拉取最新厂商设备模板(新设备支持、模板修复):
php artisan rconfig:clone-templates
实测回显:
Cloning into 'rConfig-templates'...
Clone from https://github.com/rconfig/rconfig-templates successful!
⚠️ 下载渠道说明:该命令直连 GitHub 拉取,实测当次可用;若克隆超时,按代理环境变量方式(
export http_proxy=http://192.168.1.62:7897 https_proxy=http://192.168.1.62:7897)重跑即可。建议每月定期执行保持模板更新。
7.6 调度器安装:setup-cron
以 Web 用户身份在 /etc/cron.d 安装调度器文件(内部执行 setup_cron.sh,需 root)。安装向导会询问是否安装;向导非 root 运行时未装上的,用该命令补装:
sudo php artisan rconfig:setup-cron
cat /etc/cron.d/rconfig-core # 验证文件存在,内容见安装指南 6.5 节
八、数据维护与迁移类命令
8.1 活动日志归档:archive-logs
把 activity_log 表中过旧的记录转入归档表,保持库表性能。两种口径二选一:
php artisan rconfig:archive-logs --days=90 # 归档 90 天前的记录
php artisan rconfig:archive-logs --rows=10000 # 按行数归档
实测回显(--rows=1 验证):
1 logs entries sent to activity log archive table!
8.2 清理失败下载记录:purge-failedconfigs
清除设备配置下载失败的历史记录(清理 failed_configs 数据),可按设备或全量:
php artisan rconfig:purge-failedconfigs 1 2 # 指定设备
php artisan rconfig:purge-failedconfigs --all # 全部设备
实测回显:
0 invalid or failed configurations purged!
8.3 配置全文检索:search-configs(已停用,实测)
官方文档(2026-10-27 更新)仍收录该命令并给出单参数用法,但当前版本实测已停用。先看参数校验(第一条参数绑定到 Category,缺少 SearchString 时报错):
php artisan rconfig:search-configs "ntp server"
实测回显:
Not enough arguments (missing: "SearchString").
补齐两参数后再执行,返回停用提示:
php artisan rconfig:search-configs 1 "ntp"
实测回显:
This command has been discontinued. Please contact support if you still require it.
⚠️ 结论:配置内容检索请改用 Web 端的 Config Search 功能(基于已下载配置的全文检索),CLI 通道在 8.2.19 已关闭。
8.4 第三方平台导入命令族
四组迁移命令(RANCID / Oxidized / NetMRI / SolarWinds),每组四个角色:-connection(连接配置)、-load-devices(拉取对端设备清单生成导入 JSON)、-import-devices(把 JSON 导入 rConfig 库)、-device-mappings(设备类型到 rConfig 模板的映射管理)。以 Oxidized 为例:
php artisan rconfig:oxidized-load-devices # 连接 Oxidized 实例拉取设备清单
php artisan rconfig:oxidized-import-devices /path/to/devices.json # 从 JSON 导入
php artisan rconfig:oxidized-device-mappings # 管理设备类型映射
RANCID 族前提是对端 RANCID 的安装与配置文件可读;Oxidized/NetMRI/SolarWinds 族前提是在 rConfig 设置中配置好对端连接。本文无真实第三方平台环境,导入链路未实测(未实测项);迁移场景的完整流程以官方 Oxidized/RANCID Import 文档为准。
九、注意事项
- 全部命令以 root 或 sudo 运行,且必须在
/var/www/html/rconfig目录内执行(依赖应用自身的 autoload 与 .env); - root 跑完
clear-all必须补 chown:chown -R www-data:www-data storage bootstrap/cache,否则 Web 用户无法覆盖缓存文件(复现「500 空白页」); - 下载命令失败先看三层:
-d调试输出(连接过程)→rconfig:report-lastDownload(哪台设备、哪条命令失败)→storage/logs/laravel.log(应用异常栈); --dry-run优先:set-config-permissions、redis-secure、ssl-self-signed三个有副作用的加固命令都提供--dry-run,变更前先预演;- 运维组合参考(可直接落 crontab 的巡检思路,示例为用户脚本逻辑):先用
rconfig:list-devices导出设备清单,随后rconfig:download-device <ID>触发按需备份,最后rconfig:report-lastDownload比对每行CREATED DATE是否超过 SLA 阈值,超期的设备名写入告警文件; - 命令输出即审计证据:
report-lastDownload、redis-security-check --json、check-worker-user --json均适合接入自动化巡检与合规留档。
十、常见问题(FAQ)
Q1:rconfig:download-device 报设备不存在或 No device records returned。
ID 传错或设备已删除。先 php artisan rconfig:list-devices 核对真实 ID 再重试(本文所有下载回显中的 ID=1 即来自该清单)。
Q2:下载挂起不动或超时后失败。
多为设备端问题:凭据错误、enable 密码缺失、设备提示符(prompt)与 rConfig 中登记的不一致。用 -d 重跑看交互过程;提示符应登记为纯正则体(如 rconfig-lab#),带斜杠分隔符的写法会导致匹配失败。实测环境正是通过修正提示符登记解决了下载挂起。
Q3:配置下载成功但 report-lastDownload 里没有记录。
统计汇总未刷新,执行 php artisan rconfig:config-summaries-sync(官方设计为每日 03:00 自动跑,手动触发即时生效)。
Q4:执行命令报 Could not open input file: artisan。
不在应用目录。先 cd /var/www/html/rconfig 再执行(全部命令的前置,见第三章)。
Q5:clear-horizon 后队列任务还在报旧错误。
clear-horizon 只清历史与失败任务表,不清配置缓存。若错误源于旧配置(如 Redis 密码),还需 php artisan rconfig:clear-all(含 Horizon 重启,见 6.1 节回显)。
Q6:purge-failedconfigs 提示 0 条但设备确实在报下载失败。
该命令清的是历史失败记录,不解决失败本身。按第九章第 3 条的三层定位法排障;失败记录会在下次下载失败时重新累积。
Q7:archive-logs 能否把日志彻底删除?
不能,它是「归档」——把 activity_log 表的旧行搬到归档表(实测回显见 8.1 节),库文件不会缩小;若要释放磁盘空间需另行维护数据库,操作前先备份。
十一、参考链接
- 官方 CLI Commands Reference:https://v8coredocs.rconfig.com/core-concepts/cli-commands
- 官方 Device Connectivity Troubleshooting(
-d调试排障):https://v8coredocs.rconfig.com/troubleshooting/device-connectivity-tip - 官方 Worker Privilege(check-worker-user 各行含义):https://v8coredocs.rconfig.com/authentication-security/worker-privilege
- 官方 Redis Authentication:https://v8coredocs.rconfig.com/authentication-security/redis-authentication
- 官方 SSL Configuration:https://v8coredocs.rconfig.com/authentication-security/ssl-configuration
- GitHub 模板仓库:https://github.com/rconfig/rconfig-templates
- 本系列前置阅读:《rConfig 介绍与选型指南》、《rConfig 8.2.19 Ubuntu 22.04 安装指南》、《rConfig 8.2.19 配置参数详解》