linux 安装npm

安装

首先进到你想要安装的目录
比如 mkdir /devTools
wget https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-x64.tar.xz

解压

tar -xf node-v10.15.0-linux-x64.tar.xz

设置一下环境变量

1、打开文件
vim /etc/profile
或者nano /etc/profile
2、最后一行放入
PATH=$PATH:/software/node-v10.15.0-linux-x64/bin

刷新配置文件:source /etc/profile

安装解压缩工具

1.下载软件包

[root@nn01 ~]# wget   https://www.rarlab.com/rar/rarlinux-x64-5.6.0.tar.gz

2.解压

[root@nn01 ~]#tar  zxvf  rarlinux-x64-5.6.0.tar.gz

3.安装

[root@nn01 ~]#cd rar

[root@nn01 ~  rar ]# make

4.下面就可以解压和压缩了

[root@nn01 ~]#  rar  a etc.rar /etc/                  //压缩

[root@nn01 ~]#  rar x etc.rar                       //解压

安装cnpm

有时候npm很慢,需要用cnpm安装

$ npm install -g cnpm --registry=https://registry.npm.taobao.org  

猜你喜欢

转载自www.cnblogs.com/whiplasher/p/12602291.html
今日推荐