zoukankan      html  css  js  c++  java
  • linux安装openssl

    1、简介

      给网站配置http2发现openssl版本不够,只能靠升级openssl了,shell让安装不再麻烦。

      系统环境 centos 7.4 64位

      安装 openssl1.1.1a版本

    2、查看当前openssl版本

      

    3、开始安装

      cnl_function.sh下载

     1 #!/bin/bash
     2 source ./cnl_function.sh
     3 
     4 function install_openssl(){
     5 
     6     cd /usr/local/src
     7     check_ok
     8     
     9 
    10     [ -f openssl-1.1.1a.tar.gz ] || wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz 
    11     
    12     [ -d openssl-1.1.1a ] && rm -rf openssl-1.1.1a
    13     tar -zxf openssl-1.1.1a.tar.gz
    14     check_ok
    15 
    16     [ -d /usr/local/openssl ] && mv /usr/local/openssl /usr/local/openssl_`date +%s`    
    17     
    18     cd openssl-1.1.1a
    19     check_ok
    20     
    21     ./config shared zlib --prefix=/usr/local/openssl --openssldir=/usr/local/openssl/ssl
    22     check_ok
    23     make
    24     check_ok
    25     make install 
    26     check_ok
    27     
    28     [ -f /usr/lib64/libssl.so.1.1 ] || ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1
    29     [ -f /usr/lib64/libcrypto.so.1.1 ] || ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
    30     
    31     [ -f /usr/bin/openssl ]    && mv /usr/bin/openssl /usr/bin/openssl_`date +%s`
    32     ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
    33 
    34     echo "openssl is installed finish."    
    35 
    36 }
    37 
    38 read -p "Enter  (Y) to start installation openssl-1.1.1 :" n
    39 if [ $n == 'Y' ]
    40 then 
    41     echo "Start installation==============================================================================================================================>"
    42     install_openssl
    43 else 
    44     echo "Cancel the installation."
    45 fi

       再次查看openssl版本

     

      安装完成

    写的文章仅供自己参考,仅供自己参考,仅供自己参考,免得太久没有使用忘记了。
  • 相关阅读:
    python 四舍五入
    Elasticsearch 入门
    Mac下ElasticSearch安装、Kibana
    Mysql 终端中文显示乱码
    Zookeeper 在 Kafka 中的作用
    mac 安装Kafka
    Creating a NuGet Package in 7 easy steps
    Updating and Publishing a NuGet Package
    ASP.NET Core 发布
    An entry point cannot be marked with the 'async' modifier
  • 原文地址:https://www.cnblogs.com/chennl/p/10173692.html
Copyright © 2011-2022 走看看