在安卓平台上使用CentOS-altarch 7的常用技巧及配置 [ part 2 ]

CentOS-altarch是CentOS的简化版,适用于ARM或其他如IOT等较低性能的平台,本次演示的是适用于ARM64位aarch64架构处理器的CentOS-altarch-7

一. 切换到root用户并修改root账户密码

su root
passwd
123456

二. 安装wget

yum install wget

三.修改dns:

vi /etc/resolv.conf

# 增加如下2行
nameserver 8.8.8.8
nameserver 114.114.114.114

四.修改软件源为阿里云

  1. 先备份原配置文件,以防丢失时恢复配置
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv /etc/yum.repos.d/CentOS-7-aarch64.repo /etc/yum.repos.d/CentOS-7-aarch64.repo.backup
  1. 下载阿里云的CentOS-Base.repo 到 /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-7-aarch64.repo http://mirrors.aliyun.com/repo/Centos-altarch-7.repo
  1. 更新rpm秘钥:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
  1. 更新yum的软件源
wget https://mirrors.tuna.tsinghua.edu.cn/epel//7/aarch64/Packages/e/epel-release-7-12.noarch.rpm
rpm -ivh epel-release-7-12.noarch.rpm
yum clean all
yum update

五.安装htop (如果还没更新yum的软件源,会找不到htop安装源)

yum install htop

六.安装gcc

yum -y install gcc gcc-c++ kernel-devel

你可能感兴趣的:(Linux)