LoginSignup
2
4

More than 3 years have passed since last update.

Vagrant+AnsibleでWindows8.1上にCentOS7.3をサクッと建てる

Last updated at Posted at 2017-10-10

前提環境

・Windows8.1 64bit
・Vagrant 最新版
・Virtualbox 最新版
・GitHub Desktop for Windows(64bit) 最新版
(Teraterm 最新版はインストール推奨)

環境構築手順

  1. Vagrantをインストールする
    https://www.vagrantup.com/downloads.html

  2. Virtualboxをインストールする
    https://www.virtualbox.org/

  3. CentOSをVirtualboxにインストールする ※やや時間がかかる場合があるので、手順4,5を並行して実施することをおすすめします

    • Powershellを管理者権限で起動
    • コマンドを実行
    Powrtshell(管理者)
    > vagrant box add CentOS73 https://github.com/CommanderK5/packer-centos-template/releases/download/0.7.3/vagrant-centos-7.3.box
    
  4. GitHubアカウントを作成する

  5. GitHub Desktopをインストールする

  6. 「centos73_vagrant」リポジトリをローカルにcloneする

    • GitHub Desktopメニューより、[Clone Repogitory...]を選択
    • リポジトリのURLを指定してcloneする
    • 表示された「Local Path」は後で使用するのでメモしておく スクリーンショット 2017-10-10 17.04.39.png
  7. vagrant upを実行

    Powershell(管理者)
    > cd [手順6.で表示されたLocal Path]
    > vagrant up
    
    • 仮想マシンの作成後、ansible_localプロビジョナが実行され、CentOS上に環境が構築される。 スクリーンショット 2017-10-10 14.06.40.png
  8. 仮想マシンにログインする

    • 2つの方法があります。

      1. 【おすすめ】Teratermでログイン
        • Teraterm最新版をフルインストール
          • 「インストール種別の選択」画面で「フルインストール」を選択
          • 「追加タスクの選択」画面で「.ttlをttpmacro.exeに関連付ける」にチェックを入れる
        • centos73_S-login.ttl をダブルクリック
      2. vagrant sshコマンドでログイン
      Powershell(管理者)
      > cd [手順6.で表示されたLocal Path]
      > vagrant ssh
      

Thanks to: 参考文献

ー以上ー

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4