[리액트/윈도우] 원격으로 nodejs 설치

- 간단한 상황 설명..

ssh로 학교 서버(윈도우)에 있는 리액트를 실행하려 했다.

하지만 sudo 명령어도 안되고, choco도 안되길래 scoop으로 nodejs와 yarn을 설치하였다!

 

- Powershell 관리자 모드 실행

Start-Process -FilePath "powershell" -Verb RunAs

 

- (Scoop 설치를 위한) 보안 정책 설정

‼️주의 사항: PowerShell execution policy is required to be one of: Unrestricted, RemoteSigned or ByPass

Scoop를 설치하려면 PowerShell이 Unrestricted/RemoteSigned/ByPass 상태여야 한다.

 

PowerShell에 적용된 보안정책 알아보는 명령어

Get-ExecutionPolicy

 

보안정책 변경 Set-ExecutionPolicy 뒤에 입력해주면 된다.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

 

- Scoop 설치

iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin

 

- Node.js 설치

Node.js를 설치하는 방법은 두 가지가 있는데,

1) scoop으로 nvm를 install 하고 nvm install lts(안정화 버전)

2) scoop install nodejs로 scoop으로 바로 설치하는 방법이 있다.

 

나는 두 번째 방법으로 하였다.

scoop install nodejs

 

- yarn 설치 (필수 아님)

npm install --global yarn

 

- 모듈 한 번에 설치

마지막으로 기존에 있던 프로젝트라면 package.json에 수많은 모듈이 있을 거다..

한 번에 다운로드하기 위해서는 npm install을 입력해주면 된다.

npm install

 

- 참고

 

GitHub - ScoopInstaller/Install: 📥 Next-generation Scoop (un)installer

📥 Next-generation Scoop (un)installer. Contribute to ScoopInstaller/Install development by creating an account on GitHub.

github.com

 

윈도우 node js 명령어로 설치

명령어로 설치하는 이유 다운로드하기 위해 웹사이트를 검색할 필요가 없다. 쉽고 빠르게 이 블로그에 있는 명령어만 복붙(ctrl+c, v)만 하면 된다. 간지 난다. 개발자라면 명령어로 설치하자. 간

jaegeun.tistory.com

 

320x100