pip(python package manager) 에 대한 Local Repository 만들기

 1. pip 패키지 목록에 대한 DownLoad 및 압축 – 사전 작업 (EPEL Repository 필요)

 

# yum install python-pip bzip2 -y
===================================================================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================================================================
Installing:
python2-pip noarch 8.1.2-5.el7 epel 1.7 M
Installing for dependencies:
python-backports x86_64 1.0-8.el7 base 5.8 k
python-backports-ssl_match_hostname noarch 3.4.0.2-4.el7 base 12 k
python-setuptools noarch 0.9.8-7.el7 base 397 k

Transaction Summary
===================================================================================================================================================================================================

>> pip 명령을 사용하기 위하여 python-pip 패키지 설치 ( 해당 패키지는 epel Repository 에서 다운로드 받아야 함. )

# pip install -U pip pip2pi setuptools

>> pip pip2pi setuptools 패키지 업데이트

 

# pip install –download /var/www/html kolla-ansible
kolla-ansible netaddr six setuptools pbr Jinja2 oslo.utils PyYAML oslo.config docker cryptography MarkupSafe pytz pyparsing debtcollector iso8601 funcsigs oslo.i18n netifaces monotonic stevedore rfc3986 backports.ssl-match-hostname docker-pycreds requests ipaddress websocket-client cffi enum34 asn1crypto idna wrapt Babel certifi chardet urllib3 pycparser

>> “/var/www/html” 경로에 kolla-ansible 패키설치에 필요한 파일들을 다운로드함 ( 의존성 포함. )

# dir2pi /var/www/html/

>> /var/ww/html 경로에 대하여 패키지 DB 파일 작성 ( createrepo 와 같은 작업 )

 

# cd /var/www/html
# tar cvjfp pip_backup.tgz *

>> 해당 파일 목록 압축

 

2. 폐쇠망 환경에서 pip 패키지 설치 진행 – 본 작업

 

# yum install python-pip -y

===================================================================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================================================================
Installing:
python2-pip noarch 8.1.2-5.el7 epel 1.7 M
Installing for dependencies:
python-backports x86_64 1.0-8.el7 base 5.8 k
python-backports-ssl_match_hostname noarch 3.4.0.2-4.el7 base 12 k
python-setuptools noarch 0.9.8-7.el7 base 397 k

Transaction Summary
===================================================================================================================================================================================================

>> pip 명령을 사용하기 위하여 python-pip 패키지 설치 ( 해당 패키지는 epel Repository 에서 다운로드 받아야 함. )

 

# cd /var/www/html
# tar xvjfp pip_backup.tgz

>> 해당 파일 목록 압축 해제

 

# vi ${HOME}/.pip/pip.conf

[global]
index-url = http://your.domain.lan/pip/simple
index-url = file:///var/www/html/simple

>> 위 파일에 저장소 위치를 입력 함.



Facebook Comments

(0)