openssl version -a rpm -q --changelog openssl | grep CVE bash -version
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
yum -y install glibc* cpp gcc* make zlib ntp wget
ntpdate time.nist.gov
hwclock -w
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
file=`find / -name openssl-1.0.1g.tar.gz|wc -l`
if [[ $file = 1 ]];then
tar zxf openssl-1.0.1g.tar.gz && cd openssl-1.0.1g
./config shared zlib
#./config --prefix=/usr/local/ssl shared zlib-dynamic enable-camellia -DOPENSSL_NO_HEARTBEATS
make && make install
cd /usr/local/ssl/
./bin/openssl version
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl/ /usr/include/openssl
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig
ldconfig -v|grep ssl
else
echo "file is not found!"
exit 1
fi