Homestead use of (the windows), updated from time

Preface: installation tutorial reference community wiki, 1.7 novice must-read - the tutorial on how to install homestead under Windows; carefully several attempts, will succeed

tips: always remember to use the position command, the distinction between the local host and virtual machines, remember that the directory location cmd run

After successful installation homestead, homestead development projects will be between the virtual machine and the host local programming, such as using the composer got me laravel framework in the virtual machine, and then use the editor in the local host of the project program;

Because the shared files yaml set the correspondence between the host and the virtual machine, the virtual machine project directory will automatically mapped to your computer, the same content Talia

Modify the configuration yaml
  • Open git bash at Homestead host directory, use the vi command to modify the contents of the file
  • Reload vagrant, open cmd in the user directory of the host, use the command vagrant provision
Command Line Explanation
vagrant init Initialization vagrant
vagrant up Start vagrant, when the general first time to create a new virtual machine, pay attention to the open position cmd
vagrant halt Close vagrant
vagrant ssh By SSH login vagrant (need to start vagrant)
vagrant provision Reapply the changes vagrant configuration, modified the configuration use
vagrant destroy Delete vagrant
Began to develop
  • In Homestead file directory of the local host, run cmd
  • Input: vagrant up
  • Homestead into the virtual machine environment
  • Input: vagrant ssh
  • Now it has entered the homestead environment (linux operating system and the same)
  • Use composer got me laravel framework
  • composer create-project --prefer-dist laravel/laravel blog “6.*”
  • Yaml then view the configuration directory location in the map, there have been projects
  • Use the editor to start development projects (as usual)
发布了13 篇原创文章 · 获赞 1 · 访问量 1946

Guess you like

Origin blog.csdn.net/qq_37029718/article/details/104994022