树莓派centos7系统安装配置

目录

1.烧录系统

2.配置自动连接wifi

3.扩展内存

4.更换yum源

5.docker安装


1.烧录系统

Centos ARM芯片的版本下载地址:http://mirror.centos.org/altarch/7/isos/armhfp/

首先,格式化内存卡,然后将下载的Centos系统解压,写入系统到SD卡中,最后将SD卡插入树莓派。

2.配置自动连接wifi

首先,进入vi /etc/wpa_supplicant/wpa_supplicant.conf 文件中配置:

network={
    ssid="无线网名称"
    psk="密码"
    priority=10
}

然后,连接wifi,配置好后每次启动自动连接无线网。

nmcli d wifi connect 无线网名称 password '密码'

3.扩展内存

rootfs-expand

4.更换yum源

首先,将/etc/yum.repos.d/ 文件夹下的文件除了CentOS-Base.repo 都删掉

# 1. 编辑CentOS-Base.repo
[root@centos-rpi3 ~]# vi /etc/yum.repos.d/CentOS-Base.repo
# 2. 不会用vi的朋友别乱动,可以按着d键不松手,即可清空整个文件
#    会的朋友直接清空它就行了
# 3. 复制下面的文字到这个文件中,使用putty的话就是在windows下复制,然后再putty中右键就可以粘贴
# 4. 按Esc,然后输入引号内的内容:“:wq”注意英文符号,随后会退出vi
# 5. 执行下面两句代码:
yum clean all
yum makecache

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

5.docker安装

安装

#docker安装
sudo yum install docker -y
docker version

启动

service docker start

查看镜像列表

#拉取镜像
docker pull [options] name[:tag]

#查看镜像列表
docker images [options] [repository[:tag]]

  • 1
    点赞
  • 31
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值