首页 > 系统相关 >centos7 升级curl命令,php不变问题

centos7 升级curl命令,php不变问题

时间:2024-07-24 21:29:19浏览次数:10  
标签:city x86 centos7 64 org fan curl php el7

centos7 升级curl命令

开篇:默认的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

如果报错执行这个

rpm --import https://mirror.city-fan.org/ftp/contrib/GPG-KEYS/RPM-GPG-KEY-city-fan.org-rhel-7
  代码语言: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    

标签:city,x86,centos7,64,org,fan,curl,php,el7
From: https://www.cnblogs.com/showker/p/18321768

相关文章

  • centos 更新curl版本
    HowtoBuildandInstallLatestcURLVersiononCentOS#WrittenbyTheSuhu(2021).#TestedonCentOS7andCentOS8PreviouslyI'vewrittenabout HowtoBuildandInstallLatestcURLVersiononUbuntu.Inthisarticleinthisarticleexplainho......
  • php使用ZipArchive解压压缩包
    //处理照片压缩包$zip=new\ZipArchive();//获取压缩包内容照片数量$path='static/oa/img/staImport/'.date('Ymd').'/'.date('His');if($zip->open($param['fileUrl'])===TRU......
  • PHP现代化构建工具: 无需修改任何代码和扩展将你的ThinkPHP项目性能提高20倍
    我要分享一个令人激动的黑科技:PRipple使用这个项目能够在无需修改任何代码且无需第三方扩展的前提下,将你的Laravel项目性能提高20倍。他仅仅依赖于PHP原生的pcntl/posix/fiber/sockets项目灵感这个项目灵感来源于PHP8.1引入的fiber特性,以及Swoole和Workerman的......
  • Centos7下安装配置最新版本Jenkins(2.452.3)
    1、基础环境配置1.1服务器下载Jenkins安装包下载地址:https://www.jenkins.io/download/下载命令:wgethttps://get.jenkins.io/war-stable/2.452.3/jenkins.war1.2服务器安装配置JDKJenkins是基于Java语言开发的,因此需要Java运行环境支持。安装JDK前一定要看下当前要......
  • php判断文件真实后缀(防止修改后缀)
    <?php//判断文件真实类型functionget_file_type($fileName){$file=fopen($fileName,"rb");$bin=fread($file,2);//只读2字节fclose($file);$strInfo=@unpack("C2chars",$bin);//将字节转换为字节二进制的数组$typeCode=(int)($str......
  • CentOS7使用Postfix, Dovecot搭建邮箱服务
    CentOS7使用Postfix,Dovecot搭建邮箱服务的步骤与挑战?为了满足企业内部或个人的邮件服务需求,使用CentOS7搭建一个稳定、安全的邮箱服务器是一个非常实用的解决方案。AokSend将详细介绍如何在CentOS7系统上使用Postfix和Dovecot搭建邮箱服务。CentOS7:配置PostfixPostfix的配......
  • PHP中static的使用
    本文由ChatMoney团队出品PHP,作为一种面向对象的编程语言,为开发者提供了丰富的特性和功能,助力构建高效的应用程序。其中,static关键字在类和方法中的应用尤为重要,它提供了一种独特的变量和方法访问机制。本文将深入探讨static关键字的使用方法,并通过具体代码示例来指导实践。一......
  • centos7 安装指定版本的chrome + chromedriver
    谷歌浏览器历史版本相关地址:https://www.chromedownloads.net/chrome64win/ 驱动下载地址:https://registry.npmmirror.com/binary.html?path=chromedriver   上传下载好的chrome和chromediriver到centos服务器中解压后上传  安装chromeyumlocalinstall-y......
  • 使用PHP实现悲观锁的最佳实践。里面包含源码
    在数据库编程中,确保数据的一致性和完整性是非常重要的。当多个用户或线程同时访问和修改同一条数据记录时,可能会出现并发问题,比如读写冲突、数据丢失等。为了解决这些问题,我们可以使用并发控制机制,其中一种常见的方法就是悲观锁。什么是悲观锁?悲观锁是一种并发控制策......
  • laravel11: php时间不正确
    一,问题表现服务器时间正确,php时间正确laravel时间不正确未使用laravel框架使用laravel框架:可以看到,使用laravel框架时,时间早8个小时二,解决:  1,配置timezone,编辑php.ini  配置timezone,PRC和Asia/Shanghai均可;date.timezone=Asia/Shanghaidate.timezone=......