一、安装Node环境
1.1 安装环境
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
1.2 官网下载下载Node.js
nodejs官网:https://nodejs.org/en/download/
,下载该版本
1.3 安装
wget https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xz
tar -xvf node-v12.18.3-linux-x64.tar.xz
mv node-v12.18.3-linux-x64 /opt/node-12
配置环境变量
vim ~/.bashrc
# 追加以下内容
#node
export NODE_HOME=/opt/node-12
export PATH=$NODE_HOME/bin:$PATH
# 刷新
source ~/.bashrc
查看是否出现版本
[root@localhost ~]# node -v
v12.18.3
[root@localhost ~]# npm -v
6.14.6
二、安装newman
npm install -g newman --registry https://registry.npm.taobao.org/
提示
npm WARN deprecated circular-json@0.5.5: CircularJSON is in maintenance only, flatted is its successor.
/opt/node-12/bin/newman -> /opt/node-12/lib/node_modules/newman/bin/newman.js
+ newman@5.1.2
added 164 packages from 192 contributors in 13.999s
查看版本
[root@localhost ~]# newman -v
5.1.2