Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
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 31
Tags
more
Archives
Today
Total
관리 메뉴

진입장벽 낮추기 (WEB)

[Nodejs] Node.js 설치 (윈도우 / 리눅스) 본문

Back-end/Nodejs

[Nodejs] Node.js 설치 (윈도우 / 리눅스)

webberrypjh 2022. 5. 25. 20:44

1. 윈도우

① Nodejs 사이트 접속

https://nodejs.org/ko/

 

위의 Nodejs 공식 사이트를 방문하여

위 사진처럼 Nodejs 의 LTS 버전을 다운 받거나

프로젝트에 맞는 버전을 선택하여 다운 받습니다.

 

 Nodejs 설치하기

 

③ 버전 확인

>node -v
>npm -v

 

 


2. 리눅스

① apt-get 업데이트

$ sudo apt-get update

 

② build-essential  설치하기

$ sudo apt-get install -y build-essential

 

build-essential 이 설치되어 있어야 다양한 C나 파이썬이 미리 설치되어

node 설치전에 native library 기반의 모듈들도 원활하게 돌릴 수 있으므로 설치해줍니다.

 

③ Github 저장소를 이용, Nodejs 설치

 

 

노드 깃 허브 저장소 (https://github.com/nodesource/distributions) 로 들어가

README.md 의 Installation instructions 를 보면서 설치해보겠습니다.

 

$ sudo apt-get install curl

 

먼저, curl 를 사용하여 설치하므로

curl 을 설치합니다.

 

$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
$ sudo apt-get install -y nodejs

 

프로젝트에 맞는 버전을 찾아

깃 허브 저장소에 적혀있는 방법 순서대로 설치합니다.

 

④ 버전 확인

$ node -v
$ npm -v

 

 

 

 

 

참고 자료 - Node.js 교과서 [개정 2판] - 조현영 지음 [길벗]

http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791165212308&orderClick=LEA&Kc= 

Comments