pip install from locally copied repo - linux

I wish to install connexion for swagger on a Ubuntu server that DOES NOT have internet access.
I wish to run
pip install connexion[swagger-ui]
Can I somehow download this repro (via another machine that does have internet access) and install/copy it locally and then install it that way?
If so, how?

Related

Docker - pip install from requirements or copy installed modules

When creating a docker, i am currently doing pip install -r requirements.txt.
Instead of pip install, can I just copy all the already installed modules in my venv of project on local host into docker? Is it equivalent or is there a difference? I am assuming here that local host is same as docker container in terms of image and configuration.
It is not recommended to copy the installed modules from your host machine to the container. The code might not work if your host OS is different than the container’s base OS. Moreover you may be copying unwanted cache files, which will increase the docker image size.

Deploy python REST service on Ubuntu

I have started learning django and Python.
I have developed one service using Visual Studio Code on my Windows machine.
It is working as expected on Windows machine.
Now I want to deploy the same on a Ubuntu server. (But failing as there is no 'bin' folder inside virtual environment)
How can I do it? I know I am missing something basic here.
Could you please help/ point me where I can read about it?
Let's suppose you are deploying your application at path /opt/.
Follow the below steps to deploy:
To get started we need to install some packages, run the following commands:
sudo apt-get update
sudo apt-get install python3-pip python3-dev libmysqlclient-dev ufw virtualenv
Above command would install the basics python dev packages on ubuntu server.
Create a virtualenv at some path of your choice(might be at /opt/.env), following commands:
virtualenv .env
Activate the environment: source .env/bin/activate
Install all requirement packages in virtual-env that you require to run your Django application.
Test your service manually by running: python manage.py runserver (this would shows that all dependencies are installed)
After that, You can install the web server gateway i.e Gunicorn and Supervisor as process monitoring tool for your service. Please refer: http://rahmonov.me/posts/run-a-django-app-with-nginx-gunicorn-and-supervisor/
Nginx can be run on server as web server for routing request to your application port/socket file.
Above are the high level steps to deploy the Django Application.

install unix program without internet access

I have a red hat server (server 1) which does not have access to internet.
I also have another another red hat server (server 2) which DOES have access to internet and it can also access server 1.
I need to install programs on server 1. In this case it is about a node module called pm2. I am not sure how this can be done. Should I install the module on server 2 and then upload it to the server 1?
Or generally: what is the approach to take in this situation?
Not a RH user... but if yum works the same way as apt then if you install the package(s) on server2 then you can simply copy teh RPMs to server1 (sneaker net, etc) and then install them. So really you just need to find where yum saves rpms it downloads before it installs them.
You can install the package "downloadonly" on server 2:
# yum install yum-plugin-downloadonly
Then download the packages you want:
# yum install --downloadonly --downloaddir=<directory> <package>
Transfer and install them on Server 1:
# rpm -ivh package.rpm

Install packages without internet Red Hat

I need to install Hyperledger on a Red Hat Enterprise Linux server that won't be connected to the internet. What I'll need to install is likely the Go language and Docker however given I have no internet connection I can't just use a package manager.
I've read about methods to do this with Ubuntu that mention copying .deb files over or otherwise using tools - would this work with RHEL and if not would anyone be able to recommend a way of doing this? (or any advice for achieveing this generally).
You can install the package "downloadonly" on a RHEL Server with internet connection:
# yum install yum-plugin-downloadonly
Then download the packages you want:
# yum install --downloadonly --downloaddir=<directory> <package>
Transfer and install them on a Server without internet connection:
# rpm -ivh package.rpm

not able to build dependency tree for varnishagent ?is it an open source?

I am not able to install varnish-agent what dependencies are required and what is the procedure to install varnish-agent such that i already have varnish 4.1 installed and have ubuntu as os.
I have the vagent2-master file in /etc/vagent2-master how to install varnish agent from here ?
If you installed Varnish from the official repository, you might be able to install it via apt-get install varnish-agent and all the dependencies should be resolved automatically.
I say that based on the Varnish repository: https://repo.varnish-cache.org/ubuntu/pool/varnish-4.0/v/varnish-agent/

Resources