Container - linux netless rpm installation docker


1. View kernel:

2. Installing docker without network rpm:

(1) Close selinux:

(2) Get offline rpm package:

(3) Upload offline rpm package:

(4) Execute the installation package:

(5) Write the docker service script:

(6) Upload service script and authorization:

(7) Reload system services:

3. Auto start docker service:

4. Start docker service:

5. Close docker service:

6. View docker service:

7. View docker version:

1. View kernel:

The official documentation requires that the Linux kernel must be at least 3.8, and docker can only run on 64 bit systems. Since the kernel versions of RHEL6 and CentOS6 are 2.6, you must upgrade the kernel first. CentOS 7 and above are recommended.

Execute the command to view the kernel: uname -r

The Centos6 kernel is as follows:

The Centos7 kernel is as follows:

2. Installing docker without network rpm:

Execute the yum command on a server with a network and no docker installed, and download the required installation package in rpm format to the specified folder of the server, so as to install it in a server without a network:

(1) Close selinux:

Edit the / etc/selinux/config file. Then restart the server.

(2) Get offline rpm package:

Create rpm software storage directory:

mkdir -p /wocloud/soft/docker_rpm

Install rpm dependent packages:

yum install -y yum-utils device-mapper-persistent-data lvm2

To configure a repository:

yum-config-manager --add-repo

Get the rpm package of docker:

yum -y install docker-ce-18.06.1.ce-3.el7 --downloadonly --downloaddir /wocloud/soft/docker_rpm

When other netless servers need to be installed, use / wocloud / soft / docker_ Compress all rpm files in rpm into a package, upload them to the target server, and execute the following installation command.

Offline rpm and registered system service file resource address of docker-18.06.1:

docker_18.06.1 offline rpm installation package and service files. rar virtualization document resources - CSDN Download

(3) Upload offline rpm package:

Upload the obtained rpm offline package of docker to the target server.

(4) Execute the installation package:

Enter the folder of rpm offline package in docker and execute the following installation command:

Execute command:

rpm -ivh *.rpm --force --nodeps

(5) Write the docker service script:

Prepare docker.service service file;


Description=Docker Application Container Engine

Documentation= firewalld.service



# the default is not to use systemd for cgroups because the delegate issues still

# exists and systemd currently does not support the cgroup feature set required

# for containers run by docker


ExecReload=/bin/kill -s HUP $MAINPID

# Having non-zero Limit*s causes performance problems due to accounting overhead

# in the kernel. We recommend using cgroups to do container-local accounting.




# Uncomment TasksMax if your systemd version supports it.

# Only systemd 226 and above support this version.



# set delegate yes so that systemd does not reset the cgroups of docker containers


# kill only the docker process, not all processes in the cgroup


# restart the docker process if it exits prematurely





(6) Upload service script and authorization:

Upload the docker.service file to the server / etc/systemd/system / and authorize:

chmod 777 /etc/systemd/system/docker.service

(7) Reload system services:

Because docker.service is added, the system needs to reload the configuration file. Execute the command: systemctl daemon reload

3. Auto start docker service:

Execute the command to add docker service since startup:

systemctl enable docker

4. Start docker service:

Execute the command to start docker service:

systemctl start docker

5. Close docker service:

Execute the command to close docker service:

systemctl stop docker

6. View docker service:

Execute the command to view docker service:

systemctl status docker

7. View docker version:

Execute the command to view docker version:

docker version

Tags: Docker Container

Posted on Thu, 28 Oct 2021 20:08:15 -0400 by sarijit