#!/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