Redhat7 搭建本地yum

Redhat7 搭建本地yum


# cd /etc/yum.repos.d/

# vi rhel.repo


[rhel]

name=rhel

baseurl=file:///home/yum  (也可写http、ftp网络路径)

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

:wq


# createrepo -d /home/yum  (网络yum不需此步)

# yum update

本文出自 “linux” 博客,谢绝转载!

你可能感兴趣的:(yum)