>  기사  >  운영 및 유지보수  >  CentOS에서 로컬 rpm 소스를 만드는 방법

CentOS에서 로컬 rpm 소스를 만드는 방법

藏色散人
藏色散人앞으로
2020-06-12 15:18:592404검색

다음 centos 튜토리얼 칼럼에서는 CentOS에서 로컬 rpm 소스를 생성하는 방법을 소개하겠습니다. 도움이 필요한 친구들에게 도움이 되길 바랍니다!

CentOS에서 로컬 rpm 소스를 만드는 방법

createrepo 설치

yum install createrepo

로컬 rpm 소스 만들기

cd /opt/yliyun/conf
createrepo ./rpm

repo 구성

새 CentOS-Local.repo

/opt/yliyun/conf/CentOS-Local.repo
# CentOS-Local.repo
#
#  This repo can be used with mounted DVD media, verify the mount point for
#  CentOS-6.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c6-local [command]
#  
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c6-local [command]
[c6-local]
name=CentOS-$releasever - Media
baseurl=file:///opt/yliyun/conf/rpm/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

로컬 rpm 설치

yum --disablerepo=\* --enablerepo=c6-local -c conf/CentOS-Local.repo -q -y localinstall conf/rpm/*.rpm --nogpgcheck

위 내용은 CentOS에서 로컬 rpm 소스를 만드는 방법의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
이 기사는 segmentfault.com에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제