티스토리 뷰

카테고리 없음

CentOS - nodejs

파란크리스마스 2017. 12. 10. 10:34
728x90

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

node.js 설치 확인

# rpm -qa | grep nodejs
# node -v
-bash: node: command not found

node.js 설치

오류 확인

# 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

오류 해결

# 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 설치

# yum install -y nodejs

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

# yum install -y gcc-c++ make

node.js 설치확인

# node -v
v6.12.2
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함