===== Python =====
==== Install Python 3.6 Software Collection ====
$ sudo yum install rh-python36
$ scl enable rh-python36 bash
==== PyPi Mirroring - Devpi Server ====
$ mkdir /srv/www/devpi/ && mkdir /srv/www/devpi/data/ && cd /srv/www/devpi
$ virtualenv env
$ ./env/bin/pip install -q -U devpi-server
$ devpi-server --port 4040 --serverdir ./data/ --gen-config
$ cp gen-config/devpi.service /etc/systemd/system/.
$ mkdir /etc/systemd/system/devpi.service.d
$ cat </etc/systemd/system/devpi.service.d/custom.conf
[Service]
Environment=http_proxy=http://165.143.130.30:3128/
Environment=https_proxy=http://165.143.130.30:3128/
EOF
$ sudo systemctl daemon-reload
$ systemctl restart devpi.service
$ cat /etc/httpd/conf.d/devpi.conf
ServerName pip.telkom.co.za
ServerAdmin webmaster@localhost
DocumentRoot /var/www/devpi
ErrorLog /var/log/httpd/devpi_error.log
CustomLog /var/log/httpd/devpi_access.log combined
#RequestHeader set X-outside-url "http://192.168.111.19"
#RequestHeader set X-Real-IP "192.168.111.19"
ProxyPass / "http://localhost:4040/"
ProxyPassReverse / "http://localhost:4040/"
Options +Includes
$ systemctl reload httpd
Add the following entries to the ~/.pip/pip.conf or pip.conf in your virtualenv on the client side.
[global]
index-url = https://devpi.server.co.za/root/pypi/+simple/
trusted-host = devpi.server.co.za
[search]
index = https://devpi.server.co.za/root/pypi/
trusted-host = devpi.server.co.za
[easy_install]
index_url = http://devpi.server.co.za/root/pypi/+simple/