"우분투16 node.js 설치"의 두 판 사이의 차이

 
(사용자 4명의 중간 판 36개는 보이지 않습니다)
1번째 줄: 1번째 줄:
 
{{다른뜻|CentOS node.js 설치}}
{{다른뜻|윈도우 node.js 설치}}
{{테스트|Ubuntu 14, 16}}
==개요==
;우분투 node.js 설치
* [[node.js]]와 [[npm]]이 함께 설치됨


==확인==
==확인==
<source lang='cli'>
* 우분투 14
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
root@zetawiki:~# node -v
The program 'node' can be found in the following packages:
The program 'node' can be found in the following packages:
  * node
  * node
  * nodejs
  * nodejs-legacy
Try: apt-get install <selected package>
Try: apt-get install <selected package>
</source>
</syntaxhighlight>
* 우분투 16
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
-bash: node: command not found
root@zetawiki:~# npm -v
-bash: npm: command not found
</syntaxhighlight>


==설치==
==설치==
<source lang='cli'>
* nodesource( node.js 최신버전 제공 )의 APT 저장소 추가
root@zetawiki:~# curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
<syntaxhighlight lang='console'>
root@zetawiki:~# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
 
## Installing the NodeSource Node.js v6.x repo...
 
 
## Populating apt-get cache...
 
+ apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]       
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]     
... (생략)
... (생략)
Fetched 6,553 B in 5s (1,268 B/s)
Get:7 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages [963 B]
Get:8 https://deb.nodesource.com/node_6.x xenial/main i386 Packages [959 B]
Fetched 109 kB in 1s (58.2 kB/s)                                
Reading package lists... Done
Reading package lists... Done


## Run `apt-get install nodejs` (as root) to install Node.js 4.x LTS Argon and npm
## Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
</source>
</syntaxhighlight>
<source lang='cli'>
* 설치
<syntaxhighlight lang='console'>
root@zetawiki:~# apt-get install nodejs
root@zetawiki:~# apt-get install nodejs
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Building dependency tree       
Reading state information... Done
Reading state information... Done
The following extra packages will be installed:
  rlwrap
The following NEW packages will be installed:
The following NEW packages will be installed:
   nodejs rlwrap
   nodejs
0 upgraded, 2 newly installed, 0 to remove and 71 not upgraded.
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.
Need to get 10.9 MB of archives.
Need to get 10.1 MB of archives.
After this operation, 36.5 MB of additional disk space will be used.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.10.3-1nodesource1~xenial1 [10.1 MB]
</source>
Fetched 10.1 MB in 0s (12.1 MB/s)
<source lang='cli'>
Selecting previously unselected package nodejs.
... (생략)
(Reading database ... 103333 files and directories currently installed.)
Processing triggers for man-db ...
Preparing to unpack .../nodejs_6.10.3-1nodesource1~xenial1_amd64.deb ...
Setting up rlwrap (0.37-2) ...
Unpacking nodejs (6.10.3-1nodesource1~xenial1) ...
update-alternatives: using /usr/bin/rlwrap to provide /usr/bin/readline-editor (readline-editor) in auto mode.
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (4.2.3-1nodesource1~precise1) ...
Setting up nodejs (6.10.3-1nodesource1~xenial1) ...
</source>
</syntaxhighlight>


==확인 2==
==확인 2==
<source lang='cli'>
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
root@zetawiki:~# node -v
v4.2.3
v6.10.3
</source>
root@zetawiki:~# npm -v
3.10.10
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[우분투18 node.js 설치]]
*[[CentOS node.js 설치]]
*[[CentOS node.js 설치]]
*[[윈도우 node.js 설치]]
*[[node.js 버전 확인]]
*[[node.js 버전 확인]]
*[[node.js]]
*[[node.js]]
==참고==
*https://nodejs.org/en/download/package-manager/


[[분류: apt-get]]
[[분류: apt-get]]
[[분류: node.js]]
[[분류: node.js]]

2020년 11월 2일 (월) 00:58 기준 최신판

  다른 뜻에 대해서는 CentOS node.js 설치 문서를 참조하십시오.
  다른 뜻에 대해서는 윈도우 node.js 설치 문서를 참조하십시오.

1 개요[ | ]

우분투 node.js 설치

2 확인[ | ]

  • 우분투 14
root@zetawiki:~# node -v
The program 'node' can be found in the following packages:
 * node
 * nodejs-legacy
Try: apt-get install <selected package>
  • 우분투 16
root@zetawiki:~# node -v
-bash: node: command not found
root@zetawiki:~# npm -v
-bash: npm: command not found

3 설치[ | ]

  • nodesource( node.js 최신버전 제공 )의 APT 저장소 추가
root@zetawiki:~# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

## Installing the NodeSource Node.js v6.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]        
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]      
... (생략)
Get:7 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages [963 B]
Get:8 https://deb.nodesource.com/node_6.x xenial/main i386 Packages [959 B]
Fetched 109 kB in 1s (58.2 kB/s)                                 
Reading package lists... Done

## Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
  • 설치
root@zetawiki:~# apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.10.3-1nodesource1~xenial1 [10.1 MB]
Fetched 10.1 MB in 0s (12.1 MB/s)
Selecting previously unselected package nodejs.
(Reading database ... 103333 files and directories currently installed.)
Preparing to unpack .../nodejs_6.10.3-1nodesource1~xenial1_amd64.deb ...
Unpacking nodejs (6.10.3-1nodesource1~xenial1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (6.10.3-1nodesource1~xenial1) ...

4 확인 2[ | ]

root@zetawiki:~# node -v
v6.10.3
root@zetawiki:~# npm -v
3.10.10

5 같이 보기[ | ]

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}