1. 필요한 것들 설치
yum install pip
pip install pypiserver
pip install passlib
2. server용 계정 설정 및 추가
cd /home/python-local-repo
htpasswd -sc htpasswd.txt local-repo
3. 서버 시작
pypi-server -p {PORT} -P htpasswd.txt /home/python-local-repo &
4. pypi관련 설정 추가
vim ~/.pypirc
[distutils]
index-servers =
local
[local]
repository: http://127.0.0.1:PORT/
username: local-repo
password: local-repo
6. 원격 서버에서 확인
pip list --extra-index-url http://SERVERIP:PORT --trusted-host SERVERIP
'Linux-centos > Linux-centos__폐쇄망' 카테고리의 다른 글
yum local repository (0) | 2020.10.13 |
---|---|
폐쇄망 centos7에 python, 라이브러리 기타 등등 설치하기 (0) | 2020.08.12 |
centos7 인터넷 안되는 환경에서 python3 설치하기 (0) | 2020.08.06 |