zoukankan      html  css  js  c++  java
  • centos7.3下curl支持https协议

    1 由于自己的curl是默认安装的,查看了下 不支持https协议

    [root@izwz90bp6do7s3cr45cw6az ~]# curl --version
    curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.21 Basic ECC zlib/1.2                                                                                        .7 libidn/1.28 libssh2/1.4.3
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s                                                                                         rtsp scp sftp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-                                                                                        sockets

    2  先安装openssl  yum下安装很简单

    yum install openssl

    3  然后重新安装一遍curl,我看了自己的版本较老,就yum一下,是更新

    yum install curl
    [root@izwz90bp6do7s3cr45cw6az ~]# yum install curl
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * remi-safe: mirrors.tuna.tsinghua.edu.cn
    Resolving Dependencies
    --> Running transaction check
    ---> Package curl.x86_64 0:7.29.0-35.el7.centos will be updated
    ---> Package curl.x86_64 0:7.29.0-46.el7 will be an update
    --> Processing Dependency: libcurl = 7.29.0-46.el7 for package: curl-7.29.0-46.el7.x86_64
    --> Running transaction check
    ---> Package libcurl.x86_64 0:7.29.0-35.el7.centos will be updated
    ---> Package libcurl.x86_64 0:7.29.0-46.el7 will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ========================================================================================================================================================================
     Package                                Arch                                  Version                                         Repository                           Size
    ========================================================================================================================================================================
    Updating:
     curl                                   x86_64                                7.29.0-46.el7                                   base                                268 k
    Updating for dependencies:
     libcurl                                x86_64                                7.29.0-46.el7                                   base                                220 k
    
    Transaction Summary
    ========================================================================================================================================================================
    Upgrade  1 Package (+1 Dependent package)
    
    Total download size: 488 k
    Is this ok [y/d/N]: y
    Downloading packages:
    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
    (1/2): libcurl-7.29.0-46.el7.x86_64.rpm                                                                                                          | 220 kB  00:00:00
    (2/2): curl-7.29.0-46.el7.x86_64.rpm                                                                                                             | 268 kB  00:00:00
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                   3.5 MB/s | 488 kB  00:00:00
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : libcurl-7.29.0-46.el7.x86_64                                                                                                                         1/4
      Updating   : curl-7.29.0-46.el7.x86_64                                                                                                                            2/4
      Cleanup    : curl-7.29.0-35.el7.centos.x86_64                                                                                                                     3/4
      Cleanup    : libcurl-7.29.0-35.el7.centos.x86_64                                                                                                                  4/4
      Verifying  : curl-7.29.0-46.el7.x86_64                                                                                                                            1/4
      Verifying  : libcurl-7.29.0-46.el7.x86_64                                                                                                                         2/4
      Verifying  : curl-7.29.0-35.el7.centos.x86_64                                                                                                                     3/4
      Verifying  : libcurl-7.29.0-35.el7.centos.x86_64                                                                                                                  4/4
    
    Updated:
      curl.x86_64 0:7.29.0-46.el7
    
    Dependency Updated:
      libcurl.x86_64 0:7.29.0-46.el7
    
    Complete!

    4 然后查看协议代码

    [root@izwz90bp6do7s3cr45cw6az ~]# curl --version
    curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.34 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets

    已经有了https了

  • 相关阅读:
    聊聊WS-Federation
    用双十一的故事串起碎片的网络协议(上)
    责任链模式的使用-Netty ChannelPipeline和Mina IoFilterChain分析
    最小化局部边际的合并聚类算法(中篇)
    最小化局部边际的合并聚类算法(上篇)
    UVaLive 7371 Triangle (水题,判矩形)
    UVaLive 7372 Excellence (水题,贪心)
    POJ 3312 Mahershalalhashbaz, Nebuchadnezzar, and Billy Bob Benjamin Go to the Regionals (水题,贪心)
    UVa 1252 Twenty Questions (状压DP+记忆化搜索)
    UVa 10817 Headmaster's Headache (状压DP+记忆化搜索)
  • 原文地址:https://www.cnblogs.com/baker95935/p/9212339.html
Copyright © 2011-2022 走看看