CentOS 7更换阿里云的源操作步骤:
root@hadoop001 \~# cd /etc/yum.repos.d/
root@hadoop001 yum.repos.d# mv CentOS-Base.repo CentOS-Base.repo.bak
root@hadoop001 yum.repos.d# wget -O /etc/yum.repos.d/CentOS-Base.repo
root@hadoop001 yum.repos.d# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
root@hadoop001 yum.repos.d# vim CentOS-Base.repo
root@hadoop001 yum.repos.d# yum makecache
CentOS-Base.repo配置如下:
base
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
继续操作
root@hadoop154 \~# yum install -y epel-release
完毕!
出现以下情况,kill -9 2914进程
root@hadoop001 \~# yum install -y epel-release
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 2914 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存:295 M RSS (1.2 GB VSZ)
已启动: Tue Jan 7 19:32:35 2025 - 02:49之前
状态 :睡眠中,进程ID:2914
^C
Exiting on user cancel.
root@hadoop001 \~# kill -9 2914