惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
博客园 - 司徒正美
L
LangChain Blog
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
Stack Overflow Blog
Stack Overflow Blog
Engineering at Meta
Engineering at Meta
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
博客园 - 叶小钗
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
月光博客
月光博客
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
D
DataBreaches.Net

博客园 - Showker

ecstore-bbc-本地做域名-验证码不显示 mac 源码安装php8.4 免费ssl证书在线生成 验证码平台 Shopify应用开发创意与盈利指南 shopify-app开发实战 ssl免费在线生成 git自动拉取脚本 佳能单反相机连接抖音直播伴侣没有画面只有Eos Webcam Unity问题解决办法 thinkphp5碰到mysql占用CPU100%问题,原来是大量的SHOW COLUMNS FROM导致 centos 更新curl版本 mysql联合索引优化 msyql leftjoin及大表-分表优化 等保-linux-三权分立账号设置 阿里云负载均衡全过程:ECS图片资源迁移OSS操作全过程 设置PHP最大连接数及php-fpm -static高并发+ab测试 谷歌ai平台测试。真的很好用 通义1.8B开源大模型实战及微调 php对接海康卫视NVR监控设备全过程-互联网(公网)快速集成设备
centos7 升级curl命令,php不变问题
Showker · 2024-07-24 · via 博客园 - Showker

Posted on 2024-07-24 21:26  Showker  阅读(303)  评论()    收藏  举报

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

1、安装repo
[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版本
[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配置
[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:/
4、安装curl

如果报错执行这个

rpm --import https://mirror.city-fan.org/ftp/contrib/GPG-KEYS/RPM-GPG-KEY-city-fan.org-rhel-7
[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、查看当前版本
[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