{"id":1903,"date":"2023-07-23T09:56:16","date_gmt":"2023-07-23T06:56:16","guid":{"rendered":"http:\/\/leonidassavvides.com\/blog\/?p=1903"},"modified":"2023-07-23T09:56:16","modified_gmt":"2023-07-23T06:56:16","slug":"setup-laravel-10-x-homestead-in-windows-10-11","status":"publish","type":"post","link":"https:\/\/www.leonidassavvides.com\/blog\/2023\/07\/setup-laravel-10-x-homestead-in-windows-10-11\/","title":{"rendered":"Setup Laravel 10.x Homestead in Windows 10\/11"},"content":{"rendered":"<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Section &#8211; 1 [Install Software]<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.leonidassavvides.com\/blog1\/wp-content\/uploads\/2023\/07\/2023-07-23_08-47-43.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.leonidassavvides.com\/blog1\/wp-content\/uploads\/2023\/07\/2023-07-23_08-47-43.png\" alt=\"\" class=\"wp-image-1906\" width=\"566\" height=\"324\" srcset=\"https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_08-47-43.png 1343w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_08-47-43-300x172.png 300w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_08-47-43-1024x586.png 1024w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_08-47-43-768x440.png 768w\" sizes=\"auto, (max-width: 566px) 85vw, 566px\" \/><\/a><\/figure>\n\n\n\n<p><a href=\"https:\/\/laravel.com\/docs\/10.x\/homestead#installation-and-setup\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/laravel.com\/docs\/10.x\/homestead#installation-and-setup<\/a><\/p>\n\n\n\n<p>vagrant_2.3.7_windows_amd64.msi &#8211; <a href=\"https:\/\/developer.hashicorp.com\/vagrant\/downloads\">https:\/\/developer.hashicorp.com\/vagrant\/downloads<\/a><\/p>\n\n\n\n<p>VirtualBox-6.1.46-158378-Win.exe &#8211; <a href=\"https:\/\/www.virtualbox.org\/wiki\/Download_Old_Builds_6_1\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.virtualbox.org\/wiki\/Download_Old_Builds_6_1<\/a><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/www.virtualbox.org\/wiki\/Changelog-6.1#v46\">VirtualBox 6.1.46<\/a><\/strong>&nbsp;<em>(released July 18 2023)<\/em> <strong>&lt;&lt; This <\/strong>and <strong>Not the<\/strong> &gt;&gt; VirtualBox 7.0.10 platform packages &#8211; \u200bWindows hosts<\/p>\n\n\n\n<p><strong>According to:<\/strong> <a rel=\"noreferrer noopener\" href=\"https:\/\/laravel.com\/docs\/10.x\/homestead#installation-and-setup\" target=\"_blank\">https:\/\/laravel.com\/docs\/10.x\/homestead#installation-and-setup<\/a> <\/p>\n\n\n\n<p><strong>Code Editor\/IDE:<\/strong> <a href=\"https:\/\/www.jetbrains.com\/phpstorm\/download\/#section=windows\" target=\"_blank\" rel=\"noreferrer noopener\">PhpStorm-2023.1.4.exe<\/a> or <a href=\"https:\/\/code.visualstudio.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\">VSCodeSetup-x64-1.80.1.exe<\/a><\/p>\n\n\n\n<p><strong>Lastly install:<\/strong> Git-2.41.0.3-64-bit.exe &#8211; <a href=\"https:\/\/git-scm.com\/downloads\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/git-scm.com\/downloads<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Section &#8211; 2 [ENABLE VT-x in Hardware\/BIOS\/UEFI if disabled]<\/h2>\n\n\n\n<p><a href=\"http:\/\/leonidassavvides.com\/blog\/2023\/07\/23\/enable-vt-x-in-hp-z640-workstation\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/leonidassavvides.com\/blog\/2023\/07\/23\/enable-vt-x-in-hp-z640-workstation\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Section &#8211; 3 [Installing Homestead]<\/h2>\n\n\n\n<p><a href=\"https:\/\/laravel.com\/docs\/10.x\/homestead#installing-homestead\">https:\/\/laravel.com\/docs\/10.x\/homestead#installing-homestead<\/a><\/p>\n\n\n\n<p>Go To CLI Terminal in IDE\/Editor or Windows Terminal or Git Bash Terminal and execute:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>git clone https:\/\/github.com\/laravel\/homestead.git D:\\htdocs_xampp\\Homestead<\/strong><\/code><\/pre>\n\n\n\n<p>where D:\\htdocs_xampp\\Homestead the Homestead directory, after entering this directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>d:<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>cd d:\\htdocs_xampp\\Homestead<\/strong><\/code><\/pre>\n\n\n\n<p>Next, execute the bash init.bat command from the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file is where you will configure all of the settings for your Homestead installation. This file will be placed in the Homestead directory: if there is a problem with the <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>init.bat <\/strong><\/code><\/pre>\n\n\n\n<p>use <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/<strong>init.bat<\/strong><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Section &#8211; 4 [Configuring Homestead]<\/h2>\n\n\n\n<p>Follow the instructions at:<\/p>\n\n\n\n<p><a href=\"https:\/\/laravel.com\/docs\/10.x\/homestead#configuring-homestead\">https:\/\/laravel.com\/docs\/10.x\/homestead#configuring-homestead<\/a><\/p>\n\n\n\n<p>For configuring the file: <strong>Homestead.yaml<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Section &#8211; 5 [Launching The Vagrant Box]<\/h2>\n\n\n\n<p>After all, the steps above, it is time to:<\/p>\n\n\n\n<p>Launching The Vagrant Box<\/p>\n\n\n\n<p>You must have in mind the 4 most used CLI commands FROM CLI\/Terminal at <strong>d:\\htdocs_xampp\\Homestead<\/strong>\\:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant up # if error on this - please Section 6 below<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant status<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant suspend<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant ssh<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Section &#8211; 6 [Configuring SSH Keys]<\/h2>\n\n\n\n<p>In case the first attempt of running: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant up<\/code><\/pre>\n\n\n\n<p>you getting<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.leonidassavvides.com\/blog1\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1707\" height=\"361\" src=\"https:\/\/www.leonidassavvides.com\/blog1\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51.png\" alt=\"\" class=\"wp-image-1920\" srcset=\"https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51.png 1707w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51-300x63.png 300w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51-1024x217.png 1024w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51-768x162.png 768w, https:\/\/www.leonidassavvides.com\/blog\/wp-content\/uploads\/2023\/07\/2023-07-23_09-21-51-1536x325.png 1536w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p>Please give the command to generate ssh keys in Windows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh-keygen -t rsa -C \"username@email.com\"<\/code><\/pre>\n\n\n\n<p>This will create the:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\lwdls\\.ssh\\id_rsa.pub<br \/>C:\\Users\\lwdls\\.ssh\\id_rsa<\/code><\/pre>\n\n\n\n<p>Then you have to go to Homestead.yaml and edit the SSH Keys with the correct Keys you have just created: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>authorize: C:\\Users\\lwdls.ssh\\id_rsa.pub\nkeys:\n     - C:\\Users\\lwdls.ssh\\id_rsa<\/code><\/pre>\n\n\n\n<p>Then you return to Section &#8211; 5 and give the command: <strong>vagrant up<\/strong><\/p>\n\n\n\n<p>The first time you have to <strong>await some time to download the Vagrant VM &#8211; Ubuntu Server from the repositories&#8230;<\/strong><\/p>\n\n\n\n<p>After the VM OK is launched go to: http:\/\/homestead.test\/phpinfo.php to see the webpage of phpinfo():<\/p>\n\n\n\n<p>phpinfo.php<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php<br \/>phpinfo();<br \/>?&gt;<\/code><\/pre>\n\n\n\n<p>if any problem put the phpinfo.php<\/p>\n\n\n\n<p>in <\/p>\n\n\n\n<p><strong>public\/phpinfo.php<\/strong><\/p>\n\n\n\n<p>to stop the VM &#8211; shutdown the PC &#8211; give<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant suspend<\/code><\/pre>\n\n\n\n<p>To <strong>add additional sites:<\/strong><\/p>\n\n\n\n<p>Adding Additional Sites<\/p>\n\n\n\n<p><a href=\"https:\/\/laravel.com\/docs\/10.x\/homestead#adding-additional-sites\">https:\/\/laravel.com\/docs\/10.x\/homestead#adding-additional-sites<\/a><\/p>\n\n\n\n<p>To create a Laravel Site &#8211; start with download Laravel files with the:<\/p>\n\n\n\n<p><a href=\"https:\/\/laravel.com\/docs\/10.x\/installation#your-first-laravel-project\">https:\/\/laravel.com\/docs\/10.x\/installation#your-first-laravel-project<\/a><\/p>\n\n\n\n<p>At Terminal <strong>d:\\htdocs_xampp\\<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer create-project laravel\/laravel example-laravel-app<\/code><\/pre>\n\n\n\n<p>Composer can be installed from: <\/p>\n\n\n\n<p><a href=\"https:\/\/getcomposer.org\/download\/\">https:\/\/getcomposer.org\/download\/<\/a><\/p>\n\n\n\n<p>Also, the composer comes preinstalled in Homestead\/Vagrant\/VM<\/p>\n\n\n\n<p>And, a <strong>second way<\/strong> is:<\/p>\n\n\n\n<p>After:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant up <\/code><\/pre>\n\n\n\n<p>Give:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant ssh<\/code><\/pre>\n\n\n\n<p>and from Terminal at <strong>\/home\/vagrant\/<\/strong> give the command: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> composer create-project laravel\/laravel example-laravel-app<\/code><\/pre>\n\n\n\n<p>Any way you choose, be sure to edit the Homestead.yaml and every new website added to run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vagrant reload --provision<\/code><\/pre>\n\n\n\n<p>And lastly<\/p>\n\n\n\n<p>To run a new URL locally modify the host file at:<\/p>\n\n\n\n<p>On macOS and Linux, this file is located at <strong>\/etc\/hosts<\/strong>. On Windows, it is located at <strong>C:\\Windows\\System32\\drivers\\etc\\hosts<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>192.168.56.56 homestead.test\n192.168.56.56 another1.test\n192.168.56.56 another2.test<\/code><\/pre>\n\n\n\n<p>Again, according to <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Homestead.yaml<\/code><\/pre>\n\n\n\n<p>After, download the Laravel 10.x bootstrap code base, view the Laravel homepage accordingly by going to http:\/\/another1.test.<\/p>\n\n\n\n<p>Happy <strong>Laravel Web Development &amp; Coding&#8230;!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Section &#8211; 1 [Install Software] https:\/\/laravel.com\/docs\/10.x\/homestead#installation-and-setup vagrant_2.3.7_windows_amd64.msi &#8211; https:\/\/developer.hashicorp.com\/vagrant\/downloads VirtualBox-6.1.46-158378-Win.exe &#8211; https:\/\/www.virtualbox.org\/wiki\/Download_Old_Builds_6_1 VirtualBox 6.1.46&nbsp;(released July 18 2023) &lt;&lt; This and Not the &gt;&gt; VirtualBox 7.0.10 platform packages &#8211; \u200bWindows hosts According to: https:\/\/laravel.com\/docs\/10.x\/homestead#installation-and-setup Code Editor\/IDE: PhpStorm-2023.1.4.exe or VSCodeSetup-x64-1.80.1.exe Lastly install: Git-2.41.0.3-64-bit.exe &#8211; https:\/\/git-scm.com\/downloads Section &#8211; 2 [ENABLE VT-x in Hardware\/BIOS\/UEFI if disabled] http:\/\/leonidassavvides.com\/blog\/2023\/07\/23\/enable-vt-x-in-hp-z640-workstation\/ Section &#8211; &hellip; <a href=\"https:\/\/www.leonidassavvides.com\/blog\/2023\/07\/setup-laravel-10-x-homestead-in-windows-10-11\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Setup Laravel 10.x Homestead in Windows 10\/11&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9,10,11,12,19,20,42,43,45,46,47,48,49,50,52],"tags":[87,127,128,148,149,150,151,155,185,187,271,277],"class_list":["post-1903","post","type-post","status-publish","format-standard","hentry","category-dev","category-eclipse-ide","category-html5","category-hypervisors","category-internet","category-linux","category-linux-distribution","category-technical","category-tech","category-virtualbox","category-virtualization","category-vmware","category-vmware-player","category-windows-10","category-windows-11","category-xampp","tag-command-to-generate-ssh-keys-in-windows","tag-generate-ssh-keys","tag-generate-ssh-keys-in-windows","tag-laravel","tag-laravel-php-web-development","tag-laravel-web-development","tag-laravel-web-development-coding","tag-linux","tag-php-development","tag-php-web-development","tag-web-development","tag-windows-11"],"_links":{"self":[{"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/posts\/1903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/comments?post=1903"}],"version-history":[{"count":0,"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/posts\/1903\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/media?parent=1903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/categories?post=1903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leonidassavvides.com\/blog\/wp-json\/wp\/v2\/tags?post=1903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}