1、添加源:
$ rpm -ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
2、启用:
# enabled 改为 1
$ 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、检查源:
$ yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* city-fan.org: www.city-fan.org
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 10,072
city-fan.org/7 city-fan.org repository for Red Hat Enterprise Linux (and clones) 7 (x86_64) 762
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,545
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 453
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 1,729
repolist: 26,561
4、升级:
$ yum upgrade curl -y
5、检查版本:
$ curl -V
curl 7.75.0 (x86_64-redhat-linux-gnu) libcurl/7.75.0 NSS/3.53.1 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.9.0 nghttp2/1.33.0
Release-Date: 2021-02-03
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 HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL UnixSockets
评论区