文件操作
远程下载文件 wget https://cdn.npm.taobao.org/dist/node/v16.10.0/node-v16.10.0-linux-x64.tar.xz
解压文件(会生成文件夹)
tar -xf node-v16.10.0-linux-x64.tar.xz
profile文件
1、编辑 vim /etc/profile
2、即时生效:source /etc/profile
安装node及npm
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm install
npm run build
npm -v
//安装npm升级工具
npm install -g n
//安装最近的稳定版本
n stable
上传本地文件到服务器
scp /path/filename username@servername:/path