首页 技术 正文
技术 2022年11月23日
0 收藏 998 点赞 3,800 浏览 1594 个字

Centos6.8

1.查看自己的内核

[1].uname

[root@host79 ~]# uname -r

2.6.32-642.el6.x86_64

[2].查看CentOS版本信息

CentOS6.8有,CentOS7无该命令

[root@host79 ~]# lsb_release -a

LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

Distributor ID: CentOS

Description: CentOS release 6.8 (Final)

Release: 6.8

Codename: Final

[root@host79 ~]# cat /etc/redhat-release

CentOS release 6.8 (Final)

2.Docker基本组成

[1].镜像(Image)

Docker 镜像(Image)就是一个只读的模板。镜像可以用来创建 Docker 容器,一个镜像可以创建很多容器。

[2].容器(Container)

[3].仓库(Repository)

[4].总结

[5].Docker架构图

3.安装Docker

[1].安装EPEL仓库

Docker使用EPEL发布,RHEL系的OS首先要确保已经持有EPEL仓库,否则先检查OS的版本,然后安装相应的EPEL包。

[root@host79 ~]# yum install -y epel-release

[2].DockerIO

方法一:

[root@host79 ~]#  yum install -y docker-io

若出现No package docker-io available.则使用方法二安装

方法二:

[root@host79 ~]#  yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm

[3].配置文件是否存在

[root@host79 ~]# ls -l /etc/sysconfig/docker

[4].启动Docker服务

[root@host79 ~]# service docker start

[5].查看Docker版本信息

[root@host79 ~]# docker version

3.Docker加速

鉴于国内网络问题,后续拉取 Docker 镜像十分缓慢,我们可以需要配置加速器来解决,我使用的是阿里云的本人自己账号的镜像地址(需要自己注册有一个属于你自己的):https://xxxx.mirror.aliyuncs.com

[1].获取阿里云的加速器地址

https://xxxxxxxx.mirror.aliyuncs.com

[2].配置加速地址

将获得的自己账户下的阿里云加速地址配置进

(other_args=”–registry-mirror=https://你自己的账号加速信息.mirror.aliyuncs.com”)

[root@host79 ~]# vim /etc/sysconfig/docker

https://xxxxxxxx.mirror.aliyuncs.com

[root@host79 ~]# service docker restart

[3].检查配置是否成功

如果从结果中看到了配置的–registry-mirror参数说明配置成功

[root@host79 ~]# ps -ef|grep docker

4.HelloWorld

[root@host79 ~]# docker run hello-world

参考文档:https://docs.docker.com/engine/install/

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,964
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,486
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,331
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,114
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,747
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,781