1、安装Xcode

https://developer.apple.com/xcode/

搜索官网下载并安装Xcode。

2、安装Homebrew

安装homebrew是为了便于安装后续需要的程序软件

a、进入主页https://brew.sh/index_zh-cn.html

b、复制homebrew主页的安装代码到终端中进行安装

c、在终端中输入brew -v 如果安装成功则会显示homebrew的版本信息

3、安装nodejs

a、在终端输入 brew install nodejs

b、安装成功后输入 node -v 查看版本信息

4、安装mongodb

a、在终端输入 brew install mongodb

b、安装成功后输入 mongo -version查看版本信息

5、安装redis

 a、在终端输入brew install redis

b、安装成功后输入 redis-cli -v查看版本信息

6、测试终端node.js

a、在终端输入 vi test.js

b、输入console.log('hello nodejs')

c、在终端输入 node test.js

终端会输出hello nodejs

 

相关文章:

  • 2021-08-05
  • 2021-05-16
  • 2021-07-20
  • 2021-07-22
  • 2021-04-02
  • 2021-06-05
  • 2021-04-18
  • 2021-08-16
猜你喜欢
  • 2021-12-27
  • 2021-11-30
  • 2022-01-10
  • 2021-09-24
  • 2021-12-22
  • 2021-12-22
  • 2021-12-22
相关资源
相似解决方案