#!/bin/bash


# prepare
# CentOS 或 RHEL 系统
# sudo yum install -y gcc gcc-c++ make openssl-devel 
# Ubuntu 或 Debian 系统
sudo apt-get update && sudo apt-get install -y build-essential libssl-dev

# 替换为实际下载链接
wget https://cmake.org/files/v3.24/cmake-3.24.2.tar.gz 

# 替换为实际解压命令，根据你下载的版本号调整
tar -zxvf cmake-3.24.2.tar.gz 

# 进入解压后的目录
cd cmake-3.24.2 

# ./bootstrap --prefix=/usr/local
./bootstrap --prefix=/usr/local --parallel=32

make -j${nproc}
sudo make install
