您的位置:首页 > 运维架构 > Linux

CentOS 源码安装 node.js

2016-12-22 21:26 447 查看
安装依赖包

# yum -y install gcc gcc-c++ openssl-devel


下载官方最新稳定源码

从官方获取最新稳定版的源码链接:

https://nodejs.org/en/download/



现在最新稳定版是 6.9.2

下载链接:https://nodejs.org/dist/v6.9.2/node-v6.9.2.tar.gz

下载、解压、安装

# wget https://nodejs.org/dist/v6.9.2/node-v6.9.2.tar.gz # tar -zxvf node-v6.9.2.tar.gz
# cd node-v6.9.2.tar.gz
# ./configure
# make && make install


等待安装完成

使用淘宝的 npm 镜像

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


原文链接:http://www.fullstack.pub/doc/6
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  node.js centos 源码