PyPi Mirror Installer
=====================

The PyPi mirror installer is a source-installation kit that installs a PyPi mirror and all its dependencies. 

Feedback/bugs to: manuel.viera.tirado@gmail.com


Installation Instructions
=========================
The installer will compile Nginx and it will install required python eggs from Pypi. (See "Dependencies" below.)

PLEASE NOTE: You have the option to run the installation as root or a normal user.

First of all, edit buildout.cfg and modify the following parameters:

 * 'mirror-base' at 'repository' section. This is the directory where all packages will be downloaded. Example:
    mirror-base = /media/sd/pypi

 * 'url' at 'mirror-config'. That URL will be the URL for access to your PyPi mirror. Example:
    url = http://pypi.mviera.es

Once you have installed all required dependencies, you can continue with the installation process. So you execute the following command:
    >>python2.6 bootstrap.py

You should have the buildout environment ready to go. Now, you must execute the buildout installation:
    >> bin/buildout

At the end, you should have the 'bin/pypimirror' binary. Now it's time to start downloading packages from PyPi executing the following command:
    >> bin/pypimirror -I -c -v etc/pypi/pypimirror.cfg

Dependencies
============
The following packages are necessary to run buildout and install the PyPi mirror.
1) setuptools
2) gcc
3) GNU make
4) libpcre3-dev
5) libssl-dev

Startup/Shutdown/Restart instructions
=====================================

You should run bin/supervisord and Nginx server should be automatically started.

To start Nginx,
    >> $HOME/bin/supervisorctl start nginx 

To stop Nginx,
    >> $HOME/bin/supervisorctl stop nginx 

To restart Nginx,
    >> $HOME/bin/supervisorctl restart nginx

To check status,
    >> $HOME/bin/supervisorctl status nginx


Also, you can access to Supervisor Admin Pannel at:

    http://localhost:9000/

(Use the default admin password in doc/adminPassword.txt)

To change the admin password, edit the supervisor part in buildout.cfg and run bin/buildout.

Password changes will not be reflected in doc/adminPassword.txt.

Ports
=====
 - Nginx server runs on port 8080
 - Supervisord server runs on port 9000

Edit buildout.cfg and run bin/buildout to change ports.

Post-installation instructions
==============================
Now, we have our PyPi mirror ready to go. We must to run the following command:

    >> $HOME/bin/pypimirror -I -c -v $HOME/etc/pypi/pypimirror.cfg

This command will start downloading all packages from PyPi. When finished an index.html file will be generated containing an index with all downloaded packages.

At this time, you should be able to access to that index at:

    http://localhost:8080/


Mirror update
=============
When the buildout installation process has finished it configures a cron job for keeping the mirror up to date every two hours.

You can see this cron job executing the following command:
    >> crontab -l

Edit the buildout.cfg and run bin/buildout to change the cron job execution frequency.

Uninstall instructions
======================
1) Stop supervisord
2) Remove the folder $HOME/pypi-mirror


Backup instructions
===================
1) Stop supervisord
2) Back up the folder $HOME/pypi-mirror
    >> tar cvzf pypi-mirror-backup.tar.gz $HOME/pypi-mirror


::...
免责声明:
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:

或是邮件反馈可也:
askdama[AT]googlegroups.com


订阅 substack 体验古早写作:


点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:
zoomquiet


自怼圈/年度番新

DU22.4
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号: 44049002000656 ...::