This option will remove MySQL and install MariaDB.I wanted a drop-dead simple way to try and replicate a problem someone was having on the Slim forums. If you prefer to use MariaDB instead of MySQL, you may add the mariadb option to your Homestead.yaml file. Remember, you will still need to add an /etc/hosts file entry for homestead.app or the domain of your choice. Next, run the vagrant up command in your terminal and access your project at in your browser. Mac / Linux: php vendor/bin/homestead make The make command will automatically configure the sites and folders directives in the Homestead.yaml file. Once Homestead has been installed, use the make command to generate the Vagrantfile and Homestead.yaml file in your project root. To install Homestead directly into your project, require it using Composer: composer require laravel/homestead -dev ![]() Installing Homestead per project may be beneficial if you wish to ship a Vagrantfile with your project, allowing others working on the project to simply vagrant up. Instead of installing Homestead globally and sharing the same Homestead box across all of your projects, you may instead configure a Homestead instance for each project you manage. ![]() To destroy the machine, you may use the vagrant destroy -force command. Vagrant will boot the virtual machine and automatically configure your shared folders and Nginx sites. Once you have edited the Homestead.yaml to your liking, run the vagrant up command from your Homestead directory. Once you have added the domain to your hosts file and launched the Vagrant box you will be able to access the site via your web browser: Make sure the IP address listed is the one set in your Homestead.yaml file. The lines you add to this file will look like the following: 192.168.10.10 homestead.app ![]() On Windows, it is located at C:\Windows\System32\drivers\etc\hosts. On Mac and Linux, this file is located at /etc/hosts. The hosts file will redirect requests for your Homestead sites into your Homestead machine. You must add the "domains" for your Nginx sites to the hosts file on your machine. If you change the sites property after provisioning the Homestead box, you should re-run vagrant reload -provision to update the Nginx configuration on the virtual machine. Homestead can serve as a convenient, virtualized environment for every Laravel project you are working on: sites: Again, you may add as many sites to your Homestead environment as necessary. A sample site configuration is included in the Homestead.yaml file. The sites property allows you to easily map a "domain" to a folder on your Homestead environment. You may also pass any options supported by Vagrant's Synced Folders by listing them under the options key: folders: ![]() This plug-in will maintain the correct user / group permissions for files and directories within the Homestead box. When using NFS, you should consider installing the vagrant-bindfs plug-in. Homestead runs on any Windows, Mac, or Linux system, and includes the Nginx web server, PHP 7.1, MySQL, Postgres, Redis, Memcached, Node, and all of the other goodies you need to develop amazing Laravel applications. If something goes wrong, you can destroy and re-create the box in minutes! No more worrying about messing up your operating system! Vagrant boxes are completely disposable. Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine. Vagrant provides a simple, elegant way to manage and provision Virtual Machines. Laravel strives to make the entire PHP development experience delightful, including your local development environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |