linux-yum
阿新 • • 發佈:2018-02-20
-m 搭建本地 ase lba cto tle -c load 擴展 yum搭建本地倉庫
[root@apenglinux-001 ~]# mount /dev/cdrom /mnt/ [root@apenglinux-001 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak [root@apenglinux-001 yum.repos.d]# cp CentOS-Media.repo CentOS-Base.repo [root@apenglinux-001 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 [root@apenglinux-001 yum.repos.d]# yum clean all [root@apenglinux-001 yum.repos.d]# yum list [root@apenglinux-001 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安裝擴展源
[root@apenglinux-001 yum.repos.d]# yum install epel-release -y
yum下載rpm包
[root@apenglinux-001 ~]# yum install zsh --downloadonly
[root@apenglinux-001 ~]# yum install zsh --downloadonly --downloaddir=/usr/local/src/
[root@apenglinux-001 ~]# yum reinstall vim-enhanced --downloadonly --downloaddir=/usr/local/src/
linux-yum