一勺大白
居家办公摸鱼程序猿...主修 PHP+Vue 的全栈!
树莓派4B+ & Centos8
树莓派4B+ & Centos8
发布时间:2024年10月27日 浏览量:4284

下载镜像

CentOS-Userland-8-stream-aarch64-RaspberryPI-Minimal-4-sda.raw.xz

 

使用官方工具 Raspberry Pi Imager 烧录系统

联电联网开机之后,在路由器查看IP地址。进行SSH连接。
账号 root
密码 centos

扩展磁盘
使用
df -h

命令查看磁盘,烧录盘只启用了 2.2GB 使用

/usr/bin/rootfs-expand

命令扩展可用磁盘空间。

安装必要软件

sudo yum install -y gcc gcc-c++ make git cmake vim curl wget tar libtool net-tools

更新系统

sudo yum -y update

安装 webmin
下载安装包

wget http://download.webmin.com/download/yum/webmin-1.981-1.noarch.rpm

安装依赖 & 安装 webmin

yum install perl perl-Net-SSLeay perl-Encode-Detect unzip
rpm -ivh webmin-1.981-1.noarch.rpm 

放行10000端口

firewall-cmd --zone=public --add-port=10000/tcp --permanent

重载防火墙

systemctl reload firewalld
firewall-cmd --reload

安装成功后 可以访问 https://树莓派IP:10000/
切换语言
Webmin >>> Change Language and Theme

之后使用 webmin 挂载固态硬盘

  1. 对硬盘进行分区
    对硬盘进行分区对硬盘进行分区

对硬盘进行分区


对硬盘进行分区对硬盘进行分区

 

  1. 挂载刚刚的硬盘
    挂载刚刚的硬盘挂载刚刚的硬盘

挂载刚刚的硬盘


git

 

yum install -y git

node

git clone https://github.com/creationix/nvm.git 
source nvm/nvm.sh
nvm install 14.18.0
npm install -g yarn --registry=https://registry.npm.taobao.org

yarn config set registry https://registry.npm.taobao.org -g  
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

python

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum install epel-release
yum list | grep python3 | more
yum install python39
python3 --version

修改密码
通过whoami可以查看当前登陆的用户。直接输入passwd  回车,输入2次密码就是修改当前的用户名

四、SELinux设置为开启状态(enabled)的原因。

4.1、查看当前selinux的状态。
1.    /usr/sbin/sestatus
4.2、将SELINUX=enforcing 修改为 SELINUX=disabled 状态。
1.    vi /etc/selinux/config
2.     
3.    #SELINUX=enforcing
4.    SELINUX=disabled
4.3、重启生效。reboot。
1.    reboot