板子类型: Raspberry Pi Model 3 B 搭配 32G的SD卡:html
下载支持树莓派版本的centos7系统git
https://buildlogs.centos.org/centos/7/isos/armhfp/github
Mac上下载一个SD卡管理工具(格式化用) centos
https://www.sdcard.org/downloads/formatter_4/eula_mac/index.html网络
格式化前:ssh
格式化操做:curl
格式化后,发如今电脑上也能发现SD卡工具
先卸载掉外部磁盘ui
liugx@liugx ~$ sudo diskutil umount /dev/disk2s1 Password: Volume BOOT on disk2s1 unmounted liugx@liugx ~$
而后经过命令,将解压后的系统拷贝到SD卡中(常说的烧录)url
liugx@liugx Downloads$ sudo dd bs=1m if=./CentOS-Userland-7-armv7hl-Minimal-1611-test-RaspberryPi3.img of=/dev/rdisk2 Password: 3072+0 records in 3072+0 records out 3221225472 bytes transferred in 334.167413 secs (9639556 bytes/sec) liugx@liugx Downloads$
少录完再看SD卡的状态
系统写入SD卡后,插上电源
插入网线到路由器上,而且从路由器「路由器上链接设备多的话基本靠猜(链接网络时间,设备类型)」上获取树莓派局域网ip,而后ssh登陆
看到这里说明 树莓派3代B型 Raspberry Pi Model 3 B 安装 centos7 已经成功了
以上部份内容参考地址:
centos 安装好后发现磁盘空间大小和 SD 卡不一致
重新分配空间
网上查到的解释是由于centos的image是为2G SD卡准备的,若是想用剩余空间,就得从新分配分区。 步骤: fdisk /dev/mmcblk0 执行命令:d (删除分区3) 执行命令:p (按这时候应该是少了一个分区了) 执行命令:n (加分区) 执行命令:p (主要分区) 直接回车 后面的值默认便可 执行命令:p 执行命令:w 而后reboot 执行命令: resize2fs /dev/mmcblk0p3 执行df -h查看
这里空间和 SD卡 空间一致了
以上部份内容参考地址:
若是要用WIFI的话,在/root/READEME 中有描述
== CentOS 7 userland == If you want to automatically resize your / partition, just type the following (as root user): /usr/local/bin/rootfs-expand For wifi on the rpi3, just proceed with those steps : curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.bin > /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.txt > /usr/lib/firmware/brcm/brcmfmac43430-sdio.txt systemctl reboot
===================================================
因为找不到有效的centos软件源,今天重新刷了一个 raspbian lite 系统