File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 1.换源
2+
3+ 使用chsrc项目可以换各种系统源和软件源
4+
5+ https://github.com/RubyMetric/chsrc
6+
7+ ```
8+ curl -LO https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc_latest-1_amd64.deb
9+ sudo apt install ./chsrc_latest-1_amd64.deb
10+ ```
11+
12+
13+
14+
15+
16+ ## 2.安装homebrew
17+
18+ 可以用清华的homebrew源安装
19+
20+ https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
21+
22+ 在终端输入以下几行命令设置环境变量:
23+
24+ ```
25+ export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
26+ export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
27+ export HOMEBREW_INSTALL_FROM_API=1
28+ # export HOMEBREW_API_DOMAIN
29+ # export HOMEBREW_BOTTLE_DOMAIN
30+ # export HOMEBREW_PIP_INDEX_URL
31+ ```
32+
33+ 在终端运行以下命令以安装 Homebrew / Linuxbrew
34+
35+ ```
36+ # 从镜像下载安装脚本并安装 Homebrew / Linuxbrew
37+ git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
38+ /bin/bash brew-install/install.sh
39+ rm -rf brew-install
40+
41+ # 也可从 GitHub 获取官方安装脚本安装 Homebrew / Linuxbrew
42+ /bin/bash -c "$(curl -fsSL https://github.com/Homebrew/install/raw/master/install.sh)"
43+ ```
44+
45+ ## 3.node环境安装
46+
47+ 使用homebrew 安装fnm
48+
49+ ```
50+ brew install fnm
51+ # 安装后需要peizhishell
52+ # 在 ~/.bashrc中添加下面这行
53+ # eval "$(fnm env --use-on-cd --shell bash)"
54+ # 之后 source ~/.bashrc
55+ fnm install 22
56+ fnm use 22
57+
58+ ```
59+
You can’t perform that action at this time.
0 commit comments