首先安装zsh

yum install zsh

安装oh-my-zsh

由于github可能存在问题,所以本文使用gitee来进行安装。

1. 安装git

yum install git

2. 下载install.sh文件

wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh

3. 编辑install.sh文件,将以下内容进行替换

REPO=${REPO:-ohmyzsh/ohmyzsh}  --> REPO=${REPO:-mirrors/oh-my-zsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}  --> REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}

4. 给install.sh文件添加权限

chmod +x ./install.sh

5. 执行install.sh文件

sh ./install.sh

切换到zsh

chsh -s /bin/zsh

相关文章: