zoukankan      html  css  js  c++  java
  • CentOS7 升级 curl 到 HTTP2

    目录

    编译安装

    安装编译环境:

    yum -y groupinstall "Development Tools"
    yum -y install libev libev-devel zlib zlib-devel openssl openssl-devel git
    

    安装 OpenSSL:

    mkdir /var/tmp
    cd /var/tmp
    wget https://openssl.org/source/openssl-1.0.2.tar.gz
    tar -zxf openssl-1.0.2.tar.gz
    cd openssl-1.0.2
    mkdir /opt/openssl
    ./config --prefix=/opt/openssl
    make
    make test
    make install
    

    安装 nghttp2:

    git clone https://github.com/tatsuhiro-t/nghttp2.git
    cd nghttp2
    autoreconf -i
    automake
    autoconf
    ./configure
    make
    make install
    echo '/usr/local/lib' > /etc/ld.so.conf.d/custom-libs.conf
    ldconfig
    ldconfig -p| grep libnghttp2
    

    安装 curl:

    cd /var/tmp
    git clone https://github.com/bagder/curl.git
    cd curl
    ./buildconf
    ./configure --with-ssl=/opt/openssl --with-nghttp2=/usr/local --disable-file --without-pic --disable-shared
    make
    

    验证:

    $ /var/tmp/curl/src/curl --version
    curl 7.70.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.70.0-DEV OpenSSL/1.0.2o nghttp2/1.41.0-DEV
    Release-Date: [unreleased]
    Protocols: dict ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets
    

    YUM 升级

    安装新版 libcurl 的 yum 源:

    rpm -ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-13.rhel6.noarch.rpm
    

    升级:

    yum upgrade libcurl
    

    升级完成后可以卸载此 yum 源:

    rpm -e city-fan.org-release
    
  • 相关阅读:
    理解HTTP协议
    节点操作,节点属性的操作及DOM event事件
    jQuery的属性,事件及操作
    jQuery中的选择器及筛选器
    javascipt中的DOM对象
    javascript中的BOM对象
    javascript中的Date对象和Math对象
    javascript中的字符串对象
    javascript基础
    CSS核心内容之浮动
  • 原文地址:https://www.cnblogs.com/jmilkfan-fanguiju/p/12789679.html
Copyright © 2011-2022 走看看