I want to run some of my python scripts on my new Linux (Centos 6.5) machine that I developed on another Linux machine (also Centos 6.5). But my problem is that my new machine is not having internet connectivity and so I am not able to download all my required modules. Is there a way using which I can simply clone the Python configuration from one machine to another? For example saving image of the python configuration to a pendrive and then installing in new machine using image stored in pendrive? Clone Python from one Linux machine to another? I tried this but it did not work for me.
- Plug a pendrive on the CentOS host that have internet conectivity
- Mount the pendrive(depends on your hardware probing). Probably:
mount /dev/sdb1 /media
- Create a dir inside your media to keep things clean
yumto download the software you want with it's dependencies. Here:
yum install -y --downlaodonly --downloaddir=/media/rpms python
The last argument(packages) will vary depending on what python version you want, and what python modules you have installed on your system that needs to be replicated to the other host.
- Plug the usb on the machine with no internet connection, mount the pendrive and use the following command to install all the rpms downloaded:
rpm -Uvh *rpm
All steps needs to be executed as root user.