前端开发第一次拿到mac要做的流程

1 篇文章 0 订阅

1.设置相关操作
2.访达新建相关文件夹
3.此事电脑还没有git,下载xcode,里面包含相关依赖和环境
4.命令窗口安装Oh My Zsh 操作步骤
5.安装nvm
执行下面操作

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

安装说明:电脑没有安装node,如果安装需要卸载。如果安装失败,多执行几次。
nvm安装成功开始安装需要的node
nvm install v12.2.0
nvm install v16.13.0

切换node版本
nvm use 12
nvm use 16

参考手册:

6.Mac 通过终端CD命令快速定位到指定文件夹
a、打开终端
b、输入cd
c、将想要到达的文件夹拖进终端,点击回车,就到了指定的文件夹了

7.MAC 生成SSH Key
a,创建公钥,打开终端输入命令行

ssh-keygen -t rsa -C "xxx@xxx.com"

b.之后会让你输入保存路径,密码之类的 直接一路Enter,如下图,会自动给个默认路径
在这里插入图片描述

c.之后打开公钥

cat ~/.ssh/id_rsa.pub

会得到如下图的一段编码
在这里插入图片描述

d.然后将上图编码放进网站添加公钥的地方即可

8.下载brew
命令终端输入:

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

brew在本地保存了很多常用软件的地址
可以通过
brew search 软件名(qq)查询软件
通过
brew install 软件名安装
为了防止某些软件下载失败,可以配置镜像地址:
前提:电脑已经下载了git xcode
接着,在终端输入以下几行命令设置环境变量:

export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"

替换现有仓库上游
终端执行命令:

export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
brew update

最后终端执行:

export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
brew tap --custom-remote --force-auto-update homebrew/cask-fonts https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
brew tap --custom-remote --force-auto-update homebrew/cask-drivers https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-drivers.git
brew tap --custom-remote --force-auto-update homebrew/cask-versions https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-versions.git
brew tap --custom-remote --force-auto-update homebrew/command-not-found https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git
brew update

至此大功告成!你可以愉快地通过brew命令安装软件了,安装方法类似npm命令

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值