在线编译脚本
#!/bin/sh
OPENSSLVER=3.1.4
OPENSSL_V=`openssl version`
echo "当前OpenSSL 版本 ${OPENSSL_V}"
#------------------------------------------------
#wget https://www.openssl.org/source/openssl-3.1.4.tar.gz
echo "安装OpenSSL${OPENSSLVER}..."
rm -rf /home/tuners/openssl
mkdir -p /home/tuners/openssl
yum -y install gcc zlib perl
yum update gcc
# cp -f ../soft/openssl/openssl-${OPENSSLVER}.tar.gz /home/tuners/openssl/
\cp -r ./* /home/tuners/openssl
cd /home/tuners/openssl
tar -xzf openssl-*.tar.gz
cd openssl-${OPENSSLVER}
./config shared zlib --prefix=/usr/local/openssl
make
make install
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig
#添加OpenSSL的环境变量。在/etc/profile文件的末尾添加以下内容
export OPENSSL=/usr/local/openssl/bin
export PATH=$OPENSSL:$PATH:$HOME/bin
echo "OPENSSL=/usr/local/openssl/bin" >> /etc/profile
echo "PATH=$OPENSSL:$PATH:$HOME/bin" >> /etc/profile
ldconfig
openssl version
在线编译操作
编译过程,等待编译完成