Install HomeBrew

1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install some software

1
2
3
4
5
6
7
8
9
10
11
12
curl -L https://get.rvm.io | bash -s stable
brew install nvm
brew install node
brew install python
brew install [email protected]
brew install mackup
brew install ansible
brew install cocoapods
brew install automake
brew install libtool
brew install protobuf
brew install maven

Install iTerm2

安装后快捷键 command + d 新增一个窗口。基于当前窗口路径打开新的窗口,一个配置记得修改 iTerm2 => Preferences => Profiles => Working Directory 选中☑️ Reuse previous session's directory

thems: https://github.com/mbadolato/iTerm2-Color-Schemes

Install [oh my zsh](https://ohmyz.sh/#install)

1
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

thems: https://github.com/ohmyzsh/ohmyzsh/wiki/themes

1
2
3
vim ~/.zshrc
// 修改主题
ZSH_THEME="主题名称"

plugins:

1
2
3
# 插件安装
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM=$HOME/.oh-my-zsh/custom

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)

source $ZSH/oh-my-zsh.sh

Q&A

brew doctor

1
2
3
4
5
6
7
8
9
10
11
12
13
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

解决:

删除这些文件,如果文件很多的话,可以吧文件路径保存在一个文件里面,然后执行命令删除
命令如下
cat headers.txt | xargs rm

卸载:
命令行执行
ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/uninstall](https://raw.githubusercontent.com/Homebrew/install/master/uninstall))"