"Vagrant"의 두 판 사이의 차이

오픈소스 비즈니스 컨설팅
둘러보기로 가기 검색하러 가기
잔글
잔글
39번째 줄: 39번째 줄:
 
vagrant 사용자를 생성 합니다.
 
vagrant 사용자를 생성 합니다.
  
groupadd wheel<br/>useradd &nbsp;-d /home/vagrant -m -g wheel vagrant&nbsp;
+
&nbsp; &nbsp; groupadd wheel<br/>&nbsp; &nbsp; useradd &nbsp;-d /home/vagrant -m -g wheel vagrant&nbsp;
 +
 
 +
visudo 명령을 사용하여 sudo 권한을 설정 합니다.
 +
 
 +
&nbsp; &nbsp; %wheel &nbsp;ALL=(ALL) &nbsp;ALL<br/>&nbsp; &nbsp; %wheel &nbsp;ALL=(ALL) &nbsp;NOPASSWD: ALL
 +
 
 +
vagrant 사용자의 ssh key 설정을 합니다.
 +
 
 +
&nbsp; su - vagrant<br/>&nbsp; mkdir -p .ssh<br/>&nbsp; curl -kL https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub > .ssh/authorized_keys<br/>&nbsp; chmod -R go-rwx .ssh<br/>&nbsp; exit
 +
 
 +
yum install rsync openssh-clients<br/>yum clean all
 +
 
 +
shotdown -h&nbsp;now
 +
 
 +
vagrant package --output centos70_64.box --base "CentOS 7.0"
  
 
== 참고문헌 ==
 
== 참고문헌 ==

2015년 7월 29일 (수) 13:53 판

간소화된 VM 관리 서비스인 vagrant를 정리 합니다.

Vagrant 개요

Vagrant 용어

Box : 기본 설정을 가진 VM Template Image


VM 생성

vagrant box add <name> <image>

-   ~/.vagrant.d/box/

mkdir project

cd project

vagrant init <name>

vagrant up

vagrant ssh

Box 생성

Virtualbox에서 CentOS 7.0을 설치 합니다.

vagrant 사용자를 생성 합니다.

    groupadd wheel
    useradd  -d /home/vagrant -m -g wheel vagrant 

visudo 명령을 사용하여 sudo 권한을 설정 합니다.

    %wheel  ALL=(ALL)  ALL
    %wheel  ALL=(ALL)  NOPASSWD: ALL

vagrant 사용자의 ssh key 설정을 합니다.

  su - vagrant
  mkdir -p .ssh
  curl -kL https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub > .ssh/authorized_keys
  chmod -R go-rwx .ssh
  exit

yum install rsync openssh-clients
yum clean all

shotdown -h now

vagrant package --output centos70_64.box --base "CentOS 7.0"

참고문헌