Loading... <div class="tip inlineBlock error"> 注意:此教程暂时内容不完整且有误,无法成功 注意:此教程暂时内容不完整且有误,无法成功 注意:此教程暂时内容不完整且有误,无法成功 注意:此教程暂时内容不完整且有误,无法成功 </div> 本文参考 > https://blog.csdn.net/qq_40163617/article/details/107878931 > https://zhuanlan.zhihu.com/p/33030757 ## 一、安装系统 镜像下载:[http://isoredirect.centos.org/altarch/7/isos/armhfp/](http://isoredirect.centos.org/altarch/7/isos/armhfp/) 注意是arm架构,根据需要选择32或64位 我的是:[CentOS-Userland-7-aarch64-RaspberryPI-Minimal-4-2009-sda.raw](http://mirrors.huaweicloud.com/centos-altarch/7.9.2009/isos/aarch64/images/CentOS-Userland-7-aarch64-RaspberryPI-Minimal-4-2009-sda.raw.xz)(64位无图形界面) 下载完成后使用Win32DiskImager软件进行烧录,烧录完将TF卡插入树莓派,连接屏幕、键盘,上电 root初始密码是centos 可以使用`getconf LONG_BIT`查看系统是32还是64位 ## 二、连接WIFI及ssh 连上屏幕和鼠标,执行`nmtui`连接wifi。我遇到了wifi列表为空的问题,最后重装系统解决了,可能是TF卡分区有问题。 使用`ifconfig`命令查看ip地址,就可以使用ssh连接树莓派了。 ## 三、扩展内存 ``` df -h # 查看当前内存存储情况 rootfs-expand # 扩展内存 reboot # 重启 ``` ## 四、更新国内yum源 备份 /etc/yum.repos.d/ 文件夹下的CentOS-Base.repo 文件,然后修改为如下内容: ``` # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/os/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #released updates [updates] name=CentOS-$releasever - Updates # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/updates/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/extras/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus baseurl=http://mirrors.ustc.edu.cn/centos-altarch/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32 ``` 之后`yum update`一下 ## 五、 --- 未完待续... © 允许规范转载 赞赏 如果我的文章对你有用,请随意赞赏 赞赏作者 微信
2 条评论
ヾ(≧∇≦*)ゝ
https://zhuanlan.zhihu.com/p/250727836
|´・ω・)ノ
https://www.cnblogs.com/lulipro/p/5992172.html