CentOS
如何在 CentOS 8 下编译 istio 项目
· ☕ 3 分钟
本文主要描述在 CentOS 8.2 下,如何使用本地工具编译 https://github.com/istio/istio 项目。另外一种方法是通过 BUILD_WITH_CONTAINER 参数控制,使用容器编译,仅依赖于 make 和 docker。 1. 安装并升级 Ruby >= 2.6 安装 Ruby 1 yum install -y ruby 查看 Ruby 版本 1 2 3 ruby -v ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux] 安装 RVM 1 2 3 4 yum install -y tar gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB curl -sSL https://get.rvm.io | bash -s stable source /etc/profile.d/rvm.sh 安

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

如何在 CentOS 安装 GPU 驱动
· ☕ 3 分钟
以 CentOS 7.7,Tesla P100 GPU 为例。 1. 基础环境准备 安装 lspci 命令 1 yum install -y pciutils 检查 GPU 是否支持 CUDA 1 2 3 lspci | grep -i nvidia 00:09.0 3D controller: NVIDIA Corporation GP100GL [Tesla P100 PCIe 12GB] (rev a1) 支持 CUDA 的 GPU 列表:https://developer.nvidia.com/cuda-gpus 检查系统是否支持 CUDA 1 2 3 4