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

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


==확인==
==확인==
<source lang='console'>
* 우분투 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:
11번째 줄: 14번째 줄:
  * nodejs-legacy
  * 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>


==설치==
==설치==
* nodesource( node.js 최신버전 제공 )의 APT 저장소 추가
* nodesource( node.js 최신버전 제공 )의 APT 저장소 추가
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
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]     
... (생략)
... (생략)
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US         
Get:7 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages [963 B]
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US         
Get:8 https://deb.nodesource.com/node_6.x xenial/main i386 Packages [959 B]
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US           
Fetched 109 kB in 1s (58.2 kB/s)                                
Fetched 7,325 B in 16s (431 B/s)                                              
Reading package lists... Done
Reading package lists... Done


## Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
## Run `apt-get install nodejs` (as root) to install Node.js v6.x and npm
</source>
</syntaxhighlight>
* 설치
* 설치
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# apt-get install nodejs
root@zetawiki:~# apt-get install nodejs
Reading package lists... Done
Reading package lists... Done
34번째 줄: 53번째 줄:
The following NEW packages will be installed:
The following NEW packages will be installed:
   nodejs
   nodejs
0 upgraded, 1 newly installed, 0 to remove and 188 not upgraded.
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.
Need to get 9,940 kB of archives.
Need to get 10.1 MB of archives.
After this operation, 50.6 MB of additional disk space will be used.
After this operation, 50.8 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_6.x/ trusty/main nodejs amd64 6.10.3-1nodesource1~trusty1 [9,940 kB]
Get:1 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.10.3-1nodesource1~xenial1 [10.1 MB]
Fetched 9,940 kB in 57s (172 kB/s)                                            
Fetched 10.1 MB in 0s (12.1 MB/s)
Selecting previously unselected package nodejs.
Selecting previously unselected package nodejs.
(Reading database ... 70474 files and directories currently installed.)
(Reading database ... 103333 files and directories currently installed.)
Preparing to unpack .../nodejs_6.10.3-1nodesource1~trusty1_amd64.deb ...
Preparing to unpack .../nodejs_6.10.3-1nodesource1~xenial1_amd64.deb ...
Unpacking nodejs (6.10.3-1nodesource1~trusty1) ...
Unpacking nodejs (6.10.3-1nodesource1~xenial1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (6.10.3-1nodesource1~trusty1) ...
Setting up nodejs (6.10.3-1nodesource1~xenial1) ...
</source>
</syntaxhighlight>


==확인 2==
==확인 2==
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# node -v
root@zetawiki:~# node -v
v4.4.5
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 설치]]
59번째 줄: 81번째 줄:
*[[node.js]]
*[[node.js]]


==참고 자료==
==참고==
*https://nodejs.org/en/download/package-manager/
*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 }}