- Vagrantfileを適当なディレクトリに置く
- boxをインストール
- 起動
- $ vagrant up
- vagrant_up.batを配置
- ssh
$ ssh -l vagrant -p 2222 127.0.0.1
- ttlを作成
Last active
August 6, 2017 16:31
-
-
Save smison/00938cdf65773a58a2b3835fa3751c9f to your computer and use it in GitHub Desktop.
local開発環境作成
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOSTADDR = '127.0.0.1' | |
USERNAME = 'vagrant' | |
PASSWORD = 'vagrant' | |
;============================================== | |
COMMAND = HOSTADDR | |
strconcat COMMAND ':2222 /ssh /2 /auth=password /user=' | |
strconcat COMMAND USERNAME | |
strconcat COMMAND ' /passwd=' | |
strconcat COMMAND PASSWORD | |
connect COMMAND | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "centos" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "forwarded_port", guest: 3000, host: 3000 | |
config.vm.network :forwarded_port, guest: 22, host: 2221 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment