"Mac OS" "Valet" Environment configuration

Source: Internet
Author: User

Tags: aries simple pack load background run software naming FSS BSP

What is valet?

Valet is a PHP development environment that provides a super simple Laravel framework for Mac.
In Mac, when you start the machine, valet always runs the PHP built-in Web server in the background and then proxies all requests to the *.dev domain by using Dnsmasq,valet
(Domain names can be viewed or configured by valet domain themselves, not necessarily. Dev) and point to the site where the local machine is installed.

Configuring the Valet development environment

(Installation requirements: Mac OS, 80 ports not occupied by other apps)

1. Install or update homebrew

Install Brew  /usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)" Update Brew Brew Update (note: Homebrew is a package management tool for Mac OS OS, like Yum under CentOS)

2. Install php7.0 and MySQL

Brew Install php70brew install MySQL

3, installation composer

Curl-ss Https://getcomposer.org/installer | PHPMV Composer.phar/usr/local/bin/composer (Note: Composer is a dependency management tool above php5.3. Composer is not a package manager, it involves "packages" and "libraries", but it is managed on a per-project basis and is installed in a directory of the project. )

4. Install the valet and add the valet executable directory to the environment variable

#通过Composer安装Valetcomposer Global require laravel/valet# add environment variable vim ~/.bash_profile will path= "$PATH:/users/ Pxcm-0101-01-0069/.composer/vendor/bin "Export path to write and save # Reload environment variable source ~/.bash_profile

5, configure and install valet and DNSMASQ, register valet background random start

Valet Install

6. Create a Laravel framework project named Laravel

Composer Create-project Laravel/laravel--prefer-dist laravel

7. View Local Valet domain name

Valet domain     (for example, my local domain name is test, you can modify it yourself)

8. See if the valet is configured successfully

Ping Larvel.test    (if the configuration is successful, return the results of 127.0.0.1, or you can view it directly in the browser URL input larvel.test)

"Mac OS" "Valet" Environment configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: