참고)
https://github.com/nodesource/distributions
GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions
NodeSource Node.js Binary Distributions. Contribute to nodesource/distributions development by creating an account on GitHub.
github.com
root 계정이면, sudo 는 빼도 됨
-- Nodesource GPG key 다운로드 및 import
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
--레포지토리 성생, 아래 20은 버전...다른것을 선택해도 됨...예를 들어, 16, 18, 20, 21
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
-- update와 설치
sudo apt-get update
sudo apt-get install nodejs -y
=======================================================
버전 확인 : node -v
yarn 슬치 : npm install -g yarn -> 버전확인 yarn -v (1.22.21)
'IT > NodeJS' 카테고리의 다른 글
UnhandledPromiseRejection, DeprecatedWarning (0) | 2023.11.17 |
---|---|
IntelliJ 에서 Node 프로젝트 만들기 (0) | 2022.11.05 |
소스 레포지토리들 (0) | 2022.11.04 |
Router 를 이용하여, Route 들을 분리하기(경로별 다른 별도 파일로 작성) (0) | 2022.07.18 |
없는 page 라우팅 처리 예제 (0) | 2022.07.18 |
댓글