$ kubectl get pods NAME READY STATUS RESTARTS AGE test-centos7-7cc5dc6987-jz486 0/1 CrashLoopBackOff 8 (111s ago) 17m
查看 Pod 详细信息
$ kubectl describe pod test-centos7-7cc5dc6987-jz486 ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 18m default-scheduler Successfully assigned default/test-centos7-7cc5dc6987-jz486 to ops-kubernetes3 Normal Pulled 16m (x5 over 18m) kubelet Container image "centos:centos7.9.2009" already present on machine Normal Created 16m (x5 over 18m) kubelet Created container centos7 Normal Started 16m (x5 over 18m) kubelet Started container centos7 Warning BackOff 3m3s (x71 over 18m) kubelet Back-off restarting failed container
定位中也可以使用 kubectl describe pod 命令检查 Pod 的退出状态码。Kubernetes 中的 Pod ExitCode 状态码是容器退出时返回的退出状态码,这个状态码通常用来指示容器的执行结果,以便 Kubernetes 和相关工具可以根据它来采取后续的操作。以下是一些常见的 ExitCode 状态码说明:
选择 Personal access tokens ,然后点击 Generate new token 。
生成令牌并复制。
gh
Github 命令行工具 gh 常用操作
Login
参考以下示例使用命令 gh auth login 登陆 Github
# gh auth login ? Where do you use GitHub? GitHub.com ? What is your preferred protocol for Git operations on this host? HTTPS ? Authenticate Git with your GitHub credentials? Yes ? How would you like to authenticate GitHub CLI? Paste an authentication token Tip: you can generate a Personal Access Token here https://github.com/settings/tokens The minimum required scopes are 'repo', 'read:org', 'workflow'. ? Paste your authentication token: ********************************************************************************************* - gh config set -h github.com git_protocol https ✓ Configured git protocol ! Authentication credentials saved in plain text ✓ Logged in as user1
查看 Github 认证状态(gh auth status)
# gh auth status github.com ✓ Logged in to github.com account user1 (/root/.config/gh/hosts.yml) - Active account: true - Git operations protocol: https - Token: github_pat_11BP5YWMA0XuC4iSW26eBN_***********************************************************
# systemd-analyze critical-chain The time when unit became active or started is printed after the "@" character. The time the unit took to start is printed after the "+" character.
# cat /etc/sudoers.d/90-cloud-init-users # Created by cloud-init v. 19.4 on Mon, 31 Oct 2022 07:58:58 +0000 # User rules for centos centos ALL=(ALL) NOPASSWD:ALL
wget http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz tar -xf automake-1.14.1.tar.gz cd automake-1.14.1 ./bootstrap.sh
以上步骤执行完成后,会生成 configure 可执行文件
./configure make make install
安装完成后,执行以下命令验证版本
$ automake --version automake (GNU automake) 1.14.1 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey@redhat.com> and Alexandre Duret-Lutz <adl@gnu.org>.
makeinfo
编译安装软件报错
makeinfo: command not found
makeinfo 命令不存在,执行以下命令安装
yum install texinfo
gcc
no acceptable C compiler found in $PATH
缺少 gcc 编译器,安装即可
yum install -y gcc
A compiler with support for C++11 language features is required
编译安装软件时报错
configure: error: *** A compiler with support for C++11 language features is required.