Python 官方文档:入门教程 => 点击学习
bandersnatch现在GitHub上需要python3以上,不过2.7要改几行代码Httpd.confListen 9600NameVirtualHost 172.1.1.3<VirtualHost 172.1.1.3>D
bandersnatch现在GitHub上需要python3以上,不过2.7要改几行代码
Httpd.conf
Listen 9600
NameVirtualHost 172.1.1.3
<VirtualHost 172.1.1.3>
DocumentRoot /pip3/pypi/WEB
ServerName pip3.a.com
<Directory /pip3/pypi/web>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow From All
</Directory>
</VirtualHost>
Nginx.conf
server {
listen 80;
server_name pip3.a.com;
location / {
proxy_pass http://172.1.1.3:9600/;
}
}
server {
listen 443;
ssl on;
server_name pip3.a.com;
error_log /opt/log/apipl.error;
ssl_certificate /etc/pki/tls/server.pem;
ssl_certificate_key /etc/pki/tls/server.key;
ssl_session_cache shared:SSL:1m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_connect_timeout 240;
proxy_send_timeout 240;
proxy_read_timeout 240;
proxy_pass http://172.1.1.3:9600/;
}
}
其他机器引用
touch ~/.pip/pip.conf
[global]
index-url = http://pip3.a.com/simple
[install]
trusted-host = pip3.a.com
下载的包目录结构
[root@localhost pypi]# ls
generation todo web
[root@localhost pypi]# cd web
[root@localhost web]# ls
local-stats packages simple
pip install Mako
pip install --upgrade Mako
--结束END--
本文标题: bandersnatch建立本地pip源
本文链接: https://lsjlt.com/news/188102.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0