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 ~]#  unrar x etc.rar                       //解压

安装cnpm

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

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM