System: CentOS 5.x
OpenSSL upgrade script content:
Cat openssl_update.sh
The code is as follows |
Copy Code |
#!/bin/bash if [[$EUID-ne 0]]; Then echo "This script must is 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 |
So if you have multiple servers (less than or equal to 30), you can go up and let the script run itself, and the next time you add bulk distribution and batch execution scripts, it's perfect.
Thank you for the night sky from http://blog.slogra.com/post-532.html