MAC重置系统后各种软件安装

前一阵MBP的电池出现问题,重置了系统,于是有了下面这些。

基础类

git

打开git下载地址 下载git后安装即可,作为开发者,git应该是基础,brew对git也有依赖,我一开始就装上。

安装brew

brew 完全是为了安装各种软件方便。

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

安装oh my zsh

美化一下命令行,看着心情愉悦。

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

设置语法高亮 – zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

echo “source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh” >> ${ZDOTDIR:-$HOME}/.zshrc

source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

美化之后舒服多了。
zsh

命令行补全
https://mimosa-pudica.net/zsh-incremental.html

cd ~/.oh-my-zsh/plugins/
mkdir -p incr
cd incr

将上面链接下载的文件移动到incr文件夹中

echo "source ~/.oh-my-zsh/plugins/incr/incr*.zsh" >> ~/.zshrc
source ~/.zshrc

安装各种软件

brew 傻瓜式安装

有了brew 以后安装十分简单

brew install node
brew install yarn
brew install mysql@5.7
.......

yarn和npm建议替换国内源(开VPN就不需要了):

// yarn 🌰
yarn config set registry https://registry.npm.taobao.org
yarn config set sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
yarn config set phantomjs_cdnurl "http://cnpmjs.org/downloads"
yarn config set electron_mirror "https://npm.taobao.org/mirrors/electron/"
yarn config set sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
yarn config set profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
yarn config set chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"

官网安装

而像Redis 这类,经常需要改配置甚至是实验布置集群的,我还是习惯官网下载安装,便于操作配置、各种捣鼓。

http://download.Redis.io/releases/Redis-6.0.6.tar.gz

此外,docker、vscode、go 这类都可以前往官网下载,下面以 go 为例。

对于vscode、谷歌浏览器等提供了账号同步的,建议重置系统前设置同步,后续重新安装登录同步书签、配置、插件等,简直是太爽了。

安装 go

https://golang.google.cn/dl/

下载需要的版本即可。

简单配置:

// 使用 goproxy.cn 代理加速
go env -w GOPROXY=https://goproxy.cn
// 私有仓库
go env -w GOPRIVATE=git.puresai.cn
git config --global url."git@git.puresai.cn:".insteadOf https://git.puresai.cn

其他

其他软件可按需前往appstore或软件官网即可,建议官网下载更快。


MAC重置系统后各种软件安装
https://blog.puresai.com/2021/10/30/376/
作者
puresai
许可协议