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

 
(같은 사용자의 중간 판 9개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{다른뜻|우분투18 node.js 8 설치}}
==개요==
==개요==
;우분투18 node.js 10 설치
;우분투 node.js 설치
<source lang='bash'>
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
apt install nodejs
</source>


<source lang='console'>
==새로운 방식==
root@ubuntu18:~# node -v
{{소스헤더|node.js v20.x}}
v10.13.0
<syntaxhighlight lang='bash'>
root@ubuntu18:~# npm -v
sudo apt-get update
6.4.1
sudo apt-get install -y ca-certificates curl gnupg
</source>
sudo mkdir -p /etc/apt/keyrings
[ -f /etc/apt/keyrings/nodesource.gpg ] || curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y
</syntaxhighlight>
 
==예전 방식==
{{소스헤더|Node.js v18.x}}
<syntaxhighlight lang='bash'>
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
</syntaxhighlight>
:→ deprecation warning 60 seconds
 
{{소스헤더|Node.js v16.x}}
<syntaxhighlight lang='bash'>
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
</syntaxhighlight>
 
{{소스헤더|Node.js v14.x}}
<syntaxhighlight lang='bash'>
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
</syntaxhighlight>
 
{{소스헤더|Node.js v12.x}}
<syntaxhighlight lang='bash'>
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[데비안/우분투 node.js 12 설치]]
* [[node.js 버전 목록]]
* [[우분투18 node.js 8 설치]]
* [[데비안 node.js 설치]]
* [[CentOS7 node.js 설치]]
* [[CentOS7 node.js 설치]]


==참고==
==참고==
* https://websiteforstudents.com/install-the-latest-node-js-and-nmp-packages-on-ubuntu-16-04-18-04-lts/
* https://github.com/nodesource/distributions/blob/master/README.md


[[분류: Ubuntu 18]]
[[분류: Ubuntu]]
[[분류: node.js]]
[[분류: node.js]]
[[분류: apt install]]
[[분류: apt install]]

2023년 10월 1일 (일) 15:39 기준 최신판

1 개요[ | ]

우분투 node.js 설치

2 새로운 방식[ | ]

node.js v20.x
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
[ -f /etc/apt/keyrings/nodesource.gpg ] || curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y

3 예전 방식[ | ]

Node.js v18.x
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
→ deprecation warning 60 seconds
Node.js v16.x
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v14.x
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v12.x
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

4 같이 보기[ | ]

5 참고[ | ]

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