一、添加 city-fan.org 的源
# cat > /etc/yum.repos.d/city-fan.repo << EOF
[cityfan]
name=cityfan
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
enabled=1
gpgcheck=0
EOF
二、更新curl
# yum update curl
三、測試,發現curl已精更新了,可支援http2
QUOTE:
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
# curl -I https://www.google.com