yum install -y zsh
chsh -s /bin/zsh
yum install -y git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
通过以上两步 root 用户可以使用 oh-my-zsh
在 root 装好 oh-my-zsh 后
su - root
useradd test
passwd test
cp -r ~/.oh-my-zsh/ /home/test/
cp ~/.zshrc /home/test/
cd /home/test/
chown -R test:test .oh-my-zsh
chown test:test .zshrc
su - test
chsh -s /bin/zsh
vi ~/.zshrc
export ZSH="/home/test/.oh-my-zsh" # 修改此项
. ~/.zshrc