WSL (Windows SubSystem for Linux) 설치 방법은 아래 블로그에 잘 설명되어 있습니다
https://ingu627.github.io/tips/install_ubuntu/
윈도우10에서 리눅스(Linux) 설치하기 (Ubuntu on WSL2)
AWS에서 가상의 환경을 작업하던 중, 내 PC에서 구동해 보았으면 싶어서 설치를 진행해 보았습니다. 윈도우10 환경에서 wsl2를 설치해봅니다.
ingu627.github.io
WSL 설치 후, 계정 생성까지 완료가 되었다면 환경 구축에 필요한 패키지를 설치합니다
sudo apt install net-tools
sudo apt install unzip
sudo apt-get install wget ca-certificates
net-tools: WSL 서버 주소를 확인하기 위해 (ifconfig)
unzip: bun 설치 시, 압축된 파일을 풀기 위해
ca-certificates: https 사이트에 curl 명령어를 사용할 때, 오류가 나지 않기 위해
sudo su 명령어를 통해 관리자 권한을 획득하시면, sudo를 생략하고 패키지 설치가 가능합니다
Bun 설치하기
/home/<사용자 디렉토리> 로 이동하여 curl 명령어를 실행하였습니다. (다른 폴더에서 해도 됩니다)
그리고 해당 경로(.)에 대한 폴더 권한을 사용자(tpwls8122)에게 부여하였습니다.
폴더 권한을 부여하는 이유는 VScode Extension (Remote - WSL)을 이용해 프로그래밍을 할 때, (폴더, 파일 생성 시) Permission denied 문제를 해결하기 위함입니다.
~ 경로는 현재 접속한 계정의 홈 디렉터리입니다. ( /home/tpwls8122 )
~/.bun/bin/bun에 성공적으로 설치되었다고 하고, 아래 ~/.bashrc 파일에 아래 명령어를 추가해주면 됩니다.
다음 장에서 VSCode 를 통해 서버를 실행 시켜보도록 하겠습니다
Bun is a fast all-in-one JavaScript runtime
Bundle, transpile, install and run JavaScript & TypeScript projects – all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.
bun.sh
https://github.com/oven-sh/bun#unzip-is-required
GitHub - oven-sh/bun: Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one.
Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one. - GitHub - oven-sh/bun: Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all i...
github.com
https://www.youtube.com/watch?v=t9924eteb-4
'JavaScript > BunJS' 카테고리의 다른 글
[Bun] 3. Bun 명령어를 통해 React 서버 실행하기 (0) | 2022.08.14 |
---|---|
[Bun] 2. Windows WSL 통해 Bun 환경 구축하기 (feat. VSCode) (0) | 2022.08.14 |