Shell automatically upgrades OpenSSL to OpenSSL 1.0.1g in Linux

Source: Internet
Author: User
Tags openssl openssl version

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.