centos 7安装部署docker

1.centos 7

在windows下通过vm虚拟机安装centos 7:

VMware-workstation-full-10.0.3-1895310

centos 7

2.要求

操作系统的内核版本不能低于3.10

查看内核版本:

# uname -r

3.安装

3.1通过yum安装

需要联入互联网

$ dudo yum update
3.1.2加入yum repo
$ sudo tee /etc/yum.repos.d/docker.repo <<-‘EOF‘
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
3.1.3安装docker软件包
$ sudo yum install docker-engine
3.1.4启动docker守护进程
$ sudo service docker start
3.1.5验证docker是否安装成功,在容器里面运行一个官方的测试镜像(hello-world)
$ sudo docker run hello-world
Unable to find image ‘hello-world:latest‘ locally
    latest: Pulling from hello-world
    a8219747be10: Pull complete
    91c95931e552: Already exists
    hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
    Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
    Status: Downloaded newer image for hello-world:latest
    Hello from Docker.
    This message shows that your installation appears to be working correctly.

    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
            (Assuming it was not already locally available.)
     3. The Docker daemon created a new container from that image which runs the
            executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
            to your terminal.

    To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash

    For more examples and ideas, visit:
     http://docs.docker.com/userguide/

显示上面的结果则表示安装成功。

3.2用curl工具通过shell脚本安装

$ sudo yum update
3.2.1执行docker安装脚本
$ curl -fsSL https://get.docker.com/ | sh
3.2.2启动docker
$ sudo service docker start
3.2.3验证
$ sudo docker run hello-world

相关链接:

https://docs.docker.com/engine/installation/linux/centos/

时间: 2024-08-04 09:00:42

centos 7安装部署docker的相关文章

Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践

原文:Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践 环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输: xftp 1.在本地创建asp.net core应用发布 1.1 使用Vs2017 新建一个asp.netcore项目 步骤略(一路next),当然你也可以用命令行创建. 1.2 发布项目 在项目路径下执行命令 dotnet publish –c release 先本地运行是否有问题,减少因为本

Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(二)

原文:Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(二) Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一) 接上一篇 3. Nginx配置反向代理 3.1 cnetos 安装nginx 首先,我们需要在服务器上安装Nginx.参考网址 3.1.1:添加Nginx存储库 要添加CentOS 7 EPEL仓库,请打开终端并使用以下命令: sudo yum install epel-release EPEL的全称叫 Ex

centos 安装部署docker与局域网主机相通详细配置

Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.有了docker,对于运维和开发都是福音.下面直接上配置: centos安装docker源: yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm 安装docker: yum install -y docker-io 启动docker:

安装部署docker环境

当前环境:centos7 1.参考docker官方文档安装docker:https://docs.docker.com/engine/installation/linux/centos/ [[email protected] ~]# yum update #更新yum源 [[email protected] ~]# tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker Repository baseurl=http

Centos 7安装部署zabbix3.0实战(服务器端)

一.服务器端部署 1.Zabbix 环境准备 [[email protected]]#hostnamectl set-hostname zabbix    #永久修改主机名 [[email protected] ~]# cat /etc/redhat-release      # 查看系统版本 CentOS Linux release 7.2.1511 (Core) [[email protected]zabbix ~]# uname -r                # 查看内核版本 3.1

CentOS 7安装部署zabbix3.4

一.zabbix安装配置1.zabbix简介基于Web界面的分布式系统监控的企业级开源软件.可以监控各种系统与设备,网络参数,保证服务器设备安全运营:提供灵活的通知机制.1.1. zabbix的逻辑图1.2. zabbix的组件zabbix-server:Zabbix监控端组件,它是一个服务器端组件zabbix-agent:被监控端组件,它是一个客户端组件,它主要是监控由Agent所支持的操作系统(简单说如果你要监控OS,就需要在对应的OS上安装Agent程序),而如果要监控一些其他设备,通常需

CentOS 7安装部署ELK 6.2.4

一.ELK介绍 ELK是三款开源软件的缩写,即:ElasticSearch + Logstash + Kibana.这三个工具组合形成了一套实用.易用的监控架构,可抓取系统日志.apache日志.nginx日志.mysql日志等多种日志类型,目前很多公司用它来搭建可视化的集中式日志分析平台.ElasticSearch:是一个分布式的RESTful风格的搜索和数据分析引擎,同时还提供了集中存储功能,它主要负责将logstash抓取来的日志数据进行检索.查询.分析等.Logstash:日志处理工具,

[原创]在Linux系统Ubuntu14.04上安装部署docker

Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何接口. Docker是基于Linux 64bit的,无法在32bit的linux/Windows/unix环境下使用.所以需要确保Ubuntu的版本是64位. apt-get是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索.安装.升级.卸载软件或操作系统.

在CentOS上安装部署MooseFS分布式文件系统

参考资料: http://www.moosefs.org/tl_files/manpageszip/moosefs-step-by-step-tutorial-cn-v.1.1.pdf 环境介绍:OS: CentOS 6.3 x86_64server1 - mfsmaster & mfschunkserverserver2 - mfsmetalogger & mfschunkserver & mfsclientserver3 - mfschunkserver 1. 什么是Moose