윈도우 운영체제에서 Vagrant로 ubuntu 18.04 LTS 설치하기
윈도우 운영체제로 리눅스 환경을 사용할 때
베이그런트와 같은 솔루션을 사용해 가상 시스템에서 개발 환경을 실행하면 조금 더 편하게 사용할 수 있다.
windows os에서 vagrant 설치하기
1. virtualBox 다운로드
먼저, vagrant 실행에 필요한 버츄얼 박스를 다운로드 해준다.
www.virtualbox.org/wiki/Downloads
Downloads – Oracle VM VirtualBox
Download VirtualBox Here you will find links to VirtualBox binaries and its source code. VirtualBox binaries By downloading, you agree to the terms and conditions of the respective license. If you're looking for the latest VirtualBox 6.0 packages, see Virt
www.virtualbox.org
운영체제에 맞는 걸 다운로드 해주면 된다.
windows hosts를 다운로드 해주자
2. vagrant 다운로드
https://www.vagrantup.com/downloads.html
Downloads | Vagrant by HashiCorp
Vagrant enables users to create and configure lightweight, reproducible, and portable development environments.
www.vagrantup.com
64bit를 사용 중이므로 64bit를 다운받자.
몇비트인지 모르겠다면 내PC > 오른쪽 마우스 클릭 > 속성 에서 확인할 수 있다.
우분투 환경 설치하기
1. 베이그런트 설치가 되면 재부팅 후에 cmd 창을 열어준다.
2. 우분투를 내려받을 디렉토리 생성
>> cd ..
cd 명령으로 c드라이브 디렉토리로 이동한다.
>> mkdir vagrant
우분투 환경을 내려받을 폴더 vagrant 를 만들어준다.
3. 베이그런트로 가상 서버를 구동하기 위한 준비하기
>> cd vagrant
만든 폴더 안으로 들어간다.
다음 명령어를 실행하면 vagrantfile이 생성된다.
>> vagrant init ubuntu/bionic64
4. vagrant up
처음 생성 시 시간이 조금 걸린다.
>> vagrant up
5. 접속하기
>> vagrant ssh