GaGa's Blog

One GaGa, One World !

一句话总结

函数 能做什么 返回值
eval() 求值单个表达式 表达式的计算结果
exec() 执行任意语句块 None
compile() 将源码编译为字节码对象 字节码对象(code object)

1. eval() — 表达式求值

Read more »

1. CentOS 8

  • 默认内核:4.18.x
  • 示例:4.18.0-305.el8.x86_64
  • 支持 5.x 系列需要安装 ELRepo 的 kernel-ml 或通过 AppStream 升级。
  • 说明:CentOS 8 原生采用 RHEL 8 的 4.18 内核。

2. CentOS Stream 9 / RHEL 9

  • 默认内核:5.14.x
  • 示例:5.14.0-162.el9.x86_64
  • 说明:RHEL9 内核从 5.x 系列开始,CentOS Stream 9 保持跟进。
Read more »

1. 构建(Build)

构建通常指把源代码、依赖和配置整合成可部署的产物(Artifact),可分几个层次:

  • 源码管理层:Git、SVN 等管理版本。

  • 构建工具层:

    • Java:Maven、Gradle
    • Python:setuptools、Poetry
    • Golang:Go Modules
  • CI/CD 层:

    • Jenkins、GitLab CI、GitHub Actions、ArgoCD
    • 负责自动化编译、单元测试、打包、镜像构建等
  • 容器化:

    • Docker、Podman,把构建产物封装为容器镜像
    • 镜像仓库管理:Harbor、Docker Hub、AWS ECR
  • 产物管理:

    • Maven Repo、PyPI、npm、内部制品库
    • 保证构建可重复、版本可追溯

注意点:

Read more »

Elasticsearch 从 7.x 开始提供 API Key 认证机制,用于替代 Basic Auth / Token,适用于服务间调用(尤其是 Agent / 微服务 / 自动化场景)。


1. 前置条件

1.1开启安全功能

Read more »

1. 创建 Kibana Token

1
2
3
curl -X POST "http://localhost:9200/_security/service/elastic/kibana/credential/token/kibana" \
-u elastic:321.321 \
-H "Content-Type: application/json"

也可以写成:

1
2
curl -X POST "http://localhost:9200/_security/service/elastic/kibana/credential/token/kibana?pretty" \
-u elastic:321.321
Read more »
0%