蘭雅sRGB 个人笔记 https://262235.xyz
提供编程和电脑应用视频教程,工具和源代码
C, C++, Python Programming, Source Code, Video

旧Hexo博客 | Github | IP定位WebAPI | Docker Hub
编程中文文档 | 网盘分享 | 中文Linux命令

PVE 7.0 安装 Openwrt 21.02.0 笔记

1. Openwrt 官方固件下载地址

2. 下载后,解压后改名 openwrt.img 上传 PVE,建立 OpenWRT 编号 102

3. 使用 qm 软件, 直接转换openwrt的img文件为虚拟磁盘

qm importdisk 102 /var/lib/vz/template/iso/openwrt.img local

qm stop 102   # 可以使用 qm stop 停止虚拟机

4. OpenWRT 网络设置 和 DNS 设置

  • 设置OP路由器网络 # vi /etc/config/network ; 修改IP和添加网关

    config interface 'lan'
      option proto 'static'
      option ipaddr '192.168.1.99'
      option netmask '255.255.255.0'
      option gateway '192.168.1.1'
      option ip6assign '60'
      option device 'br-lan'
  • 重启网络设置 # ifup lan
  • 添加临时 DNS # vi /etc/resolv.conf

    echo 'nameserver 8.8.8.8' >> /etc/resolv.conf

5. 查看软件源和修改软件源为中科大

  • cat /etc/opkg/distfeeds.conf

    src/gz openwrt_core https://downloads.openwrt.org/releases/21.02.0/targets/x86/64/packages
    src/gz openwrt_base https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/base
    src/gz openwrt_luci https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/luci
    src/gz openwrt_packages https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/packages
    src/gz openwrt_routing https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/routing
    src/gz openwrt_telephony https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/telephony
  • 因为原始固件没有 ca-certificates,所以修改国内源,改http下载

    sed -i  's/downloads.openwrt.org/mirrors.ustc.edu.cn\/openwrt/g' /etc/opkg/distfeeds.conf
    sed -i  's/https/http/g' /etc/opkg/distfeeds.conf

6. 安装中文语言包和常用工具

opkg update
opkg install luci-i18n-base-zh-cn
opkg install wget tmux ca-certificates htop tar bash

7. 查询可安装的软件包

opkg list | grep -e libev -e ray
本原创文章自由转载,转载请注明本博来源及网址 | 当前页面:兰雅sRGB个人笔记 » PVE 7.0 安装 Openwrt 21.02.0 笔记