一、Centos系统yum升级curl
1.查看当前curl版本
[root@localhost ~]# curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.44 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
2.安装curl的yum源
[root@localhost ~]# wget http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-2.rhel7.noarch.rpm
[root@localhost ~]# rpm -ivh city-fan.org-release-2-2.rhel7.noarch.rpm
[root@localhost ~]# 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
3.更新curl
[root@localhost ~]# yum update curl --enablerepo=city-fan.org -y
4.查看当前版本
curl 7.84.0 (x86_64-redhat-linux-gnu) libcurl/7.84.0 NSS/3.67 zlib/1.2.7 libpsl/0.20.2 (+libidn2/2.3.2) libssh2/1.10.0 nghttp2/1.33.0 OpenLDAP/2.4.44
二、、Windows系统升级curl
1.官网下载安装包
下载地址:https://curl.se/windows/
2.解压压缩包替换原curl目录下的文件
将压缩包解压后的文件覆盖原curl目录,若原来没有安装过curl命令,则将此包bin目录的路径,添加至主机的环境变量中
|