# 保留cache文件。yum下载后的文件会自动删除,如果希望保留,进行如下配置:
vi /etc/yum.conf
将 keepcache=0 修改为 keepcache=1
localinstall。本地安装rpm包,服务器网络不好,在其他地方下载后,本地安装
cd <Your RPM Path>
yum localinstall *.rpm
#解决错误: warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID*****
rpm --import /etc/pki/rpm-gpg/RPM*
本地仓库配置
新建文件,名称为"cdh-local.repo",放置到 /etc/yum.repos.d",内容如下:
[Local-CDH3u1-Repo]
name=CDH3u1
baseu
enabled=1
清除缓存 写道
yum clean packages
#删除cache软件包,路径:/var/cache/yum
yum clean headers
To clean any cached xml metadata from any enabled repository, execute the following
yum clean metadata
If you wish to clean all the cached files from any enabled repository at once, execute the
yum clean all
查看当前系统是否安装某个rpm包
yum list installed | grep <keyword>