티스토리 뷰

카테고리 없음

VAGRANT 명령어

leeted 2017. 11. 6. 12:44

VAGRANT 기본 명령어

  • 설치
    $ vagrant box add laravel/homestead
  • 시작
    $ vagrant up
  • SSH 접속
    $ vagrant ssh
  • VAGRANT 종료
    $ vagrant halt

2개 이상의 homestead를 설정하는 방법

  1. Homestead.yaml 수정
    ip: "192.168.10.10"
    memory: 2048
    cpus: 1
    provider: virtualbox
    
    authorize: ~/.ssh/id_rsa.pub
    
    keys:
        - ~/.ssh/id_rsa
    
    folders:
        - map: ~/code/site1
          to: /home/vagrant/code/site1
        - map: ~/code/site2
          to: /home/vagrant/code/site2
    
    sites:
        - map: site1.app
          to: /home/vagrant/code/site1/public
        - map: site2.app
          to: /home/vagrant/code/site2/public
    
    databases:
        - site1
        - site2
    
  2. 가상머신 id 알아내기
    $ vagrant global-status
  3. 가상머신 리로드
    $ vagrant reload --provision {id}
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함