基于 PVE 的 OpenWrt 软路由部署

83 阅读1分钟

第一步 下载openwrt镜像文件

openwrt官方下载链接

Pasted image 20251211193618.png

下载完成

image.png

第二步 PVE安装img镜像

导入img镜像

Pasted image 20251211193850.png

创建虚拟机

Pasted image 20251211194012.png

Pasted image 20251211194102.png

Pasted image 20251211194145.png

Pasted image 20251211194203.png

视实际情况设置 CPU配置 Pasted image 20251211194234.png

Pasted image 20251211194321.png

Pasted image 20251211194350.png

Pasted image 20251211194403.png

使用openwrt镜像

Pasted image 20251211194450.png

默认镜像存放位置 /var/lib/vz/template/iso/

Pasted image 20251211194604.png

执行导入命令

# 导入img镜像 107 为vm-id
qm disk import 107 /var/lib/vz/template/iso/openwrt-24.10.4-x86-64-generic-ext4-combined-efi.img local-lvm --format raw

Pasted image 20251211194943.png

Pasted image 20251211195105.png

Pasted image 20251211195135.png

最终效果

Pasted image 20251211195151.png

Pasted image 20251211195255.png

Pasted image 20251211195310.png

Pasted image 20251211195328.png

Pasted image 20251211195417.png

Pasted image 20251211195501.png

Pasted image 20251211195521.png

Pasted image 20251211195628.png

Pasted image 20251211195707.png

Pasted image 20251211195724.png

Pasted image 20251211195902.png

第三步 系统配置

网络配置

# 编辑网络配置
vi /etc/config/network

Pasted image 20251211200135.png

Pasted image 20251211200351.png

Pasted image 20251211200433.png

Pasted image 20251211200600.png

安装成功

至此openwrt安装成功

Pasted image 20251211200737.png

第四步 WEB管理的使用

联网 配置设备路由

Pasted image 20251211201345.png

Pasted image 20251211201410.png

Pasted image 20251211201305.png

Pasted image 20251211201540.png

测试内容连通性

Pasted image 20251211201902.png

配置DNS

Pasted image 20251211202126.png

Pasted image 20251211202103.png

Pasted image 20251211202042.png

配置SSH服务

配置SSH服务 后续我们将通过SSH进入后台下载或者离线上传软件包

Pasted image 20251211202412.png

Pasted image 20251211202439.png

Pasted image 20251211202530.png

Pasted image 20251211202550.png

第五步 安装中文包

Pasted image 20251211203006.png

Pasted image 20251211203100.png

第六步 系统美化

上传美化包

Pasted image 20251211203848.png

Pasted image 20251211203914.png

Pasted image 20251211204026.png