banner
miaoer

miaoer

喵二の小博客 xLog 分站
tg_channel
telegram

CatWrt 扩展应用安装,全系生态通用

开始#

在 CatWrt-v22.11 固件中我们实现了早期提出软件源设计,可以缓解 CatWrt 过于臃肿的问题。这一篇看完相信你会对 opkg 软件包管理器有很明显的认知,并且配合下篇博客即便你是小白也是很轻松就完成部署应用。

本教程可能不适用其他 OpenWrt/LEDE,除非内核版本一致;

需要准备一个聪明的脑子,在部分地区可能需要网络加速!

CatWrt 仓库

CatWrt 集合

::: warning
推荐完整看完,然后文章底部看 第二篇 排查问题。
:::


opkg#

opkg 工具是一个用来从本地软件仓库或互联网软件仓库上下载并安装 OpenWrt 软件包的轻量型软件包管理器。

GNU/Linux 用户可能会对 apt-getpacmanyum 等包管理器比较熟悉,也会看出其相似之处,这里 CatWrt 也不例外我们的固件可以使用附带了大量的软件包但是为了防止免费资源的滥用,默认是没有配置软件源到 CatWrt 仓库的需要按照本篇博客了解并且熟悉换源,默认就使用腾讯云提供的软件包仓库。

插件#

首先在安装插件之前你需要了解这些,避免在安装过程中碰壁。

LuCI 通常指代插件应用的前端管理面板,一个应用在 OpenWrt 分为插件 (luci-app) + 语言 (luci-i18n) + 软件 + 依赖,插件在保存并应用的时候会由 LuCI 前端交给 uci 去应用插件设置例如开启或者修改配置项来达到开启软件的效果。

说个简单的,我们这里不推荐进行离线安装,例如你下载了一个 luci-app-xxx.ipk 的包他还需要软件本体 + 运行依赖的 ipk 文件,不仅仅要仔细看缺少什么依赖,这个依赖可能千奇百怪例如安装 iStore 商店以及 oc 猫猫都是依赖多的出奇的插件那种还有可能下载了本体并没有中文包 i18n 的问题。

因此使用软件源是势在必得的,这也是使用 GNU/Linux 的基础技能,软件源的每一次 opkg update 的是在指定的源中拉取每一个索引文件,并不是把所有的插件都下载下来更不是固件更新的意思。

下面就开始选择自己的 CatWrt 架构软件源,相信在看完后你也可以安装不同的扩展应用。

插件过多可能会导致软路由不稳定!只保证你能安装使用不保证整体固件稳定性。

架构选择#

x86 和 ARM#

x86 和 ARM (rockchip) 软路由,通常代表是以软件路由器的方式不具备硬件加速和无线 Wi-Fi 功能。

需要完成对 CatWrt 做扩容工作,需要扩容 overlay 分区和 Docker 分区,建议在分区时预留 200M 闲置硬盘空间用于未来的升级,其他分区可以尽可能的大。

在 v23.8 往后都预留了足够多的可用空间则不需要扩容,除非你的应用需要安装非常多。

扩容教程

OpenWrt 扩容 overlay 分区教程

软路由空间不够?扩容 overlay 的根

Wireless#

CatWrt Wireless 系列硬路由安装的插件,通常代表具有无线 Wi-Fi 功能的家用路由器。

  • MT798x 在 v23.8 版本后都是精简固件,可用空间充足可用安装一些简单的基础应用
  • MT7621 精简固件,不建议安装一堆插件,放过这颗处理器吧

软件源#

假如使用前已经刷新列表 opkg update 请先在终端 rm -f /var/lock/opkg.lock 清理掉默认腾讯源的索引文件,再将源索引填入 CatWrt 发行版软件源中再刷新。

如果不可用无法连接,可以在底部寻找其他源的使用方法示例,当然你也可以在使用之前就测试每一个可用的源。

设置软件源#

系统 - 软件包 - 配置 - 发行版软件源 栏复制指定在线软件源内容粘贴。

如果你不会部署软件源网站也不用历史版本,就只需要使用在线软件源的方法填写。

使用在线软件源#

x86-64

传统 x86 软路由 (amd64)

版本:v23.8

src/gz openwrt_core https://repo.miaoer.xyz/targets/x86/64/packages
src/gz openwrt_base https://repo.miaoer.xyz/x86_64/base
src/gz openwrt_luci https://repo.miaoer.xyz/x86_64/luci
src/gz openwrt_packages https://repo.miaoer.xyz/x86_64/packages
src/gz openwrt_routing https://repo.miaoer.xyz/x86_64/routing
src/gz openwrt_telephony https://repo.miaoer.xyz/x86_64/telephony

