【Tutorial】Setup Homestead & Install Laravel 8.x in Windows 10 VirtualBox - For Beginner

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today i'm going to talk about the homestead installation on windows homestead is an official laravel development environment package it resolves the execution discrepancy in different development environment it uses automation software vagrant to achieve the unified development environment i will use virtualbox as the vm platform then by editing homestead.young file to customize my virtual machine so you can connect the vm via ssh using putty source code will be shared between your pc and the vm via nfs [Music] all software download link can be found in the description let's begin to install get execute kit installer just follow the default options [Music] nano editor is recommended for beginner it is currently the most popular and must learn version control software for programmer [Music] then now git installation is completed if you want to connect to github you must own the ssh key homestead also needs ssh key to work properly github site talks about two different algorithms to generate ssh key we will be using the common rsa algorithm open git bash [Music] copy and paste the command then modify the email address press enter to accept the default path the passphrase is recommended but do not forget it once the ssh key is created you will see ssh folder in your user folder two files should be in the dot ssh folder the one without file extension is private key another one is public key [Music] if you are using ssh key authentication you need to paste the public key content on github we don't elaborate on this section for now [Music] we quickly install other tools first install putty [Music] then install the free tool to navigate databases idsql [Music] installing virtual box also just follow the default options [Music] open virtual box file menu then select preference select extensions click the add button select the file click install scroll to the bottom then click i agree [Music] virtual box installation is done [Music] install vagrant just keep pressing next then require to restart the computer [Music] vagrant install is completed then click yes to restart the computer [Music] open command prompt and key invagrant to check vagrant is functioned properly let's install the nfs plugin now nfs is not need for speed nfs stands for network file system it is used for improving the shared folder speed between your pc and vm the shared folder stores all your laravel project codes type vagrant plug and install vagrant dash when nfsd press enter and wait for the completion message [Music] open git bash you can get the latest info from the official lauravel site [Music] we need to copy this command to pull the homestead from github repo paste to get bash then execute notice the homestead folder is created [Music] now we get a cd into the homestead directory then check out release branch you should see the branches change to release open the homestead folder look for the file init dot via t execute it then it generates the homestead.yaml and other config files homestead.young lets you customize your vm environment we talk in detail later open command prompt we need to download the homestead vagrant box it is the official original vm image key and vagrant box add laravel homestead then press enter [Music] select 2 virtualbox quite some people stuck here or suffer extremely slow download speed so i provide my alternate solution here you can go to this url to download a two gigabytes compressed file in user folder look for the dot vagrant.d then open boxes folder [Music] then extract the content into the folder [Music] after extraction you may open the folder and see the box version again open the command prompt then key and vagrant box list to confirm you can see the homestead vagrant box exists now we're going to edit the homestead.yelm document [Music] open homestead folder then use visual studio code open homestead.young firstly ip you should avoid the ip belong to your network subnet if your router ip is 192.168.1.1 then please use 192.168.2.something do not use any 192.168.1.something for memory and cpu please follow your available resources the default value is sufficient then the ssh key has been created in step two nothing to change here then the shared folder i created a code folder in my user directory then copy and paste the folder path by doing this the vm and windows able to share a single folder notice the second line is the path in the vm then set the type to nfs for better performance [Music] now it is the local domain name later we going to kickstart a laravel project which is called sample for now we do not need to create the folder we just set the correct path followed by the database name [Music] finally set the my sequel to be true [Music] save the edited homestead.yawn document we need to set the host file so it will match what you key in the browser from the start menu look for notepad then select run as administrator in the c windows system 32 drivers etc select display all files then open hosts file key in the ip then key in the corresponding domain we open virtualbox and have a look remember that only run vagrant up in the directory where vagrant file locates here are a few common commands up is boot up halt is shut down reload is reboot the vm vagrant provision is applying the edit at homestead.young keyan cmd in the address bar keyan vagrant up it takes some time for the first boot up completed boot up you should see the homestead is running in the virtual box open putty and try to log in vm key in 192.168.10.10 username is vagrant password is vagrant if you can see this screen congratulations [Applause] [Music] we also can log in via the ssh key we created in the previous step open putty key in 192.168.10.10 expand the ssh then expand off select the private key however a conversion is required to obtain the dot ppk format look for puttygen in the start menu [Music] click conversions then import key confirm the path then select the private key click save private key if the passphrase is blank it will remind you double check and then save do not replace the original private key key in id underscore rsa.ppk then click save back to putty pick the freshly generated private key click session key in homestead as the session name then save next time you can just open putty then double click homestead to log in directly even more you also can preset the username just double-click then homestead is logged in [Music] finally we reach here now we log into homestead we will create our first laravel project in the code folder [Music] this folder is mapped to the code in homestead vm browse the laravel official documentation you can obtain the latest installation guide i will demo how to create the first project using laravel installer firstly we run composer global update laravel slash installer to upgrade to the latest laravel installer then run laravel new sample sample is our project name make sure it matches the homestead.young file press enter start the larval installation notice the sample folder appears open the folder should see all laravel files then waiting for the installation to be complete [Music] let's see the sample go into the directory run php artisan-version to check the installed version able to see laravel 8.32.1 is installed use vs code to open the folder select sample folder double-click and edit the dot env file edit database name username and password confirm database name then username is homestead password is secret save use php artisan migrate to test db [Music] connection let's introduce a free database management software heidi sql click new edit the name as homestead select option ssh tunnel in the ssh tunnel tab set the ip as 192.168.10.10. username is vagrant select private key then in the settings tab set user as homestead password as secret finally then save now we click open to establish the connection double-click sample underscore db you should see all migrated tables [Music] then you can intuitively check the database table schema and data in the browser keyansample.test [Music] you should be able to see the laravel welcome page [Applause] thanks for watching please press the like button and subscribe to my channel and click the bell to turn on the new video notification see you all soon thank you
Info
Channel: Dogcomp
Views: 4,704
Rating: undefined out of 5
Keywords: laravel homestead, laravel homestead tutorial, how to install laravel, laravel tutorial for beginners step by step, laravel homestead windows 10, laravel programming tutorial, how to install vagrant in virtualbox, install laravel on windows 10, composer install laravel project, laravel vagrant homestead virtualbox, laravel homestead vagrant box, learn code for beginners, laravel tutorial, laravel 8 installation, laravel homestead windows, Laravel, Homestead
Id: kuetbZSPfpg
Channel Id: undefined
Length: 16min 4sec (964 seconds)
Published: Mon Apr 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.