nodejs 源码安装

安装node.js

简版node.js能够直接保存成shell脚本执行安装node

#!/bin/bash

yum -y install gcc.x86_64 automake autoconf libtool.x86_64 gcc-c++.x86_64
wget https://nodejs.org/dist/v8.9.4/node-v8.9.4.tar.gz
tar -zxf node-v8.9.4.tar.gz
cd node-v8.9.4
./configure
make
make install

 

设置淘宝镜像

  1. 合同工设置
    npm config set registry https://registry.npm.taobao.org

     

  2. 临时工设置
    npm --registry https://registry.npm.taobao.org install express
  3. 查看设置结果
    npm config get registry
相关文章
相关标签/搜索