openssl心脏出血漏洞修复

#!/bin/bash
for ip in `cat iplist`
do
        scp -P65422 openssl-1.0.1t.tar.gz 192.168.1.$ip:/home/test
        scp -P 65422 ssl.sh 192.168.1.$ip:/home/test
        ssh -p 65422 -t 192.168.1.$ip "sudo sh /home/test/ssl.sh"
done

 

 

#!/bin/bash
yum clean all
yum makecache
yum -y install glibc* cpp gcc* make zlib

cd /home/test
tar zxf openssl-1.0.1t.tar.gz && cd openssl-1.0.1t
./config shared zlib
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
cp /usr/local/ssl/bin/openssl /usr/bin/openssl
cp -r /usr/local/ssl/include/openssl/ /usr/include/openssl
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig
ldconfig -v|grep ssl
v=`openssl version | awk '{print $2}'`
[ $v = "1.0.1t" ] && echo update OK || echo update fail
exit 1

posted @ 2016-05-31 15:53  玩石  阅读(645)  评论(0编辑  收藏  举报