PIP installation
[[email protected] ~]# Yum install-y python-pip # Install Pip[[email protected] ~]# mkdir-p/var/www/html/pypi/packages # Used to put a PIP bag
Pip Source Configuration
# download first without installing a few packages into the/var/www/html/pypi/packages directory [[email protected] ~]# pip -q install --no-install -i http://pypi.python.org/simple -d /var/www/html/pypi/packages/ pypiserver # pypi server[[email protected] ~]# pip -q install --no-install -i http://pypi.python.org/simple -d /var/www/html/pypi/packages/ salt-api [[email protected] ~]# pip -q install --no-install -i http://pypi.python.org/simple -d /var/www/html/pypi/ Packages/ pip2pi
[Email protected] ~]# Ll/var/www/html/pypi/packages/total 576drwxr-xr-x 2 root root, April 18:21. Drwxr-xr-x 3 ro OT root APR 24 18:20. -rw-r--r--1 root root 86178 Apr 18:20 pypiserver-1.1.7.zip-rw-r--r--1 root root 495999 Apr 18:21 salt-api-0.8.4.1 . tar.gz
[[Email protected] ~]# pip help install # View the parameter options that can be taken after install [[email protected] ~]# pip install Pypiserver # If you have a Web server, such as Apache, Nginx, do not install this [[email protected] ~]# pip install Pip2pi # set up a reference [[email protected] ~]# dir2pi/var/www/html/pypi/ packages/# using DIR2PI to index [[email protected] ~]# yum install-y httpd[[email protected] ~]# service start httpd # start httpd service The default directory is under the/var/www/html directory
Pip Source Test
[[email protected] ~]# mkdir-p. PIP # set PIP source default location [[email protected] ~]# cat. pip/pip.conf [global]index-url=http: 192.168.141.249/pypi/packages/simple[[email protected] ~]# pip install Salt-api # Normal installation, test okdownloading/unpacking Salt-api
Reference links
Building the engine room operation and maintenance infrastructure (16): Building local PyPI
This article is from the "The-way-to-cloud" blog, make sure to keep this source http://iceyao.blog.51cto.com/9426658/1638128
Pip Local Source Authoring