Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 시퀄라이즈
- 머클트리
- npm
- 리액트를 다루는 기술
- 환경변수
- 쉘스크립트
- 블록체인
- 라우터
- 이더리움
- node.js 교과서 따라하기
- 리액트
- 변수
- wget
- 자바스크립트
- 설치
- 우분투
- wsl
- Docker
- MariaDB
- immer
- 일반유저
- 리눅스
- 노드
- 벨로포터
- centos
- 깃허브
- 솔리디티
- 머클루트
- Sequelize
- 전역설치
Archives
- Today
- Total
코드코코
[리눅스] ubuntu에 nodejs 설치하기 본문
1. nvm (Node Version Manager) 설치
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
root@DESKTOP-RJ31OF5:/home/ubuntu# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh|bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14926 100 14926 0 0 61677 0 --:--:-- --:--:-- --:--:-- 61423
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
remote: Enumerating objects: 349, done.
remote: Counting objects: 100% (349/349), done.
remote: Compressing objects: 100% (297/297), done.
remote: Total 349 (delta 39), reused 165 (delta 27), pack-reused 0
Receiving objects: 100% (349/349), 202.48 KiB | 3.27 MiB/s, done.
Resolving deltas: 100% (39/39), done.
* (HEAD detached at FETCH_HEAD)
master
=> Compressing and cleaning up git repository
=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
root@DESKTOP-RJ31OF5:/home/ubuntu#
2. nvm 활성화
. ~/.nvm/nvm.sh
root@DESKTOP-RJ31OF5:/home/ubuntu# . ~/.nvm/nvm.sh
3. Node.js 설치
nvm install node
root@DESKTOP-RJ31OF5:/home/ubuntu# nvm install node
Downloading and installing node v17.2.0...
Downloading https://nodejs.org/dist/v17.2.0/node-v17.2.0-linux-x64.tar.xz...
################################################################################################################# 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v17.2.0 (npm v8.1.4)
Creating default alias: default -> node (-> v17.2.0)
root@DESKTOP-RJ31OF5:/home/ubuntu#
4. Node.js 및 npm 설치 확인
node -v
npm -v
root@DESKTOP-RJ31OF5:/home/ubuntu# node -v
v17.2.0
root@DESKTOP-RJ31OF5:/home/ubuntu# npm -v
8.1.4
root@DESKTOP-RJ31OF5:/home/ubuntu#
5. npm 버전 업그레이드가 필요한 경우
npm install -g npm@8.3.0
root@DESKTOP-RJ31OF5:/home/ubuntu/server# npm install -g npm@8.3.0
removed 8 packages, changed 20 packages, and audited 215 packages in 6s
10 packages are looking for funding
run `npm fund` for details
3 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
'기록 > 리눅스' 카테고리의 다른 글
[리눅스] 리눅스 패키지 (0) | 2021.12.15 |
---|---|
[리눅스] ubuntu 에서 MariaDB 재시작하기 (0) | 2021.12.14 |
[리눅스] ubuntu에 MariaDB 설치하기 // ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (0) | 2021.12.13 |
[리눅스] windows에 ubuntu 설치하기 (0) | 2021.12.13 |
[리눅스] 리눅스 디렉토리 구조 (0) | 2021.12.13 |