压测:快速设置所有压测机的vim环境
一、需求:
压测环境需要更好的使用vim编辑器
二、配置:
#!/bin/bash
ips=('10.10.0.1' '10.10.0.2' '10.10.0.3')
for addr in "${ips[@]}"
do
ssh root@"$addr" "yum install git -y; mkdir ~/.vim; mkdir ~/.vim/bundle; mkdir ~/.vim/colors"
ssh root@"$addr" "cd ~/.vim/bundle; git clone https://github.com/altercation/vim-colors-solarized.git"
ssh root@"$addr" "mkdir ~/.vim/colors; cp ~/.vim/bundle/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/"
ssh root@"$addr" "echo -e 'set nu\nsyntax enable\nset background=dark\ncolorscheme solarized' > ~/.vimrc"
done
echo "Setup vim in total: ${#ips[*]}"