zoukankan      html  css  js  c++  java
  • Docker和Docker-compose安装教程以及docker-elk,docker-storm安装教程

    此安装教程仅供我自己安装配置时查看,其他的人不可以偷看!!!

    安装Docker

    1. Update package information, ensure that APT works with the https method, and that CA certificates are installed.

    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates
    

    2. Add the new GPG key.

    sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    

    3. Open the /etc/apt/sources.list.d/docker.list file in your favorite editor.If the file doesn’t exist, create it.Remove any existing entries.Add an entry for your Ubuntu operating system.

    deb https://apt.dockerproject.org/repo ubuntu-precise main
    deb https://apt.dockerproject.org/repo ubuntu-trusty main
    deb https://apt.dockerproject.org/repo ubuntu-xenial main
    

    On Ubuntu Precise 12.04 (LTS)

    On Ubuntu Trusty 14.04 (LTS)

    On Ubuntu Xenial 16.04 (LTS)

    上面的deb要和下面的版本分别对应。

    4. Save and close the /etc/apt/sources.list.d/docker.list file.Update the APT package index.Purge the old repo if it exists.Verify that APT is pulling from the right repository.

    sudo apt-get update
    sudo apt-get purge lxc-docker
    apt-cache policy docker-engine
    

    5. Update your package manager.Install the recommended packages.(仅Ubuntu Xenial 16.04 (LTS)和Ubuntu Trusty 14.04 (LTS),12.04不做讨论,自己去docker官网看)

    sudo apt-get update
    sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
    

    6. Update your APT package index.Install Docker.

    sudo apt-get update
    sudo apt-get install docker-engine
    

    7. Start the docker daemon.

    sudo service docker start
    

      

    安装Docker-Compose(需要先安装docker)

    1. Go to the Compose repository release page on GitHub.

    2. Follow the instructions from the release page and run the curl command, which the release page specifies, in your terminal.

    【“Permission denied”  Run sudo -i, then the two commands below, then exit.】

    3. An example command illustrating the format,Apply executable permissions to the binary.Test the installation.

    curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    docker-compose --version

    Alternative install options

    Install using pip

    pip version 6.0 or greater is required

    pip install docker-compose
    

    Install as a container

    curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    

      

  • 相关阅读:
    Springboot学习七 spring的一些注解
    Spring boot 学习六 spring 继承 mybatis (基于注解)
    Spring boot 学习 五:domain的定义
    Spring boot 学习 四:spring boot 配置文件 application.yml
    python学习(十九) 查看Python的安装路径
    docker 学习(九) docker部署静态网站
    maven学习9 关于maven一些參數
    docker 学习(八) docker file
    HTTP VS HTTPS
    【Python】【亲测好用】安装第三方包报错:AttributeError:'module' object has no attribute 'main'
  • 原文地址:https://www.cnblogs.com/cutd/p/5953417.html
Copyright © 2011-2022 走看看