mkdir /media/cdrom/
mount /dev/cdrom /media/cdrom/
mount: /dev/sr0 写保护,将以只读方式挂载
yum install -y centos-release-scl
yum install -y devtoolset-8-gcc*
# 切换当前会话中gcc版本为8
scl enable devtoolset-8 bash
# 直接替换旧的gcc
mv /usr/bin/gcc /usr/bin/gcc-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gcc
mv /usr/bin/g++ /usr/bin/g++-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++
[root@no1 ~]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/aarch64-redhat-linux/8/lto-wrapper
Target: aarch64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-8.3.1-20190311/obj-aarch64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --build=aarch64-redhat-linux
Thread model: posix
gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
yum install -y elfutils-libelf-devel
yum install -y kernel-devel
kernel-5.11.12-300.el7.aarch64.rpm
kernel-core-5.11.12-300.el7.aarch64.rpm
kernel-headers-5.11.12-300.el7.aarch64.rpm
kernel-headers-5.11.12-300.el7.aarch64.rpm
[root@no1 ~]# ls
anaconda-ks.cfg kernel-5.11.12-300.el7.aarch64.rpm kernel-core-5.11.12-300.el7.aarch64.rpm kernel-devel-5.11.12-300.el7.aarch64.rpm kernel-headers-5.11.12-300.el7.aarch64.rpm
[root@no1 ~]# rpm -ivh kernel-5.11.12-300.el7.aarch64.rpm
准备中... ################################# [100%]
软件包 kernel-5.11.12-300.el7.aarch64 已经安装
[root@no1 ~]# rpm -ivh kernel-core-5.11.12-300.el7.aarch64.rpm
准备中... ################################# [100%]
软件包 kernel-core-5.11.12-300.el7.aarch64 已经安装
[root@no1 ~]# rpm -ivh kernel-devel-5.11.12-300.el7.aarch64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:kernel-devel-5.11.12-300.el7 ################################# [100%]
[root@no1 ~]# rpm -ivh kernel-headers-5.11.12-300.el7.aarch64.rpm --force --nodeps
准备中... ################################# [100%]
正在升级/安装...
1:kernel-headers-5.11.12-300.el7 ################################# [100%]
添加源
vi /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://mirrors.aliyun.com/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://mirrors.aliyun.com/epel/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://mirrors.aliyun.com/epel/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0
yum makecache
安装parallels-tools
/media/cdrom/install
安装完成!