linux-yum
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux-yum相关的知识,希望对你有一定的参考价值。
yum搭建本地仓库
[[email protected] ~]# mount /dev/cdrom /mnt/ [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak [[email protected] yum.repos.d]# cp CentOS-Media.repo CentOS-Base.repo [[email protected] yum.repos.d]# vim CentOS-Base.repo [c7-media] name=CentOS-$releasever - Media baseurl=file:///mnt/ gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [[email protected] yum.repos.d]# yum clean all [[email protected] yum.repos.d]# yum list [[email protected] yum.repos.d]# yum repolist all
yum更换国内源
#cd /etc/yum.repos.d #mv CentOS-Base.repo CentOS-Base.repo.bak #curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo #yum clean all #yum list #yum repolist all
yum安装扩展源
[[email protected] yum.repos.d]# yum install epel-release -y
yum下载rpm包
[[email protected] ~]# yum install zsh --downloadonly
[[email protected] ~]# yum install zsh --downloadonly --downloaddir=/usr/local/src/
[[email protected] ~]# yum reinstall vim-enhanced --downloadonly --downloaddir=/usr/local/src/
以上是关于linux-yum的主要内容,如果未能解决你的问题,请参考以下文章