centos 7.9
CentOS-7-x86_64-Everything-2009.iso
anaconda3
yum install -y epel-release
yum install -y tigervnc
yum install -y gcc make gcc-gfortran gcc-c++
yum install -y glib2-devel1
yum install -y pixman-devel
yum install -y zlib-devel
yum install -y flex
yum install -y bison
conda create -n py python
wget -c /opt/app/ https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz
tar xvf gcc-9.3.0.tar.gz
cd gcc-9.3.0
./contrib/download_prerequisites
mkdir build && cd build
../configure --prefix=/opt/app/gcc/9.3.0 --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib
make
make install
export PATH=/opt/app/gcc/9.3.0/bin:$PATH
export LD_LIBRARY_PATH=/opt/app/gcc/9.3.0/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/app/gcc/9.3.0/lib64:$LD_LIBRARY_PATH
ln -sf /opt/app/gcc/9.3.0/bin/gcc /usr/bin/gcc
wget https://download.qemu.org/qemu-9.0.0.tar.xz
tar xvJf qemu-9.0.0.tar.xz
cd qemu-9.0.0
./configure
make
make install
#启动虚拟机
qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4096 -drive file=XXXX.qcow2,format=qcow2 -boot c -vnc 127.0.0.1:1
#linux中访问vnc
vncviewer <VNC服务器地址>:<端口号>