install nodejs centos
来源:互联网 发布:铝合金门窗设计软件 编辑:程序博客网 时间:2024/06/02 02:00
sources : [原文档链接]
1 download nojs install package
link : https://nodejs.org/dist/v5.10.1/
2 according to system’s kernal to download the right version
3 config your system variables
the details as follows to see sources
(一) 编译好的文件
像上图中红色框里面的就是已经编译好的文件,选择好对应的linux版本下载即可,简单说就是解压后,在bin文件夹中已经存在node以及npm,如果你进入到对应文件的中执行命令行一点问题都没有,不过不是全局的,所以通过建立软链接的方式将这个设置为全局就好了。
tar xf node-v5.10.1-linux-x64.tar.gz -C /usr/local/
cd /usr/local/
mv node-v5.10.1-linux-x64/ nodejs
ln -s /usr/local/nodejs/bin/node /usr/local/bin
ln -s /usr/local/nodejs/bin/npm /usr/local/bin
(二)通过源码编译
这种方式你下载的文件是Source code,由于我的linux版本是6.x的,默认的gcc-c++为4.4.7 版本,而下过来之后源码编译要求gcc-c++版本最低为4.8,于是我就去升级GCC-C++版本,结果因为是源码编译升级GCC-C++,编译了一个多小时,都没有编译完成!果断被坑...
root># ./configure
WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CXX=g++)
creating ./icu_config.gypi
{ ‘target_defaults’: { ‘cflags’: [],
‘default_configuration’: ‘Release’,
‘defines’: [],
‘include_dirs’: [],
‘libraries’: []},
‘variables’: { ‘asan’: 0,
‘gas_version’: ‘2.20’,
‘host_arch’: ‘x64’,
‘icu_small’: ‘false’,
‘node_byteorder’: ‘little’,
‘node_install_npm’: ‘true’,
‘node_prefix’: ‘/usr/local’,
‘node_release_urlbase’: ”,
‘node_shared_http_parser’: ‘false’,
‘node_shared_libuv’: ‘false’,
‘node_shared_openssl’: ‘false’,
‘node_shared_zlib’: ‘false’,
‘node_tag’: ”,
‘node_use_dtrace’: ‘false’,
‘node_use_etw’: ‘false’,
‘node_use_lttng’: ‘false’,
‘node_use_openssl’: ‘true’,
‘node_use_perfctr’: ‘false’,
‘openssl_fips’: ”,
‘openssl_no_asm’: 0,
‘target_arch’: ‘x64’,
‘uv_parent_path’: ‘/deps/uv/’,
‘uv_use_dtrace’: ‘false’,
‘v8_enable_gdbjit’: 0,
‘v8_enable_i18n_support’: 0,
‘v8_no_strict_aliasing’: 1,
‘v8_optimized_debug’: 0,
‘v8_random_seed’: 0,
‘v8_use_snapshot’: ‘true’,
‘want_separate_host_toolset’: 0}}
creating ./config.gypi
creating ./config.mk
WARNING: warnings were emitted in the configure phase
(三)apt-get
还有一种就是乌班图下的apt-get方式,我之前就被这种方式坑了
sudo apt-get install nodejs
sudo apt-get install npm
这么装完你会发现,node命令不好使,nodejs命令可以用…
- install nodejs centos
- Centos 7.3 Install nodejs 6
- Centos 6.9 Install nodejs 6
- Install nodejs
- nodejs install
- Install nodejs and remove nodejs
- centos nodejs
- nodejs centos
- install centos
- install centos
- Centos Install
- install nodejs on ubuntu
- Install NodeJS on Ubuntu 12.10
- nodejs npm install 代理设置
- CentOS搭建NodeJS环境
- centos 安装nodejs
- CentOS 6.5安装NodeJS
- nodejs on centos
- Struts2中访问web元素的四种方式
- 《ACM程序设计》书中题目N-14
- 类与类之间的关系图(Class Diagram,UML图)
- 《spring 3 就这么简单》导入书中项目
- 【C++11】新特性——auto的使用
- install nodejs centos
- nio系列2
- Linux权限问题以及Stat命令中的Access、Modify、Change
- jeesite快速开发平台(一)---简介
- jQuery学习(一)
- ACM程序设计书上题目Y
- it行业焦虑症
- TensorFlow上实现Softmax回归模型
- HBase使用经验总结