本地file模式:
/root/srcpip/放的是python module安装文件,一般格式是tar.gz。
pip install --no-index -f file:///root/srcpip -r requirements.txt
http server模式:
nginx配置pip源:
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.pem;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
location / {
root html;
index index.html index.htm;
autoindex on;
}
}