PyPiServer
詳見: Setting up a custom PyPi server
I'm going to be setting up the PyPi server in a virtualenv to be controlled by supervisord and set up Nginx SSL virtualhost as a frontend from which I'll reverse proxy to the PyPi server.
1. virtualenv
wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.1.1.tar.gz
tar zxvf virtualenv-12.1.1.tar.gz
cd virtualenv-12.1.1
python virtualenv.py myVE
2. supervisor
wget https://pypi.python.org/packages/source/s/supervisor/supervisor-3.1.3.tar.gz
tar zxvf supervisor-3.1.3.tar.gz
cd supervisor-3.1.3
python setup.py install
Setting up PyPi
# set up the directories mkdir -p ~/pypi/packages cd ~/pypi # set up the virtualenv and activate it virtualenv venv . ./venv/bin/activate # install the payload pip install pypiserver
pypi-server -p 7001 ~/pypi/packages
Controlling the process via supervisord
vim /etc/supervisord.conf
[supervisord]
... not finished yet ...
[supervisorctl]
... not finished yet ...
[program:pypi]
command=/root/pypi/venv/bin/pypi-server -p 7001 ~/pypi/packages
directory=/root/pypi
user=jamiecurle
autostart=true
autorestart=true
redirect_stderr=true
- TBD -
Finally, reverse proxy through Nginx
Configuring pip to search local indexes
Enabling uploads
page revision: 8, 最後編輯於: 23 Apr 2015 04:11