All Posts

  • Published on
    总结:文章介绍 golang 单例模式,属创建型模式,提供创建对象最佳方式,通过 sync.Once 保证线程安全,示例代码展示获取单例及打印地址,多个 goroutine 打印结果相同。
  • Published on
    CentOS7 的 debuginfo-install 步骤:先允许 debuginfo 源(改 /etc/yum.repos.d/CentOS-Debuginfo.repo 中 enabled 为 1),再安装 glibc-debuginfo 和 yum-utils,最后安装调式信息包及依赖(如 libgcc 等)。
  • Published on
    CentOS7 系统的 systemctl 服务介绍及示例。配置文件有[Unit]、[Service]、[Install]区块,分别用于定义元数据、服务配置和启动设置。给出两个服务配置示例及相关脚本,最后通过 systemctl daemon-reload 使其生效。
  • Published on
    CentOS7 优盘安装时出现“[sda] No Caching mode page found”,需耐心等待超时输出错误信息,找到 U 盘位置(如 sda4),修改安装选项第二行,将 inst.stage2 改为 hd:/dev/sda4:/,按 Ctrl+X 安装,安装后启动网络。
  • Published on
    CentOS6 is end-of-life with no more updates. Its online yum repos are archived. Options for running it include reinstalling with a newer version, converting to RHEL6, choosing a different distro. Doing nothing risks being hacked. Don't delay, migrate today.