Centos7部署node
2024-08-26 12:08:06
近期在配置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
最新文章
- 通过js获得html标签的值
- hdoj 1272 小希的迷宫
- WinForm对话框
- linux GD库安装
- Doing well in your courses ---- a guide by Andrej Karpathy
- c# 调用MD5CryptoServiceProvider出现 System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
- hadoop2.2编程:Tool, ToolRunner, GenericOptionsParser, Configuration
- ab的排列 aa , ab ba,bb
- int, NSInteger, NSUInteger, NSNumber的区别
- Apache调优
- ASP.NET MVC 学习之路-6
- DOM操作-遍历一个元素的所有属性
- sqlserver使用job删除过期备份文件
- ubuntu 下查看caj文件
- iOS中 陀螺仪/加速器 韩俊强的博客
- java线程学习之Sleep方法
- 2018/05/02 PHP 之错误与异常处理
- day25scala
- struts2 错误:Dispatcher initialization failed java.lang.RuntimeException
- 查看sedna创建的数据库和集合,文档之类
热门文章
- FCS省选模拟赛 Day4
- (持续更新)vs2012,2013,2015,2017,2019 常用的插件 与 开发中常用的工具
- Tkinter 之ProgressBar进度条标签
- video标签在浏览器不能使用的问题 ?
- 初识kubernetes
- 关于解决'\u'开头的字符串转中文的方法
- NPVariant -js传递给NPAPI插件参数在firefox和chrome需要采用不同的获取方式
- MQTT(一)C#使用 MQTTnet 快速实现 MQTT 通信(文末有完整Demo下载)
- http://stblog.baidu-tech.com/?p=1684) coredump调试记录 - PHP篇 原创: 扶墙 贝壳产品技术 今天
- Windows 10 Tensorflow 2 gpu正式版安装和更新日志