우분투(Ubuntu)에 Node.js 설치 방법에 대해 간단하게 알아 보자.
1. 기존 odejs 삭제
혹시나 기존에 apt-get으로 설치되어 있는 node.js가 있다면 삭제 하도록 한다. apt-get은 패키지를 관리하는 툴이다.
(이 내용은 해당 없으면 그냥 넘어 가도 된다.)
위와 같이 커맨드를 입력하면 기존에 설치된 node가 삭제된다.
2. apt-get 업데이트
apt-get을 업데이트해서 정보를 갱신하도록 한다.

[그림 1 - apt-get 정보 갱신 커맨드]

[그림 2 - apt-get 패키지 정보 갱신화면]
위 [그림 1]과 같이 커맨드를 입력하면, [그림 2]와 같이 정보를 새로 갱신 할 것이다.
3. Python Software Properties 설치
Python Software Properties를 이용해서 apt-get으로 관리하는 패키지를 추가할 것이기 때문에 Python Software Properties를 설치하도록 한다.
sudo apt-get install python-software-properties python g++ make |

[그림 3 - Python Software Properties 설치 커맨드]

[그림 4 - Python Software Properties 설치 진행화면]
[그림 3]과 같이 커맨드를 입력하면, [그림 4]와 같이 설치 진행화면이 나타날 것이다.
4. apt-get Property에 node.js 추가
apt-get이 사용할 Property에 새로운 node.js를 추가 하도록 한다.
sudo add-apt-repository ppa:chris-lea/node.js |

[그림 5 - node.js 추가 커맨드]

[그림 6 - node.js 추가 진행화면1]
[그림 5]와 같이 커맨드를 입력하면, [그림 6]과 같이 물어 볼 것이다. 여기에서 "엔터"를 누르고 계속 진행하도록 한다.

[그림 7 - node.js 추가 진행화면2]
5. apt-get을 업데이트.
apt-get이 사용하는 리파지토리(Repository)에 node.js를 추가 했기때문에 정보를 다시 갱신하다록 한다.

[그림 8 - apt-get 정보 갱신 커맨드]

[그림 9 - apt-get 패키지 정보 갱신화면]
apt-get에 node.js를 추가했다고 해서 설치가 끝난 것이 아니다. 여기서는 그냥 추가만 했을 뿐이다. 아래와 같이 node 버전을 확인해 보면 알수 있을 것이다.

[그림 10 - node 버전 확인 커맨드]

[그림 11 - node 버전 확인 화면]
[그림 10]과 같이 커맨드를 입력하며, node.js의 버전 정보는 안나오고 [그림 11]과 같은 화면이 나타날 것이다. 그럼 아래와 같은 커맨드를 다시 입력해 보자.

[그림 12 - nodejs 버전 확인 커맨드]

[그림 13 - nodejs 버전 확인 화면]
[그림 12]와 같이 커맨드를 입력하면, [그림 13]과 같이 nodejs가 설치가 되지 않았음을 명확하게 알수 있다. 그럼 친절하게 안내해준 설치 방법대로 설치를 진행해 보자.
6. node.js 설치
안내 나온 메세지대로 node.js를 설치하자.
sudo apt-get install nodejs |

[그림 14 - nodejs 설치 커맨드]

[그림 15 - nodejs 설치 화면]
[그림 14]와 같이 커맨드를 입력하면, [그림 15]와 같이 설치 진행화면이 나타나며, 해당 설치에 필요한 공간에 대한 컴펌을 사용자에게 받는다. 여기서 Y(Yes)을 입력하고 설치를 계속 진행하면 된다.
설치가 완료 되었다면 node 버전을 다시 확인해 보도록 한다.

[그림 16 - node 버전 확인]
버전이 정상적으로 나타나면 설치가 완료 된 것이다.