环境
Conda 安装与使用
· ☕ 2 分钟
1. 安装 conda 1 2 3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh rm -rf Miniconda3-latest-Linux-x86_64.sh 但 Miniconda 不能免费大规模商用,可以使用 Miniforge 平替。 1 2 wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" bash Miniforge3-$(uname)-$(uname -m).sh 2. 修改默认配置 2.1 初始化 Shell 如果不进行初始化,激活环境时会报错 CondaError: Run 'conda init' before 'conda activate' 。 1 2 3 4 5 6 7 8 9 conda init --help usage: conda init [-h] [--all] [--user] [--no-user] [--system] [--reverse] [--json] [-v] [-q] [-d] [SHELLS ...] Initialize conda for shell interaction. positional arguments: SHELLS One or more shells to be

多环境下的应用运行时定义
· ☕ 3 分钟
1. 为什么需要定义应用运行时 运行时更多选择。传统的应用运行时有,物理机、虚拟机、云主机。容器时代,常见的运行时有 Docker、Kubernetes。这些运行时,提供给我们的不再是一个单一的运行时选择。 应用拓扑更复杂。如果由 CMDB 统一存储应用的拓扑

CentOS 7 下安装并配置 Zsh
· ☕ 1 分钟
1. 安装 zsh 1 sudo yum install -y zsh 2. 安装 oh-my-zsh 1 sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 建议将 Zsh 设置为默认的 Shell。 3. 安装插件 3.1 安装 autojump 1 sudo yum install -y epel-release 1 sudo yum install -y autojump-zsh 3.2 安装 zsh-autosuggestions 1 git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions 3.3 安装 zsh-syntax-highlighting 1 git clone git://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting 4. 添加 .zshrc 配置 1 sed -i 's/^plugins=(\(.*\)/plugins=(autojump zsh-autosuggestions zsh-syntax-highlighting \1/' ~/.zshrc 退出 Terminal, 再次登录即可。

CentOS 7 下安装并配置 Homebrew
· ☕ 2 分钟
在 CentOS 下安装包时,通常需要寻找各种源,使用 Homebrew 就没这样的烦恼。本文使用的是 CentOS 7.6,不同的系统版本可能会有差异。 1. 创建非 root 用户 Homebrew 不允许以 root 身份运行,因此需要创建一个新的用户。 新建用户 1 adduser shaowenchen 设置密码 1 passwd shaowenchen 给新用户添加 sudo 权限 编辑权限配置文件: 1 2 chmod

CentOS 7 安装 Java 开发环境
· ☕ 1 分钟
1. 编译报错:java.nio.file.NoSuchFileException 在编译 Jenkins 插件时,提示错误信息如下: 1 2 3 4 mvn package Compilation failure [ERROR] java.nio.file.NoSuchFileException: /root/java/target/classes/META-INF/annotations/hudson.Extension 原来 Maven 使用的是 JAVA_HOME 而不是 PATH,找不到 Java 运行环境导致,而且 Java 11 不行,Java 1.8 才能正常编译。 2. 安装 JDK 安装 Java