前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >centos7 升级curl命令

centos7 升级curl命令

作者头像
用户6792968
发布2022-08-30 12:03:12
1.6K0
发布2022-08-30 12:03:12
举报
文章被收录于专栏:fred 随笔

开篇:默认的curl版本太旧,需要升级,才可以支持http2协议

1、安装repo
代码语言:javascript
复制
[root@ ~]# rpm -Uvh  http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm
2、查看当前repo中包含哪些curl版本
代码语言:javascript
复制
[root@ ~]# yum --showduplicates list curl --disablerepo="*" --enablerepo="city*"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * city-fan.org: www.city-fan.org
 * city-fan.org-source: www.city-fan.org
city-fan.org                                             | 3.0 kB     00:00
city-fan.org-debuginfo                                   | 3.0 kB     00:00
city-fan.org-source                                      | 3.0 kB     00:00
(1/3): city-fan.org-debuginfo/7/primary_db                 |  41 kB   00:01
(2/3): city-fan.org-source/7/primary_db                    | 356 kB   00:02
(3/3): city-fan.org/7/primary_db                           | 518 kB   00:02
Installed Packages
curl.x86_64                   7.29.0-59.el7_9.1                     @updates
Available Packages
curl.x86_64                   7.79.0-4.0.cf.rhel7                   city-fan.org
3、修改repo配置
代码语言:javascript
复制
[root@master ~]# vim /etc/yum.repos.d/city-fan.org.repo
[city-fan.org]
name=city-fan.org repository for Red Hat Enterprise Linux (and clones) $releasever ($basearch)
#baseurl=http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel$releasever/$basearch
mirrorlist=http://mirror.city-fan.org/ftp/contrib/yum-repo/mirrorlist-rhel$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org
4、安装curl
代码语言:javascript
复制
[root@master nghttp2-master]# yum install curl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * city-fan.org: www.city-fan.org
city-fan.org                                             | 3.0 kB     00:00
Resolving Dependencies
--> Running transaction check
---> Package curl.x86_64 0:7.29.0-59.el7_9.1 will be updated
---> Package curl.x86_64 0:7.79.0-4.0.cf.rhel7 will be an update
、、、、
Dependency Installed:
  keyutils-libs-devel.x86_64 0:1.5.8-3.el7
  krb5-devel.x86_64 0:1.15.1-50.el7
  libcom_err-devel.x86_64 0:1.42.9-19.el7
  libicu.x86_64 0:50.2-4.el7_7
  libkadm5.x86_64 0:1.15.1-50.el7
  libnghttp2.x86_64 0:1.33.0-1.1.el7
  libpsl.x86_64 0:0.7.0-1.el7
  libselinux-devel.x86_64 0:2.5-15.el7
  libsepol-devel.x86_64 0:2.5-10.el7
  libssh2-devel.x86_64 0:1.10.0-2.0.cf.rhel7
  libverto-devel.x86_64 0:0.2.5-4.el7
  nspr-devel.x86_64 0:4.25.0-2.el7_9
  nss-devel.x86_64 0:3.53.1-7.el7_9
  nss-softokn-devel.x86_64 0:3.53.1-6.el7_9
  nss-softokn-freebl-devel.x86_64 0:3.53.1-6.el7_9
  nss-util-devel.x86_64 0:3.53.1-1.el7_9
  openssl-devel.x86_64 1:1.0.2k-21.el7_9
  pcre-devel.x86_64 0:8.32-17.el7
  zlib-devel.x86_64 0:1.2.7-19.el7_9

Updated:
  curl.x86_64 0:7.79.0-4.0.cf.rhel7

Dependency Updated:
  libcurl.x86_64 0:7.79.0-4.0.cf.rhel7
  libcurl-devel.x86_64 0:7.79.0-4.0.cf.rhel7
  libssh2.x86_64 0:1.10.0-2.0.cf.rhel7

Complete!
5、查看当前版本
代码语言:javascript
复制
[root@master ~]# curl -V
curl 7.79.0 (x86_64-redhat-linux-gnu) libcurl/7.79.0 NSS/3.53.1 zlib/1.2.7 libps                                                                             l/0.7.0 (+libicu/50.1.2) libssh2/1.10.0 nghttp2/1.33.0 OpenLDAP/2.4.44
Release-Date: 2021-09-15
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mq                                                                             tt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefi    
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 开篇:默认的curl版本太旧,需要升级,才可以支持http2协议
    • 1、安装repo
      • 2、查看当前repo中包含哪些curl版本
        • 3、修改repo配置
          • 4、安装curl
            • 5、查看当前版本
            相关产品与服务
            命令行工具
            腾讯云命令行工具 TCCLI 是管理腾讯云资源的统一工具。使用腾讯云命令行工具,您可以快速调用腾讯云 API 来管理您的腾讯云资源。此外,您还可以基于腾讯云的命令行工具来做自动化和脚本处理,以更多样的方式进行组合和重用。
            领券
            问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档