安装pypiserver
pip install pypiserver --no-index --find-links='/home/xxwdll/soft/nginx/pip'
启动脚本
#!/bin/bash
cat /dev/null > nohup.out
nohup /u01/python3/bin/pypi-server -p 8888 /home/xxwdll/soft/nginx/pip 2>&1 &
使用
python -m pip install -i http://192.168.209.202:8888 --trusted-host=192.168.209.202 pymysql
持久化

在该目录下新建 pip目录
内建pip.ini配置文件

[global]
index-url = http://192.168.209.202:8888
trusted-host = 192.168.209.202
网友评论