参考文章 源码 安装Ubuntu 22.04系统 以下为你详细介绍在 Windows 系统中安装 Linux 子系统 Ubuntu 22.04 的步骤:
前提条件 系统版本 :Windows 10 版本 2004 及更高版本(内部版本 19041 及更高),或者 Windows 11。启用虚拟化 :确保你的计算机已启用虚拟化功能。一般可在 BIOS 或 UEFI 设置中开启,不同品牌电脑进入设置的方式有所不同。安装步骤 步骤 1:启用适用于 Linux 的 Windows 子系统和虚拟机平台 以管理员身份运行“Windows PowerShell”。可以通过在开始菜单中搜索“Windows PowerShell”,然后右键单击它并选择“以管理员身份运行”。 在 PowerShell 窗口中,依次执行以下两条命令,每执行一条命令后等待操作完成:1 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
1 dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
执行完上述命令后,重启计算机。 步骤 2:下载并安装 Linux 内核更新包 访问 适用于 x64 计算机的 WSL2 Linux 内核更新包 下载页面。 运行下载的 .msi
文件,按照安装向导的提示完成安装。 步骤 3:将 WSL 2 设置为默认版本 在管理员权限的 PowerShell 中执行以下命令:
1 wsl --set-default-version 2
步骤 4:从 Microsoft Store 安装 Ubuntu 22.04 打开 Microsoft Store 应用程序。 在搜索框中输入“Ubuntu 22.04”。 在搜索结果中选择“Ubuntu 22.04 LTS”,然后点击“获取”或“安装”按钮。 等待安装完成,这可能需要一些时间,具体取决于你的网络速度。 步骤 5:初始化 Ubuntu 22.04 安装完成后,在开始菜单中找到“Ubuntu 22.04 LTS”并打开它。 首次启动时,系统会提示你等待几分钟进行初始化。 初始化完成后,会要求你设置一个新的 UNIX 用户账户和密码。请记住你设置的用户名和密码,后续登录和执行需要权限的操作时会用到。 验证安装 安装完成并设置好用户账户后,你可以在 Ubuntu 22.04 的终端中执行一些简单的命令来验证系统是否正常工作,例如:
该命令会显示当前系统的版本信息,如果显示为 Ubuntu 22.04 相关内容,则说明安装成功。
Ubuntu 22.04 更换国内源 在Ubuntu 22.04系统中,更换国内源可以显著提升软件下载和更新的速度。下面为你详细介绍更换国内源的步骤:
1. 备份原有的源列表文件 在进行源的更换操作之前,建议先备份系统默认的源列表文件,这样在出现问题时可以恢复到原始状态。 打开终端(可以通过按下 Ctrl + Alt + T
组合键来打开),然后执行以下命令:
1 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
此命令将 /etc/apt/sources.list
文件备份为 /etc/apt/sources.list.bak
。
2. 选择合适的国内源 国内有许多优秀的镜像源可供选择,例如阿里云、清华大学、中科大等。以下是这些镜像源对应的 sources.list
配置内容:
阿里云源 1 2 3 4 5 6 7 8 9 10 11 12 13 14 deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
清华大学源 1 2 3 4 5 6 7 8 9 10 11 12 13 14 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
中国科学技术大学源 1 2 3 4 5 6 7 8 9 10 11 12 13 14 deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
3. 编辑源列表文件 可以使用文本编辑器(如 vim
或 nano
)来编辑 /etc/apt/sources.list
文件。这里以 nano
为例:
1 sudo nano /etc/apt/sources.list
打开文件后,将原有内容全部删除,然后复制并粘贴你选择的国内源配置内容到文件中。
按下 Ctrl + X
组合键,接着按 Y
键确认保存,最后按 Enter
键退出 nano
编辑器。
4. 更新软件包列表 在更换源之后,需要更新软件包列表,让系统使用新的源来获取软件信息。执行以下命令:
该命令会从新的源服务器上下载软件包的元数据信息。
5. 升级已安装的软件包(可选) 如果你希望将系统中已安装的软件包升级到最新版本,可以执行以下命令:
此命令会根据新的源信息,将可升级的软件包进行更新。
通过以上步骤,你就可以成功地将Ubuntu 22.04的软件源更换为国内源。
搭建本地编译环境 1.安装编译依赖 1 2 3 4 5 6 7 8 9 10 11 sudo apt update -y sudo apt full-upgrade -y sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev \ libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev \ libssl-dev libtool lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 \ python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo \ uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
2.拉取Openwrt源码 我这里使用immortalwrt
的Openwrt-23.05
源码1 2 3 git clone https://ghproxy.net/https://github.com/immortalwrt/immortalwrt -b openwrt-23.05
3. 进入immortalwrt目录 4.修改更新feeds.conf.default配置 由于国内Github访问困难,所以要设置以下代理加速链接 编辑feeds.conf.default
文件 这里我认为用Visual Studio Code
连接 Windows Linux 子系统来操作比较简单 如果以下代理链接https://gh-proxy.ygxz.in/
失效可能需要自己替换 可以使用文本编辑器(如 vim
或 nano
)来编辑 /etc/apt/sources.list
文件。这里以 nano
为例:
1 sudo nano feeds.conf.default
打开文件后,将原有内容全部删除,然后复制并粘贴你选择的国内源配置内容到文件中。1 2 3 4 src-git packages https://gh-proxy.ygxz.in/https://github.com/immortalwrt/packages.git;openwrt-23.05 src-git luci https://gh-proxy.ygxz.in/https://github.com/immortalwrt/luci.git;openwrt-23.05 src-git routing https://gh-proxy.ygxz.in/https://github.com/openwrt/routing.git;openwrt-23.05 src-git telephony https://gh-proxy.ygxz.in/https://github.com/openwrt/telephony.git;openwrt-23.05
按下 Ctrl + X
组合键,接着按 Y
键确认保存,最后按 Enter
键退出 nano
编辑器。
更新feeds.conf.default
模块1 2 ./scripts/feeds update -a ./scripts/feeds install -a
5.开始本地编译.config 插件中文对照表 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 < > luci-app-3ginfo-lite..................... LuCI JS Support for 3ginfo-lite #获取3G/4G调制解调器的信息。 < > luci-app-acl.............................. LuCI account management module #管理用户访问控制列表。 < > luci-app-acme.............................. ACME package - LuCI interface #自动获取和更新SSL证书。 < > luci-app-adblock................................ LuCI support for Adblock #广告拦截功能。 < > luci-app-adblock-fast................................ AdBlock-Fast Web UI #提供快速广告拦截。 < > luci-app-adbyby-plus............................. LuCI support for Adbyby #Adbyby 的 LuCI 支持插件 < > luci-app-advanced-reboot.................. Advanced Linksys Reboot Web UI #设备重启和切换固件。 < > luci-app-ahcp..................................... LuCI Support for AHCPd #配置Ad-Hoc配置协议。 < > luci-app-airplay2....................... Luci for Apple Airplay2 Receiver #支持AirPlay 2的流媒体服务。 < > luci-app-airwhu #与WHU Air协作的应用。 < > luci-app-alist........................................ LuCI app for AList #管理文件和目录列表。 < > luci-app-amule.................................... LuCI support for Amule #集成aMule电驴客户端。 < > luci-app-apinger............................ LuCI support for the Apinger #网络延迟监控。 < > luci-app-appfilter................................ Open App Filter Module #应用过滤和管理。 <*> luci-app-argon-config................. LuCI for Argon theme configuration #Argon主题配置。 < > luci-app-aria2.................................... LuCI Support for Aria2 #集成Aria2下载工具。 < > luci-app-arpbind............................................. ARP Binding #绑定IP和MAC地址。 < > luci-app-attendedsysupgrade........ LuCI support for attended sysupgrades #支持系统在线升级。 < > luci-app-autoreboot.................... LuCI support for Scheduled Reboot #自动重启设备。 < > luci-app-babeld.................................. LuCI support for babeld #Babel路由协议配置。 < > luci-app-baidupcs-web....................... LuCI support for BaiduPCS-Go #百度网盘命令行工具 BaiduPCS - Go 的 LuCI 支持插件 < > luci-app-banip.................................... LuCI support for banIP #基于IP的访问控制。 < > luci-app-bcp38...................................... BCP38 LuCI interface #防止IP地址伪造。 < > luci-app-bird1-ipv4.................. LuCI support for BIRD (v1.6) (IPv4) #BIRD(v1.6)IPv4 版本的 LuCI 支持插件 < > luci-app-bird1-ipv6.................. LuCI support for BIRD (v1.6) (IPv6) #BIRD(v1.6)IPv6 版本的 LuCI 支持插件 < > luci-app-bitsrunlogin-go #推测与北理网络认证登录相关的 Go 版本的 LuCI 支持插件 运行登录脚本。 < > luci-app-bmx7...................................... LuCI support for BMX7 #配置BMX7路由协议。 < > luci-app-cd8021x..................... a wired IEEE 802.1x client for Luci #提供802.1x认证支持。 < > luci-app-cifs.............................................. luci-app-cifs #CIFS文件共享支持。 < > luci-app-cifs-mount.............................. LuCI for SMB/CIFS Mount #挂载CIFS网络共享。 < > luci-app-cjdns............ Encrypted near-zero-conf mesh routing protocol #配置和管理CJDNS网络。 < > luci-app-clamav.................................... ClamAV LuCI interface #集成ClamAV防病毒工具。 < > luci-app-cloudflared................................ LuCI for Cloudflared #配置Cloudflare隧道服务。 < > luci-app-commands.............................. LuCI Shell Command Module #运行自定义命令。 < > luci-app-cpulimit.......................... cpulimit configuration module #限制进程的CPU使用率。 < > luci-app-crowdsec-firewall-bouncer #集成CrowdSec防火墙。 < > luci-app-cshark........................... Cloudshark capture tool Web UI #集成CShark网络分析工具。 < > luci-app-dawn...................................... LuCI support for DAWN #动态无线网状网络。 < > luci-app-dcwapd........ Dual Channel Wi-Fi AP Daemon configuration module #配置DCWAPD。 < > luci-app-ddns......... LuCI Support for Dynamic DNS Client (ddns-scripts) #动态DNS服务。 < > luci-app-ddns-go................................ LuCI support for DDNS-Go #配置DDNS-Go。 < > luci-app-diag-core......................... LuCI Diagnostics Tools (Core) #LuCI 诊断工具(核心部分) < > luci-app-diskman......................... Disk Manager interface for LuCI #磁盘管理工具。 [*] Include btrfs-progs #包含Btrfs文件系统工具。 [*] Include lsblk #包含lsblk命令行工具。 [ ] Include mdadm #包含mdadm RAID管理工具。 < > luci-app-dnscrypt-proxy.................. LuCI support for DNSCrypt-Proxy #配置DNSCrypt代理。 < > luci-app-dufs...................................... LuCI support for dufs #配置DNS过滤器。 < > luci-app-dump1090.............................. LuCI Support for dump1090 #飞机模式监控。 < > luci-app-dynapoint............................ LuCI Support for DynaPoint #动态接口管理。 < > luci-app-eoip...................................... LuCI Support for EoIP #EOIP隧道支持。 < > luci-app-eqos.................................. LuCI support for Easy QoS #配置eQoS服务。 < > luci-app-example...................... LuCI example app for js based luci #示例应用。 < > luci-app-fileassistant.................... LuCI support for Fileassistant #文件管理助手。 < > luci-app-filebrowser............................ LuCI app for FileBrowser #文件浏览器。 -*- luci-app-firewall................ Firewall and Portforwarding application #防火墙配置管理。 < > luci-app-frpc................................ LuCI Support for frp client #FRP客户端配置。 < > luci-app-frps................................ LuCI Support for frp server #FRP服务器配置。 < > luci-app-fwknopd #用于通过特定的端口序列触发防火墙规则,提供隐蔽的网络访问控制。 < > luci-app-gost...................................... LuCI support for Gost #一个支持多种代理和转发功能的网络工具。 < > luci-app-haproxy-tcp.................... luci for haproxy and shadowsocks #用于在 OpenWrt 上配置和管理 HAProxy 的 TCP 负载均衡功能。 < > luci-app-hd-idle......................... Hard Disk Idle Spin-Down module #用于在 OpenWrt 上配置和管理硬盘在闲置时的自动休眠功能。 < > luci-app-hnet............... HNCP Homenet configuration and visualization #用于配置和管理 HNet 网络协议 < > luci-app-homeproxy. The modern ImmortalWrt proxy platform for ARM64/AMD64 #HAProxy负载均衡器。 < > luci-app-https-dns-proxy..................... DNS Over HTTPS Proxy Web UI #HTTPS DNS代理。 < > luci-app-ipsec-vpnd #IPsec VPN配置。 < > luci-app-ipsec-vpnserver-manyusers..... LuCI support for IPSec VPN Server #用于配置和管理 IPSec VPN 服务器,支持多个用户连接 < > luci-app-kcptun.................................. LuCI support for Kcptun #用于加速网络连接的代理工具 < > luci-app-ksmbd.......... Network Shares - Ksmbd the SMB kernel fileserver #用于配置和管理 ksmbd(Kernel SMB Daemon) < > luci-app-ledtrig-rssi................... LuCI Support for ledtrigger rssi #配置LED根据RSSI信号强度闪烁。 < > luci-app-ledtrig-switch............... LuCI Support for ledtrigger switch #配置和管理基于开关的 LED 指示灯触发 < > luci-app-ledtrig-usbport............. LuCI Support for ledtrigger usbport #用于配置和管理基于 USB 端口状态的 LED 指示灯触发 < > luci-app-libreswan............ Luci Application for IPSec VPN (Libreswan) #用于配置和管理 Libreswan VPN 服务器 < > luci-app-lldpd.............................. LuCI support for LLDP daemon #配置LLDP协议。 < > luci-app-lorawan-basicstation...... LuCI Support for LoRaWAN basicstation #用于配置和管理 LoRaWAN Basic Station < > luci-app-lxc....................................... LXC management Web UI #用于配置和管理 LXC(Linux Containers)。LXC 是一种操作系统级虚拟化技术 < > luci-app-mentohust...................... MentoHUST 802.1X Client for LuCI #用于中国大学校园网的认证客户端 < > luci-app-microsocks.......................... LuCI support for MicroSocks #用于配置和管理 microsocks 服务。microsocks 是一个轻量级的 SOCKS5 代理服务器 < > luci-app-minidlna.............................. LuCI Support for miniDLNA #用于配置和管理 miniDLNA 服务。miniDLNA,轻量级的 DLNA/UPnP 媒体服务 < > luci-app-minieap.......................... minieap 802.1X Client for LuCI #用于配置和管理 miniEAP 服务。miniEAP 是一个轻量级的 EAP 认证服务,为无线网络提供用户身份验证和访问控制 < > luci-app-mjpg-streamer........ MJPG-Streamer service configuration module #用于配置和管理 mjpg-streamer 服务。通过 HTTP 流式传输 MJPEG 视频流 < > luci-app-modemband............. LuCI JS Support for modemband application #配置和管理调制解调器的频段设置 < > luci-app-msd_lite.............. LuCI support for Multi stream daemon lite #用于配置和管理 msd_lite 服务,轻量级的文件共享服务 < > luci-app-music-remote-center................ Luci for Music Remote Center #用于配置和管理 Music Remote Center 服务,音乐服务器和远程控制系统 < > luci-app-mwan3............... LuCI support for the MWAN3 MultiWAN Manager #多WAN负载均衡。 < > luci-app-mwan3helper....................... LuCI support for MWAN3 Helper #MWAN3 助手的 LuCI 支持插件 < > luci-app-mwol...................................... LuCI Support for Mwol #用于配置和管理 mwol 服务,用于发送 "Wake-on-LAN"(WOL)魔术包的工具 < > luci-app-n2n................................ n2n VPN Configuration module #n2n 是一个开源的虚拟专用网络(VPN)解决方案 < > luci-app-natmap.................................. LuCI Support for natmap #用于在 OpenWrt 上配置和管理 NAT 映射功能,使内部网络的设备可以通过公共 IP 地址进行外部访问 < > luci-app-netdata................................ LuCI support for netdata #netdata监控面板 < > luci-app-nextdns................................ LuCI support for NextDNS #NextDNS 是一个提供隐私保护和内容过滤的 DNS 解析服 < > luci-app-nfs........................................ LuCI support for nfs #用于配置和管理 NFS 服务 < > luci-app-nft-qos....................................... QoS over Nftables #用于配置和管理基于 nftables 的 QoS(服务质量)设置 < > luci-app-ngrokc................................. LuCI support for ngrokc. #ngrok 是一个用于创建安全隧道的工具 < > luci-app-njitclient.......................... NJIT 802.1X Client for LuCI #南京邮电大学提供的校园网认证客户端 < > luci-app-nlbwmon...................... Netlink based bandwidth accounting #网络带宽监控。 < > luci-app-nps................................................ LuCI for Nps #配置NPS内网穿透服务。 < > luci-app-nut............................. Network UPS Tools Configuration #NUT 是一个开源的 UPS(不间断电源)监控系统 < > luci-app-ocserv......................... LuCI Support for OpenConnect VPN #OpenConnect VPN服务器。 < > luci-app-oled..................................... LuCI luci-app-oled app #控制和设置连接到 OpenWrt 路由器的 OLED 显示屏 < > luci-app-olsr....................... OLSR configuration and status module #OLSR 是一种基于链路状态的无线网络路由协议 < > luci-app-olsr-services #olsr-services 提供了用于增强 OLSR 网络功能的服务模块,如动态 DNS、网络监控、流量统计等 < > luci-app-olsr-viz..................................... OLSR Visualisation #用于配置和管理 OLSR 网络可视化服务。是 OLSR 协议的一个可视化工具,它提供了网络拓扑的图形化视图 < > luci-app-olsrd2.................... OLSR2 configuration and status module #OLSRd2 是 OLSR 协议的第二代实现,专为无线自组网和移动网络设计,支持更复杂的网络拓扑和更高效的路由计算 < > luci-app-omcproxy.............................. LuCI support for omcproxy #配置OMCProxy。 < > luci-app-openclash................................ LuCI support for clash #集成OpenClash代理工具。 < > luci-app-openvpn................................ LuCI Support for OpenVPN #OpenVPN客户端和服务器配置。 < > luci-app-openvpn-server.................. LuCI support for OpenVPN Server #OpenVPN 服务器的 LuCI 支持插件 < > luci-app-openwisp.............................. LuCI support for OpenWISP #OpenWISP 是一个开源的无线网络管理系统,旨在简化和集中管理多个无线接入点(AP)和网络设备。 -*- luci-app-opkg........................ OPKG package management application #opkg 是 OpenWrt 的包管理器,负责安装、升级和删除软件包。 < > luci-app-oscam.................................... LuCI Support for oscam #OSCam卡共享服务器配置。 < > luci-app-p910nd........................... p910nd - Printer server module #配置P910nd打印服务器。 < > luci-app-pagekitec............................. LuCI Support for PageKite #配置PageKite客户端。 < > luci-app-passwall.............................. LuCI support for PassWall #配置PassWall代理工具。 Configuration ---> < > luci-app-pbr......................... Policy Based Routing Service Web UI #基于策略的路由。 < > luci-app-polipo........................ LuCI Support for the Polipo Proxy #Polipo 是一个轻量级的 Web 代理缓存服务器,主要用于提高网络浏览速度和减少带宽使用 < > luci-app-pppoe-relay........................ LuCI support for PPPoE Relay #pppoe-relay 是一个中继代理服务,用于在多台设备或网络中转发 PPPoE 请求 < > luci-app-pppoe-server...................... LuCI support for PPPoE Server #用于配置和管理 PPPoE 服务器。PPPoE 是一种网络协议,允许通过以太网连接提供点对点连接,通常用于宽带连接。 < > luci-app-privoxy...................... LuCI Support for Privoxy WEB proxy #配置Privoxy隐私代理。 < > luci-app-ps3netsrv.................................... Luci for PS3NETSRV #用于 PlayStation 3(PS3)的网络服务器工具 < > luci-app-qbittorrent............................ LuCI app for qBittorrent #配置qBittorrent客户端。 < > luci-app-qos..................... Quality of Service configuration module #配置QoS流量管理。 < > luci-app-radicale............... LuCI Support for Radicale CardDAV/CalDAV #开源的轻量级日历和联系人服务器 < > luci-app-radicale2................... Radicale v2.x CalDAV/CardDAV Server #Radicale v2.x CalDAV/CardDAV 服务器的 LuCI 插件 < > luci-app-ramfree........................................ luci-app-ramfree #释放系统内存。 < > luci-app-rclone.................................. LuCI support for Rclone #配置Rclone同步工具。 [*] Include rclone-webui #包含Rclone Web UI。 [*] Include rclone-ng (another webui) #包含另一个Rclone Web UI。 < > luci-app-rp-pppoe-server.................... Roaring Penguin PPPoE Server #配置RP-PPPoE服务器。 < > luci-app-samba4............. Network Shares - Samba 4 SMB/CIFS fileserver #配置Samba4文件共享。 < > luci-app-scutclient.......................... LuCI Support for scutclient #配置ScutClient认证工具。 < > luci-app-ser2net................................ LuCI Support for ser2net #配置Ser2Net串口服务器。 < > luci-app-shadowsocks-libev............ LuCI Support for shadowsocks-libev #shadowsocks - libev(Shadowsocks 轻量级实现)的 LuCI 支持插件 < > luci-app-shairplay............................ LuCI Support for Shairplay #Shairplay(支持 AirPlay 的开源实现)的 LuCI 支持插件 < > luci-app-siitwizard............. SIIT IPv4-over-IPv6 configuration wizard #配置SIIT IPv6转换。 < > luci-app-smartdns...................................... LuCI for smartdns #配置SmartDNS服务。 < > luci-app-sms-tool-js........................ LuCI JS Support for sms-tool #配置SMS工具。 < > luci-app-snmpd................................... Net-SNMP LuCI interface #配置SNMP守护进程。 < > luci-app-socat.................................... LuCI support for Socat #配置Socat网络工具。 < > luci-app-softether...................... Softether management application #配置SoftEther VPN。 < > luci-app-softethervpn...................... LuCI support for SoftEtherVPN #SoftEther VPN的客户端和服务器配置。 < > luci-app-speederv2..................... LuCI Support for speederv2-tunnel #配置Speederv2加速工具。 < > luci-app-splash......................... Freifunk DHCP-Splash application #配置开机欢迎页面。 < > luci-app-sqm................................ LuCI Support for SQM Scripts #配置智能队列管理。 < > luci-app-squid...................................... Squid LuCI Interface #配置Squid代理服务器。 < > luci-app-sshtunnel...... LuCI support for SSH Tunnels (sshtunnel package) #配置SSH隧道服务。 < > luci-app-ssr-libev-server.............. LuCI support for SSR Libev Server #SSR Libev 服务器的 LuCI 支持插件 < > luci-app-statistics.......................... LuCI Statistics Application #配置系统统计信息。 < > luci-app-syncdial........................... Virtual WAN config generator #配置同步拨号。 < > luci-app-syncthing............................ LuCI support for syncthing #配置Syncthing文件同步。 < > luci-app-sysuh3c......................... SYSU H3C 802.1X Client for LuCI #配置SYSU H3C认证。 < > luci-app-timewol................................ LuCI support for Timewol #配置定时唤醒。 < > luci-app-tinyproxy............... Tinyproxy - HTTP(S)-Proxy configuration #配置Tinyproxy代理服务器。 < > luci-app-tor................................... LuCI app to configure Tor #配置Tor匿名网络。 < > luci-app-transmission...................... LuCI Support for Transmission #配置Transmission BT客户端。 < > luci-app-travelmate.......................... LuCI support for Travelmate #配置旅行助手。 <*> luci-app-ttyd. ttyd - Command-line tool for sharing terminal over the web #Web终端共享工具。 <*> luci-app-ua2f...................................... LuCI support for ua2f #UA2F Web配置页面。 < > luci-app-udp2raw......................... LuCI Support for udp2raw-tunnel #配置UDP2RAW工具。 < > luci-app-udpxy.................................... LuCI Support for udpxy #配置UDProxy代理工具。 < > luci-app-uhttpd........................... uHTTPd Webserver Configuration #配置uHTTPd Web服务器。 < > luci-app-unbound............ Unbound Recursive DNS Resolver Configuration #配置Unbound DNS解析器。 < > luci-app-upnp................. Universal Plug & Play configuration module #配置UPnP服务。 < > luci-app-usb-printer........................ USB Printer Share via TCP/IP #配置USB打印服务器。 < > luci-app-usb3disable........................... LuCI support disable usb3 #禁用USB 3.0功能。 < > luci-app-usteer........................ LuCI usteer app for js based luci #配置无线网络漫游。 < > luci-app-v2raya.................................. LuCI support for v2rayA #配置V2RayA代理工具。 < > luci-app-verysync.............................. LuCI support for Verysync #配置VerySync文件同步。 < > luci-app-vlmcsd....................... LuCI support for Vlmcsd KMS Server #配置Vlmcsd KMS服务器。 < > luci-app-vnstat.................................. LuCI Support for VnStat #配置vnStat网络流量监控。 < > luci-app-vnstat2............................... LuCI Support for vnStat 2 #配置vnStat2网络流量监控。 < > luci-app-vsftpd.................................. LuCI support for VSFTPD #配置vsftpd FTP服务器。 < > luci-app-watchcat.............................. LuCI Support for Watchcat #配置Watchcat重启工具。 < > luci-app-wechatpush.......................... LuCI support for wechatpush #配置微信推送通知。 < > luci-app-wifischedule...... Turns WiFi on and off according to a schedule #配置WiFi定时开关。 < > luci-app-wol................................ LuCI Support for Wake-on-LAN #配置Wake-on-LAN功能。 < > luci-app-xfrpc.................................... LuCI Support for xfrpc #配置xfrpc代理工具。 < > luci-app-xinetd.................................. LuCI Support for xinetd #配置xinetd超级守护进程。 < > luci-app-xlnetacc.............................. LuCI Support for XLNetAcc #配置迅雷网络加速。 < > luci-app-zerotier...................................... LuCI for Zerotier #配置ZeroTier虚拟网络。
在线编译openwrt固件(Github Actions) 准备自己的Github
帐号,进入Actions-OpenWrt
的项目
把项目拉到自己的仓库
由于小米4A千兆版无法直接在breed中刷写,所以需要修改,见脚本modify-xiaomi-router-4a-3g-v2.sh
编辑diy-part1.sh
脚本,将内容更改为以下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 #!/bin/bash AIMFILE=target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi AIDFILE=target/linux/ramips/dts/mt7621_youhua_wr1200js.dts [ -e "$AIMFILE " ] || AIMFILE=target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi MARK="// The file has been modified by@hugcabbage" if grep -q "$MARK " $AIMFILE ; then exit 0 else sed -i "1i $MARK " $AIMFILE fi SPECIFIC_LINE=$(sed -n '/&spi0/=' $AIMFILE ) BASE_TEXT=$(sed '/&spi0/,/^};/d' $AIMFILE ) echo "$BASE_TEXT " | sed -n "1,${SPECIFIC_LINE} p" > $AIMFILE sed -n '/&spi0/,/^};/p' $AIDFILE >> $AIMFILE echo "$BASE_TEXT " | sed -n "$SPECIFIC_LINE ,\$p" >> $AIMFILE sed -i "${SPECIFIC_LINE} d" $AIMFILE EXFILE=target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts MT7621MK=target/linux/ramips/image/mt7621.mk if [ -e "$EXFILE " ]; then sed -i 's/partition@180000/partition@50000/' $EXFILE sed -i 's/0x180000 0xe70000/0x50000 0xfa0000/' $EXFILE sed -i 's/partitions {/partitions: partitions {/' $AIMFILE sed -i '/Device\/xiaomi_mi-router-4a-gigabit-v2/,/Mi Router 4A/ s/14784k/16000k/' $MT7621MK fi sed -i '/Device\/xiaomi_mi-router-4a-gigabit/,/Mi Router 4A/ s/14848k/16064k/' $MT7621MK sed -i '/Device\/xiaomi_mi-router-3g-v2/,/Mi Router 3G/ s/14848k/16064k/' $MT7621MK
上传.config
和feeds.conf.default
文件
修改feeds.conf.default
文件为以下内容
1 2 3 4 src-git packages https://github.com/immortalwrt/packages.git;openwrt-23.05 src-git luci https://github.com/immortalwrt/luci.git;openwrt-23.05 src-git routing https://github.com/openwrt/routing.git;openwrt-23.05 src-git telephony https://github.com/openwrt/telephony.git;openwrt-23.05
修改.config
文件查找Netfilter Extensions
关键词,在Netfilter Extensions
下第二行后添加代码,保存(UA2F需要)
1 CONFIG_NETFILTER_NETLINK_GLUE_CT=y
检查一下配置完后的文件
配置Actions
流程文件UA2F-MI-R4A-G/.github/workflows/openwrt-builder.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 name: OpenWrt-23.05 immortalwrt-MI-R4A-G on: repository_dispatch: workflow_dispatch: env : REPO_URL: https://github.com/immortalwrt/immortalwrt REPO_BRANCH: openwrt-23.05 FEEDS_CONF: feeds.conf.default CONFIG_FILE: .config DIY_P1_SH: diy-part1.sh DIY_P2_SH: diy-part2.sh UPLOAD_BIN_DIR: true UPLOAD_FIRMWARE: true UPLOAD_RELEASE: true TZ: Asia/Shanghai
开始编译
等待数个小时编译完成