/
Node.js 설치 - Rhel 7,8
Node.js 설치 - Rhel 7,8
- 1 Node.js 설치
- 1.1 Yum으로 설치
- 1.1.1 Repo 추가
- 1.1.2 Yum install
- 1.2 [권장] NVM으로 설치(버전 관리용)
- 1.2.1 NVM 설치
- 1.2.2 Node 설치
- 1.2.3 Node 버전 등록
- 1.3 [폐쇠망 추천] Node.js binary 설치
- 1.3.1 다운로드 Node.js tar파일
- 1.3.2 FTP로 tar파일 서버에 전송
- 1.3.3 tar file 압축해제 → 저장 위치 : /opt
- 1.3.4 환경변수 설정
- 1.1 Yum으로 설치
- 2 Yarn 설치
- 2.1 NPM에서 설치
- 2.2 Yarn binary 설치
- 2.3 [폐쇠망 추천] 무설치 yarn 실행
- 2.3.1 공식홈페이지에서 yarn-1.22.10.js 파일 다운로드
- 2.3.2 프로젝트 Git에 commit
- 2.3.3 실행예시
Node.js 설치
Yum으로 설치
Repo 추가
Nodejs v14
curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -
Yum install
yum install nodejs -y
[권장] NVM으로 설치(버전 관리용)
nvm은 node 버전 관리 툴을 의미. ICE4의 경우 Node 버전 대응이 빠른 편으로 NVM으로 설치하는것이 버전 변경이 수월
NVM 설치
NVM 설치
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
Node 설치
nvm install node
nvm install v14.16.1
Node 버전 등록
nvm use v14.16.1
[폐쇠망 추천] Node.js binary 설치
다운로드 Node.js tar파일
https://nodejs.org/en/download/
FTP로 tar파일 서버에 전송
node-v14.4.0-linux-x64.tar.xz
tar file 압축해제 → 저장 위치 : /opt
# Nodejs tar 파일 압축해제
sudo tar -xvf node-v{자바버전}-linux-x64.tar.xz -C /opt
# (예시) node 12.18.0 version
sudo tar -xvf node-v12.18.0-linux-x64.tar.xz -C /opt
환경변수 설정
vi ~/.bash_profile
# NODE
# NODE_VERSION=v12.18.0
NODE_VERSION=v14.4.0
NODE_DISTRO=linux-x64
NODE_HOME="/opt/node-${NODE_VERSION}-${NODE_DISTRO}"
export PATH=$PATH:$NODE_HOME/bin
Yarn 설치
NPM에서 설치
npm install -g yarn
Yarn binary 설치
Yarn 다운로드
official website: https://classic.yarnpkg.com/en/
tar file URL: https://yarnpkg.com/latest.tar.gz
FTP 전송
압축해제
Extract tar file into /opt
sudo tar -vxf yarn-v1.22.4.tar -C /opt
환경변수 설정
# YARN
YARN_VERSION=v1.22.4
YARN_HOME="/opt/yarn-${YARN_VERSION}"
export PATH=$PATH:$YARN_HOME/bin
[폐쇠망 추천] 무설치 yarn 실행
Nodejs설치 필수적으로 필요합니다.
공식홈페이지에서 yarn-1.22.10.js 파일 다운로드
https://github.com/yarnpkg/yarn/releases
프로젝트 Git에 commit
실행예시
cd {프로젝트}
./yarn-1.22.10.js run start:dev
참고- 폐쇠망 npm 사용 가이드
https://classic.yarnpkg.com/blog/2016/11/24/offline-mirror/
, multiple selections available,
Related content
서버 초기 설정 - Rhel 7,8
서버 초기 설정 - Rhel 7,8
Read with this
Node - MacOS
Node - MacOS
More like this
Node - Windows10
Node - Windows10
More like this
ICE4 설치 가이드
ICE4 설치 가이드
Read with this
로컬PC 호스트 설정
로컬PC 호스트 설정
Read with this
Nginx global 설정(nginx.conf)
Nginx global 설정(nginx.conf)
Read with this