mt798x

支持 TP-link TL-XDR 4288/6086/6088,Xiaomi Redmi AX6000,Xiaomi WR30U,jcg q30,GL.inet mt3000,H3C nx30Pro

版本:v23.8

src/gz openwrt_core https://repo.miaoer.xyz/targets/mt798x/filogic/packages
src/gz openwrt_base https://repo.miaoer.xyz/mt798x/base
src/gz openwrt_luci https://repo.miaoer.xyz/mt798x/luci
src/gz openwrt_packages https://repo.miaoer.xyz/mt798x/packages
src/gz openwrt_routing https://repo.miaoer.xyz/mt798x/routing
src/gz openwrt_telephony https://repo.miaoer.xyz/mt798x/telephony

aarch64_generic

电犀牛 r66s,友善 r5s (适配问题仅可用机型)

版本:v22.12

src/gz openwrt_core https://repo.miaoer.xyz/targets/rockchip/armv8/packages
src/gz openwrt_base https://repo.miaoer.xyz/aarch64_generic/base
src/gz openwrt_luci https://repo.miaoer.xyz/aarch64_generic/luci
src/gz openwrt_packages https://repo.miaoer.xyz/aarch64_generic/packages
src/gz openwrt_routing https://repo.miaoer.xyz/aarch64_generic/routing
src/gz openwrt_telephony https://repo.miaoer.xyz/aarch64_generic/telephony

mt7621

小米 / 红米 AC2100,新路由 3(Newifi_d2)

版本:v22.12

src/gz openwrt_core https://repo.miaoer.xyz/targets/ramips/mt7621/packages
src/gz openwrt_base https://repo.miaoer.xyz/mipsel_24kc/base
src/gz openwrt_luci https://repo.miaoer.xyz/mipsel_24kc/luci
src/gz openwrt_packages https://repo.miaoer.xyz/mipsel_24kc/packages
src/gz openwrt_routing https://repo.miaoer.xyz/mipsel_24kc/routing
src/gz openwrt_telephony https://repo.miaoer.xyz/mipsel_24kc/telephony

换源#

换可用源#

有时候 Cloudflare 并不是能访问的情况下,替换一下域名即可

例如使用 vercel 提供的直连节点源

src/gz openwrt_core https://vercel.catwrt.eu.org/targets/mt798x/filogic/packages
src/gz openwrt_base https://vercel.catwrt.eu.org/mt798x/base
src/gz openwrt_luci https://vercel.catwrt.eu.org/mt798x/luci
src/gz openwrt_packages https://vercel.catwrt.eu.org/mt798x/packages
src/gz openwrt_routing https://vercel.catwrt.eu.org/mt798x/routing
src/gz openwrt_telephony https://vercel.catwrt.eu.org/mt798x/telephony

使用历史(LTS)源#

在博客发布的都是长期支持版本 (LTS) 历史版本都加在 /history 文件夹内

以 CatWrt.v22.2 x86_64 示例

src/gz openwrt_core https://repo.miaoer.xyz/history/v22.2/targets/x86/64/packages
src/gz openwrt_base https://repo.miaoer.xyz/history/v22.2/x86_64/base
src/gz openwrt_luci https://repo.miaoer.xyz/history/v22.2/x86_64/luci
src/gz openwrt_oui https://repo.miaoer.xyz/history/v22.2/x86_64/oui
src/gz openwrt_packages https://repo.miaoer.xyz/history/v22.2/x86_64/packages
src/gz openwrt_routing https://repo.miaoer.xyz/history/v22.2/x86_64/routing
src/gz openwrt_telephony https://repo.miaoer.xyz/history/v22.2/x86_64/telephony

部署软件源#

你可以将此仓库部署在你自己的服务器上搭建属于自己的软件源


  • 使用 Docker 部署
$ docker run -d -p 1480:80 miaoer/catwrt-soft:latest

或拉取到本地使用 docker-compose 启动

$ wget https://fastly.jsdelivr.net/gh/miaoermua/CatWrt@main/docker-compose.yml

$ docker compose up -d  
# docker-compose up -d
  • 使用 Linux 面板部署

将此仓库通过 git clone 拉取到服务器网站目录里,修改面板网站目录到 CatWrt 中;

部署完成后再按照架构平台或系列修改模板到本地部署中。

安装方法#

在操作前请务必看,执行命令前区分出 $,在以下选择中二选一即可。

LuCI 中安装#

在你操作之前请先完成更新软件源

系统 - 软件包 - 动作 - 刷新列表

插件列表可以先添加到自定义软件源里,刷新后查看 系统 - 软件源 - 动态 - 可用软件包 L

