Raspberry Piには普段raspbianを入れて遊んでいるのですが、CentOS触ってみたくなったので試してみた。
用意したもの
- パソコン
- ラズパイ
- まいくろえすでぃーかーど
- その他接続するのに必要なもの
まずはイメージファイル
http://mirror.centos.org/altarch/7/isos/armhfp/ からRaspberry Pi 3のイメージファイルをDL。
イメージファイルの解凍
xzファイル解凍したいのでbrewで入れる。(Centの人yumでも入った)
$ brew install xz
解凍する。
$ xz -d CentOS-Userland-7-armv7hl-Minimal-1603-RaspberryPi3.img.xz
CentOS-Userland-7-armv7hl-Minimal-1603-RaspberryPi3.img 的なものができる。
microSDに書き込み
CentOS-Userland-7-armv7hl-Minimal-1603-RaspberryPi3.imgをmicroSDに書き込む。
# デバイス名確認(今回は/dev/disk2)
$ diskutil list
$ diskutil unmountDisk /dev/disk3
$sudo dd bs=1m if=~/Desktop/CentOS-Userland-7-armv7hl-Minimal-1603-RaspberryPi3.img of=/dev/disk3
Password: ****
・
・
diskutil eject /dev/disk2
sshで接続してみる
まずはip調べなきゃ。
システム環境設定 -> 共有 -> インターネット共有にチェックを入れる。
# ipアドレスを調べる
$ ifconfig
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=3<RXCSUM,TXCSUM>
ether 7a:31:c1:0c:37:64
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
・
・
$ arp -a
web.setup (192.168.0.1) at 1c:b1:7f:ff:7a:67 on en0 ifscope [ethernet]
? (192.168.0.5) at (incomplete) on en0 ifscope [ethernet]
? (192.168.0.6) at a8:20:66:16:d0:b4 on en0 ifscope [ethernet]
? (192.168.0.255) at (incomplete) on en0 ifscope [ethernet]
? (192.168.2.10) at b8:27:eb:95:40:21 on bridge100 ifscope [bridge]
? (192.168.2.255) at (incomplete) on bridge100 ifscope [bridge]
? (224.0.0.251) at 1:0:5e:0:0:fb on en0 ifscope permanent [ethernet]
? (239.255.255.250) at 1:0:5e:7f:ff:fa on en0 ifscope permanent [ethernet]
broadcasthost (255.255.255.255) at (incomplete) on en0 ifscope [ethernet]
192.168.2.10っぽい。
ユーザ名 : root
パスワード : centos
で接続する。
$ ssh root@192.168.2.10
root@192.168.2.10's password:centos
ログインできた⭐️
デフォルトだと容量的に良くないらしい。
https://wiki.centos.org/SpecialInterestGroup/AltArch/Arm32
にちゃんと書いてた。
$ touch /.rootfs-repartition
$ systemctl reboot
使用率が38% -> 6%に(● ˃̶͈̀ロ˂̶͈́)੭ꠥ⁾⁾
まとめ
簡単:;(∩´﹏`∩);:
次回色々試して遊んでみようかと。