Katakodaについてはリナスクで紹介済み。
KatakodaのCentOSプレイグラウンドページ。
https://www.katacoda.com/courses/centos/playground
CentOS Playgroundの起動後にOS情報、ロケールや日時、ネットワークの確認
uname -a
[root@ba05f2715201 ~]# uname -a
Linux ba05f2715201 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
カーネルは、3.10.0-693.5.2.el7.x86_64。
cat /etc/os-release
[root@ba05f2715201 ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
locale
[root@ba05f2715201 ~]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
date
[root@ba05f2715201 ~]# date
Thu Nov 26 07:01:46 UTC 2020
ip a
[root@ba05f2715201 ~]# ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 02:42:ac:11:00:1a brd ff:ff:ff:ff:ff:ff
inet 172.17.0.26/16 brd 172.17.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::42:acff:fe11:1a/64 scope link
valid_lft forever preferred_lft forever
3: docker0: mtu 1500 qdisc noqueue state DOWN
link/ether 02:42:91:7a:0e:a9 brd ff:ff:ff:ff:ff:ff
inet 172.20.0.1/16 scope global docker0
valid_lft forever preferred_lft forever
Dockerの有無とバージョン確認
docker -v
[root@ba05f2715201 ~]# docker -v
Docker version 1.12.6, build 85d7426/1.12.6
docker version
[root@ba05f2715201 ~]# docker version
Client:
Version: 1.12.6
API version: 1.24
Package version: docker-1.12.6-61.git85d7426.el7.centos.x86_64
Go version: go1.8.3
Git commit: 85d7426/1.12.6
Built: Tue Oct 24 15:40:21 2017
OS/Arch: linux/amd64<br>Server:
Version: 1.12.6<br>API version: 1.24
Package version: docker-1.12.6-61.git85d7426.el7.centos.x86_64
Go version: go1.8.3
Git commit: 85d7426/1.12.6
Built: Tue Oct 24 15:40:21 2017
OS/Arch: linux/amd64
アップデートの確認
yum check-update
(長いので省略)
Transaction Summary
==================================================================================
Install 8 Packages (+59 Dependent packages)
Upgrade 309 Packages
Total download size: 484 M
旧Docker削除と最新Docker導入
リナスクのTipsで紹介済み。
標準インストールで導入したDockerを削除
# yum remove -y docker docker-client docker-common
# rm -rf /var/lib/docker /var/run/docker
Docker CE版のリポジトリを有効化して安定版をインストール
# yum install -y yum-utils device-mapper-persistent-data lvm2
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# yum install -y docker-ce docker-ce-cli containerd.io