当前位置:首页>记录>Linux CentOS 7 配置 node.js 可使用 npm

Linux CentOS 7 配置 node.js 可使用 npm

2017-04-14 2442 记录
安装环境: 阿里云 Linux CentOS 7 线上服务器  

1、防止意外,升级走一遍

  1. yum -y update
完成图:  

2、安装 Node.js

  1. yum install -y nodejs
完成图:  

3、安装 npm

  1. yum install -y nodejs npm
完成图:   4、测试版本 node -v OK ,npm -v OK 。  

如果 npm 安装慢,建议修改挂载为国内淘宝镜像

如下:
  1. npm install -g cnpm --registry=https://registry.npm.taobao.org
完成图:   完毕! 参考: https://my.oschina.net/blogshi/blog/260953 http://yijiebuyi.com/blog/4fcce2f8b1aed8389f34c27f22864a04.html http://jingyan.baidu.com/article/dca1fa6f48f478f1a5405272.html http://www.cnblogs.com/xiashan17/p/5910618.html https://npm.taobao.org/ http://www.tuicool.com/articles/BfAFZni    

评论 (0)