Docker line installation (can connect Internet)
[root@localhost ~]# yum install docker
yum install docker --downloadonly --downloaddir=/opt/docker
After installation is complete, use the following command to start the docker services, and set it to boot:
[root@localhost ~]# service docker start
或[root@localhost ~]# systemctl start docker
[root@localhost ~]# chkconfig docker on
Docker offline installation
Collated dependent packages, the centos7_docker placed in the / opt directory
执行命令:[root@localhost ~]#rpm -ivh /opt/centos7_docker/audit* checkpolicy* container* docker* lib* oci* policycoreutils* python* selinux-policy* setools* skopeo* systemd* yajl*
Turn off the firewall
firewall-cmd --state # view the default firewall status
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service # prohibit firewall boot
View SELinux status
[Root @ localhost ~] # / usr / sbin / sestatus -v
SELinux status: enabled
// enabled representation on state
SELinux has temporarily shut down (without restarting the server) and restart the server to shut down permanently
Disable SELinux ( because selinux and LXC conflict, so it is necessary to disable )
Modify / etc / selinux / config file
The SELINUX = enforcing changed SELINUX = disabled
Restart the machine to reboot