关于程序员:OpenWRT-的包管理器镜像如何切换成阿里云源

8次阅读

共计 776 个字符,预计需要花费 2 分钟才能阅读完成。

一、openwrt 介绍
OpenWRT(曾用名 LEDE)是一款广泛应用于路由器的嵌入式操作系统。因为其开源,所以在不同硬件下面本人批改源码就能够适配,所以失去了很宽泛的应用。
官网地址:https://openwrt.org/
官方论坛:https://forum.openwrt.org/
与 Ubuntu 的 apt-get、Centos 的 yum 相似,Openwrt 也有相似的包管理器 opkg,所以后盾也保护着软件源。然而因为源在国外,所以下载非常的慢,依照 Linux 应用习惯,咱们将它切换为国内源。我集体在应用 OpenWrt 官网的软件源时,其实没有敌人们所说的慢到抓狂,但偶然还是会呈现提早很高的状况,如果有更高速更稳固的需要,国内有很多镜像源可供使用。那么如何切换成阿里源呢?

阿里云镜像站官网:https://developer.aliyun.com/…
阿里云 openwrt 源地址:https://mirrors.aliyun.com/op…
二、Openwrt 更换阿里云源办法
手工替换
登录到路由器,并编辑 /etc/opkg/distfeeds.conf 文件,将其中的 downloads.openwrt.org 替换为 mirrors.aliyun.com/openwrt 即可。
主动替换
执行如下命令主动替换

sed -i ‘s_downloads.openwrt.org_mirrors.aliyun.com/openwrt_’ /etc/opkg/distfeeds.conf

更新源
opkg update
三、openwrt 其余举荐源地址
清华大学:mirrors.tuna.tsinghua.edu.cn/openwrt
中科大:mirrors.ustc.edu.cn/openwrt
腾讯:mirrors.cloud.tencent.com/openwrt

正文完
 0