并且尝试 CTRL + F 搜索 luci-app

先进行更新再安装插件,当然这里可以先安装 luci-i18n-xxxxx-zh-cn 类似这样的包就是中文包,安装中文包即安装插件但部分软件可能需要分开安装,视情况决定。

image

终端中安装#

这边只建议有一定经验的人操作,在终端执行,这里以安装动态 DNS 举例;

先进行更新再安装插件,当然这里可以先安装 luci-i18n-xxxxx-zh-cn 类似这样的包就是中文包,安装中文包即安装插件但部分软件可能需要分开安装,视情况决定。

$ opkg update  ## 更新软件源

$ opkg install luci-app-ddns  ## 插件

$ opkg install luci-i18n-ddns-zh-cn  ## 插件中文包

下面是以 CatWrt 安装 iStore 商店举例;

这里已经使用了 CatWrt 软件源并且覆盖到了发行版软件源中,执行 opkg update 拉取软件源索引文件并且执行 opkg install luci-app-store

BusyBox v1.36.0 (2023-07-05 11:34:20 UTC) built-in shell (ash)


     _____     _             _
    |     |___| |_ _ _ _ ___| |_
    |   --| .'|  _| | | |  _|  _|
    |_____|__,|_| |_____|_| |_|
   W I R E L E S S   F R E E D O M

======================================
         CatWrt.v23.8.x86_64
           Blog: miaoer.xyz
 OpenWrt: Lean source r6134-961ee0e81
======================================
root@CatWrt:~# opkg update
Downloading https://netlify.catwrt.eu.org/targets/x86/64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://netlify.catwrt.eu.org/targets/x86/64/packages/Packages.sig
Signature check passed.
Downloading https://netlify.catwrt.eu.org/x86_64/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://netlify.catwrt.eu.org/x86_64/base/Packages.sig
Signature check passed.
Downloading https://netlify.catwrt.eu.org/x86_64/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://netlify.catwrt.eu.org/x86_64/luci/Packages.sig
Signature check passed.
Downloading https://netlify.catwrt.eu.org/x86_64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://netlify.catwrt.eu.org/x86_64/packages/Packages.sig
Signature check passed.
Downloading https://netlify.catwrt.eu.org/x86_64/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://netlify.catwrt.eu.org/x86_64/routing/Packages.sig
Signature check passed.
Downloading https://netlify.catwrt.eu.org/x86_64/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://netlify.catwrt.eu.org/x86_64/telephony/Packages.sig
Signature check passed.
root@CatWrt:~# opkg install luci-app-store
Installing luci-app-store (0.1.14-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/luci-app-store_0.1.14-1_all.ipk
Installing xz-utils (5.4.1-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/packages/xz-utils_5.4.1-1_x86_64.ipk
Installing liblzma (5.4.1-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/packages/liblzma_5.4.1-1_x86_64.ipk
Installing xz (5.4.1-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/packages/xz_5.4.1-1_x86_64.ipk
Installing libbz2-1.0 (1.0.8-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/libbz2-1.0_1.0.8-1_x86_64.ipk
Installing bzip2 (1.0.8-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/bzip2_1.0.8-1_x86_64.ipk
Installing tar (1.34-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/packages/tar_1.34-1_x86_64.ipk
Installing coreutils-stat (9.1-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/packages/coreutils-stat_9.1-1_x86_64.ipk
Installing luci-lib-xterm (4.18.0) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/luci-lib-xterm_4.18.0_all.ipk
Installing script-utils (2.38.1-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/script-utils_2.38.1-1_x86_64.ipk
Installing coreutils-stty (9.1-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/packages/coreutils-stty_9.1-1_x86_64.ipk
Installing taskd (1.0.3-1) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/taskd_1.0.3-1_all.ipk
Installing luci-lib-taskd (1.0.17) to root...
Downloading https://netlify.catwrt.eu.org/x86_64/base/luci-lib-taskd_1.0.17_all.ipk
Configuring libbz2-1.0.
Configuring liblzma.
Configuring luci-lib-xterm.
Configuring coreutils-stat.
Configuring bzip2.
Configuring xz-utils.
Configuring xz.
Configuring tar.
Configuring script-utils.
Configuring coreutils-stty.
Configuring taskd.
Configuring luci-lib-taskd.
Configuring luci-app-store.
root@CatWrt:~# 

下篇

1

此文由 Mix Space 同步更新至 xLog
原始链接为 https://www.miaoer.xyz/posts/network/catwrt-install-application


Footnotes#

  1. https://www.miaoer.xyz/posts/network/catwrt-applist

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.