近期在配置jenkins自动化部署前端项目时,需要使用到npm对前端项目进行构建打包,故这里单独介绍下node的部署。

项目地址:https://nodejs.org/en/download/

1、下载解压

[tchua@centos01 tools]$ wget https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz
[tchua@centos01 tools]$ sudo tar -xf node-v10.15.3-linux-x64.tar.xz -C /usr/local/
[tchua@centos01 tools]$ sudo mv /usr/local/node-v10.15.3-linux-x64 /usr/local/node10.15
## 建立软连接
[tchua@centos01 tools]$ sudo ln -s /usr/local/node10./bin/node /usr/bin/node
[tchua@centos01 tools]$ sudo ln -s /usr/local/node10./bin/npm /usr/bin/npm

2、配置环境变量

[tchua@centos01 tools]$ sudo vim /etc/profile
# set node
export NODE_HOME=/usr/local/node10.
export PATH=$NODE_HOME/bin:$PATH
[tchua@centos01 tools]$ source /etc/profile
## 查看版本
[tchua@centos01 tools]$ node -v
v10.15.3
[tchua@centos01 tools]$ npm -v
6.4.1

最新文章

  1. 通过js获得html标签的值
  2. hdoj 1272 小希的迷宫
  3. WinForm对话框
  4. linux GD库安装
  5. Doing well in your courses ---- a guide by Andrej Karpathy
  6. c# 调用MD5CryptoServiceProvider出现 System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
  7. hadoop2.2编程:Tool, ToolRunner, GenericOptionsParser, Configuration
  8. ab的排列 aa , ab ba,bb
  9. int, NSInteger, NSUInteger, NSNumber的区别
  10. Apache调优
  11. ASP.NET MVC 学习之路-6
  12. DOM操作-遍历一个元素的所有属性
  13. sqlserver使用job删除过期备份文件
  14. ubuntu 下查看caj文件
  15. iOS中 陀螺仪/加速器 韩俊强的博客
  16. java线程学习之Sleep方法
  17. 2018/05/02 PHP 之错误与异常处理
  18. day25scala
  19. struts2 错误:Dispatcher initialization failed java.lang.RuntimeException
  20. 查看sedna创建的数据库和集合,文档之类

热门文章

  1. FCS省选模拟赛 Day4
  2. (持续更新)vs2012,2013,2015,2017,2019 常用的插件 与 开发中常用的工具
  3. Tkinter 之ProgressBar进度条标签
  4. video标签在浏览器不能使用的问题 ?
  5. 初识kubernetes
  6. 关于解决'\u'开头的字符串转中文的方法
  7. NPVariant -js传递给NPAPI插件参数在firefox和chrome需要采用不同的获取方式
  8. MQTT(一)C#使用 MQTTnet 快速实现 MQTT 通信(文末有完整Demo下载)
  9. http://stblog.baidu-tech.com/?p=1684) coredump调试记录 - PHP篇 原创: 扶墙 贝壳产品技术 今天
  10. Windows 10 Tensorflow 2 gpu正式版安装和更新日志