王海庆的云笔记

树莓派的centos7系统添加源


清华大学源

https://mirrors.tuna.tsinghua.edu.cn/


阿里云地址

cat > /etc/yum.repos.d/CentOS-Base.repo << EOF
[base]
name=CentOS-\$releasever - Base
baseurl=http://mirrors.aliyun.com/centos-altarch/\$releasever/os/\$basearch/
gpgcheck=0
enabled=1

[updates]
name=CentOS-\$releasever - Updates
baseurl=http://mirrors.aliyun.com/centos-altarch/\$releasever/updates/\$basearch/
gpgcheck=0
enabled=1

[extras]
name=CentOS-\$releasever - Extras
baseurl=http://mirrors.aliyun.com/centos-altarch/\$releasever/extras/\$basearch/
gpgcheck=0
enabled=1

[centosplus]
name=CentOS-\$releasever - Plus
baseurl=http://mirrors.aliyun.com/centos-altarch/\$releasever/centosplus/\$basearch/
gpgcheck=0
enabled=0
 
EOF


中国科学技术大学源

cat > /etc/yum.repos.d/CentOS-Base.repo << EOF
[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=0
enabled=1

#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=0
enabled=1

#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=0
enabled=1

#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=0
enabled=0
 
EOF


Epel源

cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Epel rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
enabled=1
gpgcheck=0
 
EOF


测试之后发现,这是一个基于fedora aarch64版的源,所以可以将epel.repo的内容改为上海交大的源:

cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Extra Packages for Enterprise Linux 7
baseurl=http://ftp.sjtu.edu.cn/fedora/epel/7/aarch64/
enabled=1
gpgcheck=0
 
EOF


鉴于两个都是没有质保的,且支持armhfp的CentOS源是在是太少,请需要的TX自己选择吧。配置好yum源之后就赶紧更新,在装点必要的编译工具吧:

yum update
yum install -y gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel



http://www.mamicode.com/info-detail-2474546.html

https://blog.csdn.net/lhj_168/article/details/85805799

https://holmesian.org/Raspberry-install-centos

文章最后更新时间: 2019-05-28 22:30:53