码迷,mamicode.com
首页 > 系统相关 > 详细

linux上安装newman

时间:2019-08-11 00:55:49      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:roo   etc   exec   检测   文件   div   game   com   rom   

 1. newman的安装依赖nodejs,首先安装node/npm

进入到 /usr/local目录
[root@ipha-dev71-1 local]# cd /usr/local [root@ipha-dev71-1 local]# pwd /usr/local [root@ipha-dev71-1 local]# wget https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz # 下载安装包 --2019-08-10 22:36:55-- https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz Resolving nodejs.org (nodejs.org)... 104.20.23.46, 104.20.22.46, 2606:4700:10::6814:172e, ... Connecting to nodejs.org (nodejs.org)|104.20.23.46|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 13043892 (12M) [application/x-xz] Saving to: ‘node-v10.16.2-linux-x64.tar.xz’ 100%[==============================================================================================================================>] 13,043,892 2.00MB/s in 8.4s 2019-08-10 22:37:09 (1.49 MB/s) - ‘node-v10.16.2-linux-x64.tar.xz’ saved [13043892/13043892] [root@ipha-dev71-1 local]# ll total 12740 drwxr-xr-x. 2 root root 6 Nov 5 2016 bin drwxr-xr-x. 2 root root 6 Nov 5 2016 etc drwxr-xr-x. 2 root root 6 Nov 5 2016 games drwxr-xr-x. 2 root root 6 Nov 5 2016 include drwxr-xr-x. 2 root root 6 Nov 5 2016 lib drwxr-xr-x. 2 root root 6 Nov 5 2016 lib64 drwxr-xr-x. 2 root root 6 Nov 5 2016 libexec -rw-r--r-- 1 root root 13043892 Aug 7 00:03 node-v10.16.2-linux-x64.tar.xz drwxr-xr-x 7 root root 100 Jan 25 2019 python3 drwxr-xr-x. 2 root root 6 Nov 5 2016 sbin drwxr-xr-x. 5 root root 49 Jan 22 2018 share drwxr-xr-x. 2 root root 6 Nov 5 2016 src
[root@ipha-dev71-1 local]# tar -xvf node-v10.16.2-linux-x64.tar.xz # 解压

  [root@ipha-dev71-1 local]# ll
  total 12740
  drwxr-xr-x. 2 root root 6 Nov 5 2016 bin
  drwxr-xr-x. 2 root root 6 Nov 5 2016 etc
  drwxr-xr-x. 2 root root 6 Nov 5 2016 games
  drwxr-xr-x. 2 root root 6 Nov 5 2016 include
  drwxr-xr-x. 2 root root 6 Nov 5 2016 lib
  drwxr-xr-x. 2 root root 6 Nov 5 2016 lib64
  drwxr-xr-x. 2 root root 6 Nov 5 2016 libexec
  drwxrwxr-x 6 500 500 108 Aug 7 00:02 node-v10.16.2-linux-x64
  -rw-r--r-- 1 root root 13043892 Aug 7 00:03 node-v10.16.2-linux-x64.tar.xz
  drwxr-xr-x 7 root root 100 Jan 25 2019 python3
  drwxr-xr-x. 2 root root 6 Nov 5 2016 sbin
  drwxr-xr-x. 5 root root 49 Jan 22 2018 share
  drwxr-xr-x. 2 root root 6 Nov 5 2016 src

 [root@ipha-dev71-1 local]# mv node-v10.16.2-linux-x64 node  # 重命名为node

 [root@ipha-dev71-1 local]# vi /etc/profile  # 配置环境变量

  在文件末尾添加:

  export NODE_HOME=/usr/local/node
  export PATH=$NODE_HOME/bin:$PATH

  [root@ipha-dev71-1 local]# source /etc/profile   # 使环境变量生效

# 检测node和npm是否安装成功

  [root@ipha-dev71-1 local]# node -v
  v10.16.2
  [root@ipha-dev71-1 local]# npm -v
  6.9.0

2.安装newman

[root@ipha-dev71-1 local]# npm install -g newman
/usr/local/node/bin/newman -> /usr/local/node/lib/node_modules/newman/bin/newman.js
+ newman@4.5.3
added 154 packages from 195 contributors in 108.393s
[root@ipha-dev71-1 local]# newman -v    # 检测Newman是否安装成功
4.5.3

 

参考:https://www.cnblogs.com/HYanqing/p/11137146.html

linux上安装newman

标签:roo   etc   exec   检测   文件   div   game   com   rom   

原文地址:https://www.cnblogs.com/wang-mengmeng/p/11333387.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!