(前回からの続き)
SSH鍵の生成
$ pwd /c/Users/84kure $ ssh-keygen -t rsa -C "you@homestead" Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/84kure/.ssh/id_rsa): Created directory '/c/Users/84kure/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/84kure/.ssh/id_rsa. Your public key has been saved in /c/Users/84kure/.ssh/id_rsa.pub. The key fingerprint is: 85:d6:5b:dc:02:0c:0d:d8:ac:e7:be:c9:83:b3:7c:f1 you@homestead The key's randomart image is: +--[ RSA 2048]----+ | +o=. | | . oooo . | | .o o + . | | .... o . | | oS . | | o | | o o | | .o.+.E | | o++o | +-----------------+ $
~/.sshディレクトリに鍵ファイルペアが生成される。
共有フォルダの作成
$ pwd /c/Users/84kure $ mkdir Code $
Homestead.yamlの編集
デフォルトのまま変更する必要は無さそう。
~/.homestead/Homestead.yaml
ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox #Vagrantプロバイダの種類 authorize: ~/.ssh/id_rsa.pub #SSH公開鍵の所在 keys: #SSH秘密鍵の所在 - ~/.ssh/id_rsa folders: #共有フォルダのマッピング - map: ~/Code to: /home/vagrant/Code sites: #Nginxサイトのマッピング - map: homestead.app to: /home/vagrant/Code/Laravel/public databases: - homestead variables: - key: APP_ENV value: local # blackfire: # - id: foo # token: bar # client-id: foo # client-token: bar # ports: # - send: 93000 # to: 9300 # - send: 7777 # to: 777 # protocol: udp
ドメイン名の設定
エディタを管理者権限で実行してC:\Windows\System32\drivers\etc\hostsを編集。
192.168.10.10 homestead.app
これで設定は完了。
(次回へ続く)