免密登录
- 客户端生成公钥、私钥
- 复制公钥到服务器
- 服务器生成
~/.ssh/authorized_keys
文件并粘贴客户端公钥
退出重新登录服务器测试
ssh-keygen
cat ~/.ssh/id_rsa.pub
ssh localhost vim ~/.ssh/authorized_keys
# 创建用户 busyhe sudo useradd busyhe # 修改密码 sudo passwd busyhe # 添加到 sudo 用户组 sudo usermod -aG wheel busyhe # 切换到新用户添加免密登录 su busyhe # 粘贴公钥 vim ~/.ssh/authorized_keys # 赋予权限 chmod 600 ~/.ssh/authorized_keys
sudo yum update && sudo yum -y install zsh zsh --version # install
sudo yum install neovim
# install nvm (没反应可以多试几次) wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash # install nodejs nvm install --lts # 查看node版本 node -v
sudo yum install git git --version
npm install -g pm2 # 初始化 pm2 pnpm init
npm install -g pnpm
sudo yum update && sudo yum -y install zsh zsh --version chsh -s $(which zsh)
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
# 高亮插件 zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting # 自动补全 zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions # 配置插件 vim ~/.zshrc # 找到 plugins = () 填入 plugins=(其他的插件 zsh-syntax-highlighting zsh-autosuggestions) # 使生效 . ~/.zshrc
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.