WHEREIS

centos6 mirror 사이트에 패키지가 다 삭제되어

사내 repo 로 delete 옵션을 주어, 받아오고 있었는데 다 날라갔다 . ㅠㅠ

 

다시 외부에서 받아 오려하는데

요즘은 rsync 를 열어놓은 곳이 없어서? reposync 명령어로 진행했는데

 

훨씬 편한 것 같았다.

 

방법은 다음과 같이 3가지가 있으니

상황에 맞게 진행하면 되겠다.

 

1. reposync 명령어 사용 (복사해 올 repo 를 설정해 놓고 해야 함)

yum install createrepo yum-utils
mkdir -p /var/www/html/repos/{base,centosplus,extras,updates}


reposync --gpgcheck --plugins --repoid=base \ 
  --newest-only --delete --downloadcomps --download-metadata \ 
  --download_path=/tank0/repo/CentOS/6/

reposync --gpgcheck --plugins --repoid=centosplus \
  --newest-only --delete --downloadcomps --download-metadata \
  --download_path=/tank0/repo/CentOS/6/
  
reposync --gpgcheck --plugins --repoid=extras \
  --newest-only --delete --downloadcomps --download-metadata \
  --download_path=/tank0/repo/CentOS/6/
  
reposync --gpgcheck --plugins --repoid=updates \
  --newest-only --delete --downloadcomps --download-metadata \
  --download_path=/tank0/repo/CentOS/6/

  
createrepo /tank0/repo/CentOS/6//base/ -g comps.xml
createrepo /tank0/repo/CentOS/6/centosplus/
createrepo /tank0/repo/CentOS/6/extras/
createrepo /tank0/repo/CentOS/6/updates/

 

2. rsync 사용

rsync -avSHP --delete --exclude "local*" \
--exclude "isos" \ 
rsync://archive.kernel.org/centos-vault/6.9/* /tank0/repo/CentOS/6/

 

3. wget 사용

wget -m -nH -np -R "index.*,*.iso" \
-P "/tank0/repo/CentOS/7/" \
"http://mirror.centos.org/centos-7/7.7.1908/"

 

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band
loading