[LINUX] Install the package in an offline environment

Install the package in an offline environment

Note that there may be more things to do in the future

0. Overview

I want to install a package in an offline environment.

Assuming that you have an online environment that connects to the Internet, follow the steps below.

  1. Download the package in an online environment
  2. Transfer the package to the offline environment
  3. Install the package

1. Download the package in an online environment

Specify the --downloadonly option with yum install.

You can specify the download destination by specifying the --downloaddir option, but it's annoying because I forgot to specify it here. .. ..

$ sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm --downloadonly
Loaded plugins: fastestmirror
amazon-ssm-agent.rpm                                                                                                                  |  31 MB  00:00:10
Examining /var/tmp/yum-root-oPlmKR/amazon-ssm-agent.rpm: amazon-ssm-agent-2.3.772.0-1.x86_64
Marking /var/tmp/yum-root-oPlmKR/amazon-ssm-agent.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package amazon-ssm-agent.x86_64 0:2.3.772.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                  Arch                           Version                             Repository                                 Size
=============================================================================================================================================================
Installing:
 amazon-ssm-agent                         x86_64                         2.3.772.0-1                         /amazon-ssm-agent                         120 M

Transaction Summary
=============================================================================================================================================================
Install  1 Package

Total size: 120 M
Installed size: 120 M
Background downloading packages, then exiting:
exiting because "Download Only" specified

I've been fooled into an unfamiliar place called / var / tmp / yum-root-oPlmKR, so I bring this to my home.

Also change the owner

# cp amazon-ssm-agent.rpm /home/centos/
# chown centos /home/centos/amazon-ssm-agent.rpm

2. Transfer the package to the offline environment

Transfer with scp command.

Specify the key file to log in to the transfer destination with the -i option.

$ scp -i ./.ssh/xxx.pem amazon-ssm-agent.rpm xx.xx.xx.xx(Transfer destination IP):~

3. Install the package

Install with yum as usual

I forgot to put on sudo and got angry once. .. ..

$ sudo yum install amazon-ssm-agent.rpm
Loaded plugins: fastestmirror
Examining amazon-ssm-agent.rpm: amazon-ssm-agent-2.3.772.0-1.x86_64
Marking amazon-ssm-agent.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package amazon-ssm-agent.x86_64 0:2.3.772.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                  Arch                           Version                             Repository                                 Size
=============================================================================================================================================================
Installing:
 amazon-ssm-agent                         x86_64                         2.3.772.0-1                         /amazon-ssm-agent                         120 M

Transaction Summary
=============================================================================================================================================================
Install  1 Package

Total size: 120 M
Installed size: 120 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : amazon-ssm-agent-2.3.772.0-1.x86_64                                                                                                       1/1
Created symlink from /etc/systemd/system/multi-user.target.wants/amazon-ssm-agent.service to /etc/systemd/system/amazon-ssm-agent.service.
  Verifying  : amazon-ssm-agent-2.3.772.0-1.x86_64                                                                                                       1/1

Installed:
  amazon-ssm-agent.x86_64 0:2.3.772.0-1

Complete!

You have successfully installed it.

Recommended Posts

Install the package in an offline environment
[For beginners] Install the package in the Anaconda environment (Janome)
Install python package in personal environment on Ubuntu
Install LightGBM in an OS X virtualenv environment
[Linux] Update the package offline
Install scrapy in python anaconda environment
install tensorflow in anaconda + python3.5 environment
pyenv + pyenv-Automatically load the virtualenv environment in the virtualenv environment
Install Django in a pipenv virtual environment
Use tensorflow in an environment without root
The story of an error in PyOCR
Install rJava on Linux in R3.6 environment.
Creating a virtual environment in an Anaconda environment
Install CaboCha in a non-Anaconda environment (Win)
Install the Python module in any directory
[mac] Install R in pyenv + Jupyter-Lab environment
I can't install the package with pip.
How to install python package in local environment as a general user
[Python] How to save the installed package and install it in a new environment at once Mac environment
The meaning of {version-number} in the mysql rpm package
In the Chainer tutorial, I get an error when importing a package. (mock)
Building an environment that uses Python in Eclipse
Use the latest pip in a virtualenv environment
Install Python 3.5.1 + numpy + scipy + α in Windows environment
Precautions when installing packages in the conda environment
The 18th offline real-time writing problem in Python
A complete guidebook to using pyenv, pip and python in an offline environment
Set a fixed IP in the Linux environment
Launch an HTTP server in the current directory
The 19th offline real-time writing problem in Python
How to install the deep learning framework Tensorflow 1.0 in the Anaconda environment of Windows
Used from the introduction of Node.js in WSL environment
Build an interactive environment for machine learning in Python
The story of building the fastest Linux environment in the world
Create an Anaconda virtual environment in your project folder
Procedure to install TensorFlow in fish shell environment (Anaconda 4.0.0)
[Golang] Specify an array in the value of map
Determine if an attribute is defined in the object
Run pandas-highcharts display_charts in an environment other than jupyter
Install Ubuntu 20.04 with GUI and prepare the development environment
Until you install TensorFlow-GPU with pip in Windows environment
How to install poetry (error handling) in zsh environment
Completely disable mouse acceleration in the Linux desktop environment
virtualenvwrapper in windows environment
virtual environment in python
Install the pip command
Development environment in Python
I tried running the offline speech recognition system Julius with python in the Docker virtual environment
Install The Virtual Brain
I checked the Python package pre-installed in Google Cloud Dataflow
Display "Hello World" created in the local environment on the web
I tried the super-resolution algorithm "PULSE" in a Windows environment
Check the operation of Python for .NET in each environment
Commands often used in the development environment during Python implementation
Reflect the virtual environment created with Miniconda in Jupyter notebook
How to manipulate the DOM in an iframe with Selenium
After enabling the python virtual environment in the batch file, run the python file
An introduction to the modern socket API to learn in C
Install CaboCha in Ubuntu environment and call it with Python.