- Make sure existing yum packages are up-to-date.
- Install the Docker package.
- Edit /etc/sysconfig/docker by replacing the existing OPTIONS line with the following.
- Start/restart Docker.
systemctl restart docker.service
- Set Docker to start after reboot.
systemctl enable docker.service
- Verify the installation.
docker run dockerinaction/hello-world
yum update
yum install docker
OPTIONS='-s devicemapper --storage-opt dm.fs=xfs --exec-opt native.cgroupdriver=cgroupfs'
移除 docker:
yum remove docker
【Linux 指令】
安裝軟體前常常需要先確認一下自己的 Linux 的版本,這裡提供兩個常用的指令 ...
- lsb_release -a : 查看 Linux 的發行版本資訊
[steven@localhost ~]$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: Scientific Description: Scientific Linux release 7.3 (Nitrogen) Release: 7.3 Codename: Nitrogen
- uname -a: 查看 Linux core 的版本
[steven@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 15 08:36:44 CDT 2017 x86_64 x86_64 x86_64 GNU/Linux