【树莓派4B测评】树莓派4的IP地址设定,源更换,增加开机键和散热。
<div class='showpostmsg'><p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">树莓派</span>4<span style="font-family:宋体">的</span>IP<span style="font-family:宋体">地址设定,源更换,增加开机键和散热。</span></span></span></p><p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">1</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,固定IP地址设定</span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">树莓派安装完系统以后默认是自动获取</span>IP<span style="font-family:宋体">,为了方便调试,需要将树莓派设定为固定</span>IP<span style="font-family:宋体">地址,新的树莓派不像以前的系统需要更改配置文件,直接在桌面就可以更改</span>IP<span style="font-family:宋体">地址了。(图一中的</span>IP<span style="font-family:宋体">地址后面有一个</span>/24,<span style="font-family:宋体">我不知道什么意思,有哪位网友知道在帖子中回复一下)。</span></span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">2</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,国内源的更换,</span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">树莓派系统安装后默认使用树莓派官方的镜像源来更新软件,由于网络原因,国内访问速度非常慢甚至不能访问,因此需要换成国内的镜像源。树莓派官方提供了一个更新源列表(</span>https://www.raspbian.org/RaspbianMirrors<span style="font-family:宋体">),在这里我们使用清华大学的源来替换。</span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">编辑</span>sources.list <span style="font-family:宋体">文件:</span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">sudo nano /etc/apt/sources.list </span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">将树莓派官方的源用“</span>#<span style="font-family:宋体">”注释掉,然后更换成清华大学的源,修改后的见下面。</span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi</span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">#deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi</span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"># Uncomment line below then 'apt-get update' to enable 'apt-get source'</span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi</span></span></p>
<p style="text-align:justify"></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">最后使用</span> Ctrl+O <span style="font-family:宋体">回车后保存文件,</span>Ctrl+X <span style="font-family:宋体">退出编辑器。</span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">然后必须使用</span>sudo apt-get update <span style="font-family:宋体">更新软件列表。</span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">如果愿意把软件升级到最新版本,就使用</span>sudo apt-get upgrade<span style="font-family:宋体">这个命令。</span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:15.0pt"><span style="font-family:宋体">3</span></span><span style="font-size:15.0pt"><span style="font-family:宋体">,增加开机键和风扇散热</span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">树莓派关机后,如果想再次启动就需要重新插拔电源插头,很不方便,插头插拔寿命是有次数的,而且劣质电源还有上电冲击,经查找资料,只要在</span> /boot/config.txt <span style="font-family:宋体">文件末尾添加一句命令(</span>dtoverlay=gpio-shutdown<span style="font-family:宋体">)就能实现使用</span>GPIO3<span style="font-family:宋体">按键开机,添加完命令以后需要重启才能生效。树莓派工作时</span>CPU<span style="font-family:宋体">发热量很大,找到了家里最小的风扇先暂时使用。防止</span>CPU<span style="font-family:宋体">满载时</span>CPU<span style="font-family:宋体">降频或烧毁。</span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <p><span style="font-size:16px;">树莓派4B测评汇总<br />
<a href="https://bbs.eeworld.com.cn/thread-1137107-1-1.html" target="_blank">https://bbs.eeworld.com.cn/thread-1137107-1-1.html</a></span></p>
页:
[1]