编辑
2026-04-23
个人使用
00

该文章已加密,点击 阅读全文 并输入密码后方可查看。

编辑
2026-03-03
CICD知识
00

Jenkins流水线完全指南:从入门到实践

在当今快速迭代的软件开发环境中,持续集成和持续部署(CI/CD)已成为团队协作的标配。Jenkins作为最流行的开源自动化服务器,其流水线(Pipeline)功能提供了强大的自动化能力。本文将带你从零开始,全面掌握Jenkins流水线的使用。

什么是Jenkins流水线?

Jenkins流水线是一套插件,支持将整个交付流程建模为代码。与传统的自由风格项目相比,流水线提供了以下优势:

  • 代码化配置:将构建流程定义为代码,便于版本控制和代码审查
  • 可重复性:确保每次构建环境一致
  • 可视化:Blue Ocean插件提供直观的流水线可视化
  • 灵活性:支持复杂的构建流程和并行执行
编辑
2026-01-22
服务器操作命令
00

Linux 服务开机自启配置文档

1. 概述

本文档介绍在 Linux 系统中配置服务开机自启的多种方法,特别针对 CentOS/RHEL 系统。系统支持传统的 SysV init 脚本和现代的 systemd 两种服务管理方式。

2. 服务管理方式对比

特性 SysV init(传统) systemd(现代) 配置文件位置 /etc/init.d/ /etc/systemd/system/ 启动脚本格式 Shell 脚本 .service 单元文件 运行级别 0-6 target(目标) 依赖管理 简单顺序控制 复杂的依赖关系 日志管理 自定义输出 journalctl 统一管理 推荐使用 老系统兼容 新系统(CentOS 7+)
编辑
2026-01-04
部署文档
00

OpenVPN Site-to-Site VPN 部署手册

一、项目概述

1.1 网络架构

个人电脑/员工电脑 (外网) ↓ OpenVPN客户端 阿里云VPN服务器 (公网: x.x.x.x, 内网: 192.168.21.159) ↓ OpenVPN隧道 公司内网服务器 (物理IP: 192.168.7.10, VPN IP: 10.8.0.10)
编辑
2025-12-29
问题解决文档
00

CentOS 7 YUM 源配置修复文档

问题现象

CentOS 7 系统使用 yum 安装软件时出现错误:

[root@test conf.d]# yum makecache 已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Determining fastest mirrors One of the configured repositories failed (未知), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: centos-sclo-sclo

解决方案

步骤1:清理现有仓库配置

进入仓库配置目录

cd /etc/yum.repos.d

备份所有现有仓库文件

mkdir -p backup_all

移动所有 .repo 文件到备份目录

mv *.repo backup_all/

验证备份结果

ls -la backup_all/

步骤2:下载阿里云镜像源