Created
November 6, 2013 12:15
-
-
Save ferdef/7335150 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create Private REPO for PIP on Ubuntu | |
1º Instalar https://github.com/wolever/pip2pi | |
#apt-get install pip | |
#pip install pip2pi | |
2º Create folder to host packages | |
#mkdir /var/www/pip | |
#copy foo-1.2.tar.gz in /var/www/pip | |
#dir2pi /var/www/pip | |
- It generate correct structure for PIP server /var/www/pip/simple | |
3º Now you have to configure apache to serve /var/www/pip with basic auth | |
<Directory "/var/www/pip"> | |
AuthType Basic | |
AuthName "Authentication Required" | |
AuthUserFile "/etc/htpasswd/.htpasswd" | |
Require valid-user | |
Order allow,deny | |
Allow from all | |
</Directory> | |
4º Configure user with write access to /var/www/pip . Then you can use pip2pi from other host to publicate new packages (uses rsync) | |
$ pip2pi private.com:/var/www/pip/ Django==1.5.4 - Mirror official package to your repo | |
or | |
$ scp foo-1.2.tar.gz user@private.com:/var/www/pip/ - Copy new package | |
$ ssh user@private.com pip2pi /var/www/pip/ - Update index | |
Extra: Configure contrab to update index (every 5 min) | |
#vi /etc/crontab | |
*/5 * * * * root pip2pi /var/www/pip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment