199 lines
8.7 KiB
HTML
Raw Normal View History

2024-10-23 20:34:14 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dich&#x27;blog</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="robots" content="noodp"/>
<link rel="stylesheet" href="https://blog.dich.bid/style.css">
<link rel="stylesheet" href="https://blog.dich.bid/color/blue.css">
<link rel="stylesheet" href="https://blog.dich.bid/color/background_dark.css">
<link rel="stylesheet" href="https://blog.dich.bid/font-hack-subset.css">
<meta name="description" content="">
<meta property="og:description" content="">
<meta property="og:title" content="Dich'blog">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.dich.bid/awesome-openwrt/">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:description" content="">
<meta name="twitter:title" content="Dich'blog">
<meta property="twitter:domain" content="blog.dich.bid">
<meta property="twitter:url" content="https://blog.dich.bid/awesome-openwrt/">
<link rel="alternate" type="application/atom+xml" title="Dich&#x27;blog Atom Feed" href="https://blog.dich.bid/atom.xml" />
</head>
<body class="">
<div class="container">
<header class="header">
<div class="header__inner">
<div class="header__logo">
<a href="https://blog.dich.bid" style="text-decoration: none;">
<div class="logo">
Dich&#x27;blog
</div>
</a>
</div>
</div>
<nav class="menu">
<ul class="menu__inner">
<li class="active"><a href="https://blog.dich.bid">blog</a></li>
<li><a href="https://blog.dich.bid/tags">tags</a></li>
<li><a href="https://blog.dich.bid/archive">archive</a></li>
<li><a href="https://blog.dich.bid/about">about me</a></li>
<li><a href="https://blog.dich.bid/links">links</a></li>
<li><a href="https://blog.dich.bid/search">search</a></li>
<li><a href="https://github.com/Dichgrem" target="_blank" rel="noopener noreferrer">github</a></li>
</ul>
</nav>
</header>
<div class="content">
<div class="post">
<h1 class="post-title"><a href="https://blog.dich.bid/awesome-openwrt/">综合工程:OpenWrt 软路由部署</a></h1>
<div class="post-meta-inline">
<span class="post-date">
2023-08-12
</span>
</div>
<span class="post-tags-inline">
:: tags:&nbsp;
<a class="post-tag" href="https://blog.dich.bid/tags/zong-he-gong-cheng/">#综合工程</a></span>
<div class="post-content">
<p>前言 openwrt 是一个自由的、兼容性好的嵌入式 linux 发行版。作为软路由玩家必备的一款神器,可以实现诸如去广告,多拨和科学上网等多种功能。本文以 openwrt 在X86平台的安装为例介绍其部署流程。</p>
<span id="continue-reading"></span><h2 id="wei-shen-me-shi-x86">为什么是X86</h2>
<p>无论是作为主路由或是旁路由,传统路由器由于主频低,内存小,并不适合作为软路由;而 NAS-软路由一体式 又有 all in boom 的风险因此推荐X86平台作为物理机。当然也可以采用 armbian 平台或是开发板例如网心云老母鸡、树莓派等设备。截至本文撰写时间二手平台上的价格不太利好一台J1900平台的售价往往在200左右而专门的多网口工控机价格在200到1000不等树莓派更是成为了理财产品需要慎重选择。</p>
<h2 id="zhun-bei-gong-zuo">准备工作</h2>
<ul>
<li>1.openwrt 的编译包,由 eSir 大佬编译的三个经典版本:</li>
</ul>
<p>https://drive.google.com/drive/folders/1uRXg_krKHPrQneI3F2GNcSVRoCgkqESr</p>
<ul>
<li>
<p>2.PE 启动盘这里推荐微PEhttps://www.wepe.com.cn/download.html</p>
</li>
<li>
<p>3.img 写盘工具https://www.roadkil.net/program.php?ProgramID=12#google_vignette</p>
</li>
<li>
<p>4.一个U盘与一台双网口物理机</p>
</li>
</ul>
<p>安装流程:</p>
<h2 id="yi-jin-ru-pehuan-jing">一、进入PE环境</h2>
<p>1.打开微PE将其安装进U盘中安装完成后将 img 工具和 openwrt 包一起放进去;</p>
<p>2.将U盘插入目标主机进入 BIOS-boot 设置U盘优先启动各主板进入 BIOS 的按键不同,不确定的话建议都试一遍。</p>
<h2 id="er-ge-shi-hua-ying-pan-bing-xie-pan">二、格式化硬盘并写盘</h2>
<p>1.进入PE环境中可以看到存在名为“分区助手”的软件打开它并将目标主机硬盘格式化注意不要分区不要分区不要设置文件系统否则后续可能无法编译</p>
<p>点击左上角提交并执行</p>
<p>2.打开img写盘工具将openwrt包写入硬盘注意不要写进U盘里。</p>
<h2 id="san-jin-ru-pei-zhi-jie-mian">三、进入配置界面</h2>
<p>1.重启系统并快速拔出U盘避免重新进入PE这时系统开始运行了。注意Esir固件是不跑码的无需担心。</p>
<p>2.当看到 <code>please press Enter to activate this console</code>这个提示的时候系统就安装完毕了。可使用 passwd 命令设置密码。软路由将自动获取IP地址随后我们在浏览器中打开该地址即可看到 Lucl 界面。</p>
<h2 id="hou-ji">后记</h2>
<p>常用命令:</p>
<pre style="background-color:#151515;color:#e8e8d3;"><code><span># 更新软件列表
</span><span>opkg update
</span><span>
</span><span># 更新所有 LUCI 插件
</span><span>opkg list-upgradable | grep luci- | cut -f 1 -d &#39; &#39; | xargs opkg upgrade
</span><span>
</span><span># 如果要更新所有软件,包括 OpenWRT 内核、固件等
</span><span>opkg list-upgradable | cut -f 1 -d &#39; &#39; | xargs opkg upgrade
</span><span>
</span></code></pre>
<p>开源世界还存在着 DD-WERT、Tomato 等系统。正如互联网的发展并非一帆风顺OpenWRT 也出现过核心开发者出走,另立山头推出 LEDE 等波折在18年 LEDE 与 openwrt 合并后,通过众多开发者的不懈努力, OpenWRT 有了现在丰富完善的生态。</p>
<h2 id="can-kao">参考</h2>
<ul>
<li><a href="https://openwrt.org/zh/docs/start">Openwrt wiki</a></li>
<li><a href="https://openwrt.ai/?target=ipq807x%2Fgeneric&amp;id=xiaomi_ax3600">OpenWrt在线定制编译</a></li>
<li><a href="https://www.cnblogs.com/tfel-ypoc/p/17226064.html">openwrt luci 页面无法访问 问题排查</a></li>
<li><a href="https://post.smzdm.com/p/axz6369w/">超详细多图简单OpenWRT 设置IPV6配置</a></li>
<li><a href="https://blog.csdn.net/weixin_44548582/article/details/121064734">保姆级-光猫改桥接-路由拨号-openwrt端口转发</a></li>
<li><a href="http://www.ttcoder.cn/index.php/2023/07/11/p0/">360T7刷机</a></li>
</ul>
</div>
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">Thanks for reading! Read other posts?</span>
<hr />
</div>
<div class="pagination__buttons">
<span class="button previous">
<a href="https://blog.dich.bid/awesome-pve-mcsm/">
<span class="button__icon"></span>&nbsp;
<span class="button__text">综合工程:PVE安装与MC服务器搭建</span>
</a>
</span>
<span class="button next">
<a href="https://blog.dich.bid/awesome-android-root/">
<span class="button__text">综合工程:安卓刷机与root教程</span>&nbsp;
<span class="button__icon"></span>
</a>
</span>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer__inner">
<div class="copyright">
<span>©
2024
Dichgrem</span>
<span class="copyright-theme">
<span class="copyright-theme-sep">:: </span>
Theme: <a href="https://github.com/pawroman/zola-theme-terminimal/">Terminimal</a> by pawroman
</span>
</div>
</div>
</footer>
</div>
</body>
</html>