Official document address: http://www.golaravel.com/docs/4.1/introduction/
System environment Mac OSX 10.9.2
Upgrade php
- brew update
- brew upgrade
- brew tap homebrew/dupes
- brew tap josegonzalez/homebrew-php
- brew install php55
-
Copy code
Install composer
- https://getcomposer.org/doc/00-intro.md#globally-on-osx-via-homebrew-
-
Copy code
Install php55-mcrypt
(Access the routing address after startup, if prompted Mcrypt PHP extension required)
- 1.Mac brew install php55-mcrypt
-
- 2.XAMPP I didn’t encounter that prompt, everything is normal. php -i | grep mcrypt is shown as enabled
-
Copy code
Configure php.ini
- extension=php_openssl.dll
-
Copy code
Create a new project
- composer create-project laravel/laravel demo
-
Copy code
Configure /etc/hostsPersonal preference)
- 127.0.0.1 localhost
- 127.0.0.1 laravel.dev
-
Copy code
Configuration /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
- ServerAdmin qbylucky@gmail.com
- DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/demo/public"
- ServerName laravel.dev
- ServerAlias laravel.dev
- ErrorLog "logs/qbyluck y @gmail.com-error_log"
- CustomLog "logs/qbylucky@gmail.com-access_log" common
-
Copy code
Startup project
Enable XAMPP apache server http://laravel.dev/
Knowledge points
- php location:
- 1.Mac /usr/bin/php
- 2.XAMPP /Applications/XAMPP/xamppfiles/bin/php
-
- php.ini location:
- 1.Mac /etc/php.ini
- 2.
-
Laravel
|