728x90

출처 : n 을 이용한 nodejs 설치 및 관리 CentOs yum install ... - Blue Breeze
linuxism :: node.js - CentOS에서 설치(install in linux)

node.js 설치 확인

X
user@localhost:~

[root@localhost]# rpm -qa | grep nodejs
[root@localhost]# node -v
-bash: node: command not found

node.js 설치

오류 확인

X
user@localhost:~

[root@localhost]# yum install nodejs
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.kaist.ac.kr
 * extras: ftp.kaist.ac.kr
 * updates: ftp.kaist.ac.kr
base                                                                                                  | 3.7 kB     00:00     
extras                                                                                                | 3.4 kB     00:00     
updates                                                                                               | 3.4 kB     00:00     
No package nodejs available.
Error: Nothing to do

오류 해결

X
user@localhost:~

[root@localhost]# curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
# Installing the NodeSource Node.js 6.x repo...
 
... 생략 ...
 
# Run `yum install -y nodejs` (as root) to install Node.js 6.x and npm.
# You may also need development tools to build native addons:
# `yum install -y gcc-c++ make`

node.js 설치

X
user@localhost:~

[root@localhost]# yum install -y nodejs

node.js 라이브러리 컴파일용 g++설치 (옵션)

X
user@localhost:~

[root@localhost]# yum install -y gcc-c++ make

node.js 설치확인

X
user@localhost:~

[root@localhost]# node -v
v6.12.2

728x90

+ Recent posts