已有ECS实例切换操作系统
在已有实例停止运行后,操作一列找到更换操作系统菜单
选择要更换的操作系统镜像,设置密码
同意协议,然后确认订单
如果Fedora CoreOS系统不能直接登录,在实例列表中选远程连接,然后选免密登录访问
系统信息查看
查看操作系统
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ cat /etc/os-release
NAME=Fedora
VERSION="34.20210529.3.0 (CoreOS)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora CoreOS 34.20210529.3.0"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='34.20210529.3.0'
DEFAULT_HOSTNAME=localhost
查看内核信息
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ uname -a
Linux iZ2zee2m456rb6bde98jpkZ 5.12.7-300.fc34.x86_64 #1 SMP Wed May 26 12:58:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
dnf, rpm命令没有提供
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ which dnf
/usr/bin/which: no dnf in (/var/home/ecs-assist-user/.local/bin:/var/home/ecs-assist-user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ which yum
/usr/bin/which: no yum in (/var/home/ecs-assist-user/.local/bin:/var/home/ecs-assist-user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$
sudo查看docker信息
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ sudo docker version
Client:
Version: 20.10.6
API version: 1.41
Go version: go1.16
Git commit: 370c289
Built: Tue Apr 20 22:03:35 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.16
Git commit: 8728dd2
Built: Tue Apr 20 00:00:00 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.5.0~rc.1
GitCommit:
runc:
Version: 1.0.0-rc95
GitCommit: 4c62ef789fd7a2963bf61ffbf421ce9646063648
docker-init:
Version: 0.19.0
GitCommit:
拉取redis容器运行
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ sudo docker pull redis
Using default tag: latest
latest: Pulling from library/redis
Digest: sha256:d581aded52343c461f32e4a48125879ed2596291f4ea4baa7e3af0ad1e56feed
Status: Image is up to date for redis:latest
docker.io/library/redis:latest
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ sudo docker run -d redis
e3bc7fc6759b69acfa26866716e749bd97c66a6dfec8056dcdcc1dbaa23490b4
[ecs-assist-user@iZ2zee2m456rb6bde98jpkZ ~]$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e3bc7fc6759b redis "docker-entrypoint.s…" 7 seconds ago Up 7 seconds 6379/tcp epic_thompson
总结
Fedora CoreOS主要是用在容器操作上,去掉了系统中软件包管理部分
使用docker命令拉取容器执行