I have been trying to set up Laravel Homestead Environment on a local machine. But I was unable to do it.I faced several errors in the installation process. Actually,I am confused with the installation procedure from configuring the SSH Key in the "homestead.yaml" file step.
In the "homestead.yaml" file,How to configure the authorize and keys components according to my local SSH file location against the standard Absolute Path location?
And what exactly is the use of Composer which is being mentioned as a package managing tool?
Is there a good tutorial out there regarding the installation procedure?
Its the first task in my new job and I am really struggling. Any help is really appreciated.
Thanks, Sri
As you're asking for SSH i assume that you already downloaded Homestead completely (box & clone)and that a Homestead folder is present in you home directory.
First make sure you have Git Bash installed if you're on Windows, Go to your Homestead folder, right click and chose Git Bash then type in this command ssh-keygen -t rsa -C "you@homestead"
this will create an SSH key in your folder.
You have to make sure that the keys are named like id_rsa.pub and id_rsa and place them in C:/Users/{username}/.SSH
if they're somewhere else, install Composer if you don't have yet go to the folder you want laravel to be in, right click use composer here in next window put this command composer create-project laravel/laravel --prefer-dist
For your authorize key path question this is what you need to put in the Homestead.yaml file authorize: C:/Users/{username}/.ssh/homestead_rsa.pub
for the folders :
folders: - map: C:/path/to/{local_laravel_project_folder} to: /home/vagrant/Code type: "nfs" sites: - map: sitename.dev to: /home/vagrant/Code/Laravel/public hhvm: true
Open notebook with administrative rights and go to C:\\Windows\\System32\\drivers\\etc\\hosts
and add this line 192.168.10.10 : sitename.dev save the file, run Homestead then in Bash put this command vagrant up
and you should see the laravel homepage when you visit sitename.dev .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.