0x000C - Centos 7 Setup | gcc++ | ninja | python 3.10 | gcc-7.3.0 | glances | htop etc..
Centos 7 Setup | gcc++ | ninja | python 3.10 | gcc-7.3.0 | glances | htop etc..
This script will greatly accelerate the build of your VM:
RED='\033[0;31m'
NC='\033[0m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
printf "${GREEN} sudo yum groups list ${NC}\n"
sleep 1
sudo yum groups list
printf "${GREEN} sudo yum groupinstall 'Development Tools' -y ${NC}\n"
sleep 1
sudo yum groupinstall "Development Tools" -y
printf "${GREEN} installing Python 3.10 ${NC}\n"
wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
tar -xvf Python-3.10.0.tgz
cd Python-3.10.0
./configure
sudo make -j10
sudo make install
cd ..
printf "${GREEN} sudo yum install git centos-release-scl devtoolset-9 -y ${NC}\n"
sleep 1
sudo yum install git centos-release-scl epel-release devtoolset-9 bzip2 python-pip python-devel openssl-devel bzip2-devel libffi-devel -y
sudo yum update -y && sudo yum upgrade -yy
sudo yum install htop -y
sudo pip3 install glances
printf "${GREEN} Installing Clang llvm-toolset-7 ${NC}\n"
sudo yum install centos-release-scl -y
sudo yum install llvm-toolset-7 -y
sudo scl enable llvm-toolset-7 bash
printf "${GREEN} Installing Ninja build${NC}\n"
sleep 1
sudo git clone https://github.com/ninja-build/ninja.git
cd ninja
sudo checkout release
sudo ./configure.py --bootstrap
sudo mv ninja /usr/bin
cd ..
printf "${GREEN} Installing GCCv7.4 | Clang v6.0 | Xcode Clag v10.0)${NC}\n"
printf "${RED} This will take some time... ${NC}\n"
sleep 1
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-7.3.0/gcc-7.3.0.tar.gz
tar -zxf gcc-7.3.0.tar.gz
cd gcc-7.3.0
./contrib/download_prerequisites
./configure --disable-multilib --enable-languages=c,c++
make -j 10
make install
printf "${GREEN} gcc should be updated.. ${NC}\n"
gcc -version
sleep 1
printf "${GREEN} Installing GCC 12.2.. ${NC}\n"
cd ..
wget http://mirrors.concertpass.com/gcc/releases/gcc-12.2.0/gcc-12.2.0.tar.gz
cd gcc-12.2.0
sudo ./contrib/download_prerequisites
sudo ./configure --disable-multilib
sudo make -j 10
sudo make install
cd ..
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.2/clang+llvm-15.0.2-x86_64-unknown-linux-gnu-rhel86.tar.xz
tar -xvf clang+llvm-15.0.2-x86_64-unknown-linux-gnu-rhel86.tar.xz
cd clang+llvm-15.0.2-x86_64-unknown-linux-gnu/
cd ..
printf "${GREEN} Installing QEMU from source... ${NC}\n"
sleep 1
wget https://download.qemu.org/qemu-7.1.0.tar.xz
tar -xvf qemu-7.1.0.tar.xz
cd qemu-7.1.0/