웹사이트 검색

RHEL 및 Debian 시스템에 Node.js 및 NPM을 설치하는 방법


이 가이드에서는 CentOS, Fedora, Rocky 및 AlmaLinux와 같은 RHEL 기반 배포판에 최신 버전의 NodejsNPM을 설치하는 방법을 살펴보겠습니다. Ubuntu 및 Linux Mint와 같은 Debian 기반 배포판.

NodejsChrome의 V8 JavaScript 엔진을 기반으로 구축된 가볍고 효율적인 JavaScript 플랫폼이며 NPM은 기본 NodeJS 패키지 관리자입니다. 이를 사용하여 확장 가능한 네트워크 애플리케이션을 구축할 수 있습니다.

이 페이지에서:
  • RHEL 기반 배포판에 Node.js를 설치하는 방법
  • Debian, Ubuntu, Linux Mint에 Node.js를 설치하는 방법

RHEL 배포판에 Node.js를 설치하는 방법

Node.jsNPM의 최신 버전은 Nodejs 웹사이트에서 관리하는 공식 NodeSource Enterprise Linux 저장소에서 사용할 수 있습니다. 최신 NodejsNPM 패키지를 설치하려면 시스템에 이를 추가해야 합니다.

중요: RHEL 6 또는 CentOS 6의 이전 릴리스를 실행 중인 경우 다음 내용을 읽어 보세요. 이전 배포판에서 Node.js를 실행하는 방법에 대해 알아보세요.

RHEL, CentOS, Fedora, Rocky 및 Alma에 NodeJS 설치

최신 버전의 Node.js에 대한 저장소를 추가하려면 루트 또는 루트가 아닌 사용자로 다음 명령을 사용하세요.

------------- For Node.js v19.x ------------- 
curl -fsSL https://rpm.nodesource.com/setup_19.x | sudo bash -
sudo yum install -y nodejs

------------- For Node.js v18.x ------------- 
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
sudo yum install -y nodejs

------------- For Node.js v16.x ------------- 
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum install -y nodejs

------------- For Node.js v14.x ------------- 
curl -fsSL https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum install -y nodejs

선택 사항: 시스템에 있어야 하는 gcc-c++make와 같은 개발 도구가 있습니다. , npm에서 기본 애드온을 빌드하기 위해.

yum install gcc-c++ make
OR
yum groupinstall 'Development Tools'

Debian, Ubuntu, Linux Mint에 Node.js를 설치하는 방법

Node.jsNPM의 최신 버전은 공식 NodeSource Enterprise Linux 저장소에서도 사용할 수 있습니다. 이 저장소는 Nodejs 웹사이트에서 관리되며 이를 귀하의 저장소에 추가해야 합니다. 최신 Nodejs 및 NPM 패키지를 설치할 수 있는 시스템입니다.

Ubuntu와 Mint에 Node.js 설치

------------- For Node.js v19.x ------------- 
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

------------- For Node.js v18.x -------------
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

------------- For Node.js v16.x -------------
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

------------- For Node.js v14.x -------------
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

Debian에 Node.js 설치

------------- For Node.js v19.x ------------- 
curl -fsSL https://deb.nodesource.com/setup_19.x | bash - &&\
sudo apt-get install -y nodejs

------------- For Node.js v18.x ------------- 
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - &&\
sudo apt-get install -y nodejs

------------- For Node.js v16.x ------------- 
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
sudo apt-get install -y nodejs

------------- For Node.js v14.x ------------- 
curl -fsSL https://deb.nodesource.com/setup_14.x | bash - &&\
sudo apt-get install -y nodejs

선택 사항: 시스템에 있어야 하는 gcc-c++make와 같은 개발 도구가 있습니다. , npm에서 기본 애드온을 빌드하기 위해.

sudo apt-get install -y build-essential

Linux에서 최신 Nodejs 및 NPM 테스트

nodejsNPM을 간단하게 테스트하려면 다음 명령을 사용하여 시스템에 설치된 버전을 확인하면 됩니다.

RHEL 기반 시스템

node --version
npm --version

데비안, 우분투, 리눅스 민트에서

nodejs --version
npm --version

이제 NodejsNPM이 설치되어 시스템에 사용할 준비가 되었습니다.

이는 따라하기 쉽고 간단한 단계라고 생각합니다. 하지만 문제가 발생한 경우 알려주시면 도움을 드릴 수 있는 방법을 찾아드리겠습니다. 이 가이드가 도움이 되었기를 바라며 항상 Tecmint와 연결을 유지하는 것을 기억하세요.