添加文档
修改主题配置
This commit is contained in:
70
source/_posts/linux/nodejs安装.md
Normal file
70
source/_posts/linux/nodejs安装.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: nodejs安装
|
||||
date: 2021-11-21
|
||||
updated: 2021-11-21
|
||||
tags:
|
||||
- nodejs
|
||||
- linux
|
||||
categories: nodejs
|
||||
keywords:
|
||||
- nodejs
|
||||
- linux
|
||||
description: nodejs安装
|
||||
top_img: https://i.loli.net/2021/11/20/aHCxPjiyETeSV7O.jpg
|
||||
comments: true
|
||||
cover: https://i.loli.net/2021/11/20/aHCxPjiyETeSV7O.jpg
|
||||
copyright: true
|
||||
copyright_author: xzh
|
||||
copyright_author_href: http://xxzhx.cn
|
||||
copyright_url: http://xxzhx.cn
|
||||
copyright_info: 著作权归作者所有。商业转载请联络作者获得授权,非商业转载请注明出处。
|
||||
---
|
||||
|
||||
# nodejs安装
|
||||
|
||||
## 下载nodejs包
|
||||
|
||||
[下载地址](https://npm.taobao.org/mirrors/node/v16.13.0/)
|
||||
|
||||

|
||||
|
||||
## 把nodejs包上传至服务器并解压
|
||||
|
||||

|
||||
|
||||
### 解压
|
||||
|
||||
```shell
|
||||
tar -zxvf node-v16.13.0-linux-x64.tar.gz
|
||||
```
|
||||
|
||||
#### 移动位置
|
||||
|
||||
```shell
|
||||
mv node-v16.13.0-linux-x64/ /usr/local/node-v16.13.0
|
||||
```
|
||||
|
||||
## 配置环境变量
|
||||
|
||||
```shell
|
||||
vim /etc/profile
|
||||
```
|
||||
|
||||
### 在末尾加入配置
|
||||
|
||||
```js
|
||||
# node环境变量
|
||||
export NODE_HOME=/usr/local/node-v16.13.0
|
||||
export PATH=$PATH:$NODE_HOME/bin
|
||||
```
|
||||
|
||||
### 刷新配置
|
||||
|
||||
```shell
|
||||
source /etc/profile
|
||||
```
|
||||
|
||||
## 验证是否成功
|
||||
|
||||

|
||||
|
||||
Reference in New Issue
Block a user