redhat安装docker
2016-07-21 15:00
696 查看
一、禁用selinux 由于Selinux和LXC有冲突,所以需要禁用selinux。编辑/etc/selinux/config,设置两个关键变量。 SELINUX=disabled SELINUXTYPE=targeted
二、配置Fedora EPEL源 1 sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
三、添加hop5.repo源
cd /etc/yum.repos.d sudo wget http://www.hop5.in/yum/el6/hop5.repo
四、安装Docker sudo yum install docker-io
图1是yum安装过程中的截图,可以发现安装的软件只有docker和lxc相关包,没有内核包,例如kernel-ml-aufs。
![](http://www.linuxidc.com/upload/2014_01/14012020112703.jpg)
图1 yum install docker-io输出截图
五、初步验证docker 输入docker -h,如果有如下输出,就证明docker在形式上已经安装成功。
# docker -h Usage of docker: -D=false: Enable debug mode -H=[]: Multiple tcp://host:port or unix://path/to/socket to bind in daemon mode, single connection otherwise -api-enable-cors=false: Enable CORS headers in the remote API -b="": Attach containers to a pre-existing network bridge; use 'none' to disable container networking -bip="": Use this CIDR notation address for the network bridge's IP, not compatible with -b -d=false: Enable daemon mode -dns=[]: Force docker to use specific DNS servers -g="/var/lib/docker": Path to use as the root of the docker runtime -icc=true: Enable inter-container communication -ip="0.0.0.0": Default IP address to use when binding container ports -iptables=true: Disable docker's addition of iptables rules -p="/var/run/docker.pid": Path to use for daemon PID file -r=true: Restart previously running containers -s="": Force the docker runtime to use a specific storage driver -v=false: Print version information and quit
二、配置Fedora EPEL源 1 sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
三、添加hop5.repo源
cd /etc/yum.repos.d sudo wget http://www.hop5.in/yum/el6/hop5.repo
四、安装Docker sudo yum install docker-io
图1是yum安装过程中的截图,可以发现安装的软件只有docker和lxc相关包,没有内核包,例如kernel-ml-aufs。
![](http://www.linuxidc.com/upload/2014_01/14012020112703.jpg)
图1 yum install docker-io输出截图
五、初步验证docker 输入docker -h,如果有如下输出,就证明docker在形式上已经安装成功。
# docker -h Usage of docker: -D=false: Enable debug mode -H=[]: Multiple tcp://host:port or unix://path/to/socket to bind in daemon mode, single connection otherwise -api-enable-cors=false: Enable CORS headers in the remote API -b="": Attach containers to a pre-existing network bridge; use 'none' to disable container networking -bip="": Use this CIDR notation address for the network bridge's IP, not compatible with -b -d=false: Enable daemon mode -dns=[]: Force docker to use specific DNS servers -g="/var/lib/docker": Path to use as the root of the docker runtime -icc=true: Enable inter-container communication -ip="0.0.0.0": Default IP address to use when binding container ports -iptables=true: Disable docker's addition of iptables rules -p="/var/run/docker.pid": Path to use for daemon PID file -r=true: Restart previously running containers -s="": Force the docker runtime to use a specific storage driver -v=false: Print version information and quit
相关文章推荐
- 基于centos的docker安装
- 在docker环境中制作openstack镜像文件
- 多种方式(含docker容器)实现零停机时间(Zero-Downtime)部署
- 深入理解docker graph driver - DeviceMapper
- 用Docker配置简单的Nginx+Apache的web负载均衡
- docker的ubuntu安装
- kubernetes+docker监控之简介
- marathon部署docker很方便,阶段性学习成果
- 论docker中 CMD 与 ENTRYPOINT 的区别
- docker – 你应该知道的10件事
- docker – 你应该知道的10件事
- docker – 你应该知道的10件事
- docker4dotnet #2 容器化主机
- docker4dotnet #2 容器化主机
- docker4dotnet #2 容器化主机
- docker安装配置
- Kubernetes Cluster Installation Manual
- Docker – 你应该知道的10件事
- Swarm负责人谈Docker Swarm的架构、现状和未来
- Docker 容器逃逸案例分析