nodejs 源码安装

安装node.js

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

#!/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

猜你喜欢

转载自my.oschina.net/u/871354/blog/1610045
今日推荐