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
相關文章
相關標籤/搜索