Now we need to see whether we can login to our mysql on Vagrant homestead machine. Last login: Sun Oct 18 20:14:08 2015 from 10.0.2.2Īnd you should be in as shown above. Since this is all VM, which is really another small machine on your physical machine, you can actually ssh into it and install any thing you want. Just destory it via command line homestead destroyĪnd if you find it too troublesome to hit one line then open up VirtualBox and 'stop and remove' it.Īnd you can redo the `homestead up` again. Once you've done that, all you need to do is to open up the url '' and you'll see the following displayĪnd if you don't like what you see. If you are wondering why its 192.168.10.10 its because on my homestead.yaml i have place it as this ip address. Hence, i will need to setup this domain to point it to my local machine by doing this sudo vi /etc/hostsĪnd add this line at the end 192.168.10.10 Once this is done, do remember that i have setup '' to point to my laravel installation folder. => default: Checking if box 'laravel/homestead' is up to date. => default: Matching MAC address for NAT networking. => default: Importing base box 'laravel/homestead'. It's time to start Vagrant and access our website via homestead upīringing machine 'default' up with 'virtualbox' provider. Now we have finish setup both laravel files and homestead configuration. The above will create a new laravel blog folder. Setup Laravel Base FilesĪs you can see on my Homestead.yaml file, i have tell the configuration to go to the directory ~/Vagrant/Code where i will setup Laravel there. So edit your configuration file accordingly and to your liking and we can start creating Laravel base files. To: /Users/claylua/Vagrant/Code/blog/public directory located at /Users/claylua/Vagrant/Code/blog/public i am mapping the Laravel files to and on vagrant of vm, it will look for the and on Vagrant VM iw ill place it on /Users/claylua/Vagrant/Code ![]() in my macbook, i am playing all laravel files on ~/Vagrant/Code (i created it myself) this is my private key that i normally use ![]() And the most important parts are shown below, // this is the public key I use vim, you can use nano and etc or whatever you like. Now we know where this file is located, we just need to open up and starts configuring some important parts. Homestead.yaml file created at: /Users/claylua/.homestead/Homestead.yaml We need to setup Homestead YAML file but first, we will need to create the configure file via homestead init Now we have finish installed all required script for Laravel and Vagrant. profile whichever you but might is located at ~/.profile export PATH=~/.composer/vendor/bin:$PATHĪnd add this line so that we can use whatever is in the vendor bin folder. composer global require "laravel/homestead=~2.0"Īnd make sure the path ~/.composer/vendor/bin is available after installation. Now before anything else, we will need to install Homestead CLI tool. Which should list out what vagrant boxes you have. Once you've done that you can see it via Clays-MacBook-Air:public clay$ vagrant box list We can first download this upfront so we could use it later. ![]() Now we need to install Homestead Vagrant box. Once this is done you should be able to create a new laravel website by generating the base files of laravel laravel new blogīut be patient, don't do this first since we really want to set this up with Vagrant and Homestead. composer global require "laravel/installer=~1.1" Now i wanted to use the script 'laravel new xxx' so i have to install Laravel as well by firing the following composer script. If not, please try to install php first before doing this. However, make sure your 'php' is available as shown here, Clays-MacBook-Air:public clay$ whereis php Now to install Composer we will need to do this. pkg file and continue till the end and we are all good with VirtualBox. ![]() dmg file of virtualbox and install it via. Therefore, head over to VirtualBox official website. Without VirtualBox don't think about getting Vagrant to work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |