How Linux installs node. JS----Source code compilation

Source: Internet
Author: User
Tags install node automake

One: Ordinary users:

Pre-Installation Preparation environment:

  1. Check the Linux version
Command: Cat/etc/redhat-release

  2, check whether GCC, gcc-c++ installed
Command: rpm-q gcc rpm-q gcc-c++

  3. Installation of GCC, gcc-c++
Command: yum-y install gcc gcc-c++ kernel-devel

  

Note: If it is the first installation, an error may be reported: XXX is not in the sudoers file. This incident'll be reported,xxx is your current user name

FIX: I'm here to steal a lazy, you can yourself Baidu: Linux under is isn't in the sudoers file

  Links: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html

  4. Check Python version
Command: python-v (uppercase)

  

Support the required version of node:

Linux XX 6.3

GCC 4.2+ 4.4.7

Gcc-c++ 4.2+ 4.4.7

Python 2.6 or 2.7 (3.0X) 2.6

RPM 4.8.0

GNU make 3.81+

  5. Install node: source code Compilation method
Copy: https://nodejs.org/dist/v0.10.34/node-v0.10.34.tar.gz
Find a directory: CD/USR/SRC
Command: Suod wget https://nodejs.org/dist/v0.10.34/node-v0.10.34.tar.gz--no-check-certificate

Note: Administrator privileges are required and a third red box is a success story

6, download finished (decompression):
Command: sudo tar-xf node-v0.10.34.tar.gz

7. LS View files, folders
Command: LS

8. Enter the installation package
Command: CD node-v0.10.34

  

9. Configuration
Command: sudo./configure

  

10. Make command execution
Command: Make
Tip: Bash:make:command not found
The general appearance of this-bash:make:command not found hint, is because the installation system is used to minimize the mini installation, the system does not install make, vim and other commonly used commands, direct yum installation can be;

installation command: sudo yum-y install gcc automake autoconf libtool make

11, install the sudo make install, installation node JS:
Command: sudo make install
12, Installation Finished: Detection version: Node-v, npm-v

  

II: Under Administrator root:

Pit less, most commands do not need to add sudo, because already in root identity

Still check

  1. Check the Linux version  
Command: Cat/etc/redhat-release

  2, check whether GCC, gcc-c++ installed
Command: rpm-q gcc rpm-q gcc-c++

  3. Installation of GCC, gcc-c++
Command: yum-y install gcc gcc-c++ kernel-devel

  4. Check Python version
Command: Python-v

Note The Linux system is case-sensitive python-v (X), python-v (\)

Version:

Linux XX 6.3

GCC 4.2+ 4.4.7

Gcc-c++ 4.2+ 4.4.7

Python 2.6 or 2.7 (3.0X) 2.6

RPM 4.8.0

GNU make 3.81+

  5. Install node: source code Compilation method
Copy: https://nodejs.org/dist/v0.10.34/node-v0.10.34.tar.gz
Find a directory: CD/USR/SRC
Command: wget https://nodejs.org/dist/v0.10.34/node-v0.10.34.tar.gz

  

  6, Download finished:
Command: TAR-XF node-v0.10.34.tar.gz

  7, LS
Command: LS

  8. Enter the installation package
Command: CD node-v0.10.34

  9. Configuration
Command:./configure

  

  10. Make command execution
Command: Make
Bash:make:command not found
The general appearance of this-bash:make:command not found hint, is because the installation system is used to minimize the mini installation, the system does not install make, vim and other commonly used commands, direct yum installation can be;

Command: yum-y install gcc automake autoconf libtool make

  11. Installing sudo make install
Command: sudo make install
12, installation finished : Detection version: Node-v, npm-v

  

How Linux installs node. JS----Source code compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.