当前版本
[root@consul ~]# curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
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
新建repo源
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
在线更新
yum update curl --enablerepo=city-fan.org -y
离线更新方法
yum -y install curl-8.2.1 --downloadonly --downloaddir=./
[root@consul shell]# ls
libcurl-8.2.1-2.0.cf.rhel7.x86_64.rpm libpsl-0.20.2-6.el7.x86_64.rpm
libidn2-2.3.4-1.el7.x86_64.rpm libssh2-1.11.0-1.0.cf.rhel7.x86_64.rpm
curl-8.2.1-2.0.cf.rhel7.x86_64.rpm libnghttp2-1.33.0-1.1.el7.x86_64.rpm publicsuffix-list-dafsa-20180723-1.el7.noarch.rpm
安装
rpm -Uvh *.rpm
验证
[root@consul shell]# curl -V
curl 8.2.1 (x86_64-redhat-linux-gnu) libcurl/8.2.1 NSS/3.67 zlib/1.2.7 libpsl/0.20.2 (+libidn2/2.3.2) libssh2/1.11.0 nghttp2/1.33.0 OpenLDAP/2.4.44
Release-Date: 2023-07-26
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL UnixSockets