Well, these two days are configured under Windows and Linux, and have encountered a lot of problems, so it is all recorded.
Environment: Linux + lampcomposer Installation
Find a directory and execute the command. Download composer file
<textarea class="crayon-plain print-no" style="-moz-tab-size: 4; font-size: 12px ! important; line-height: 15px ! important; z-index: 0; opacity: 0; overflow: hidden;" readonly="" data-settings="dblclick">curl-ss Https://getcomposer.org/installer | php</textarea>
1 |
Curl -ss https://getcomposer. Org/installer | php |
Then copy the downloaded file Composer.phar to the/usr/local/bin directory, so you can use it globally.
The manual said to run the composer command directly, but I always feel wrong ah, use it is not right, anyway to lose command should be used Composer.phar
Laravel Installation
First, install the Laravel installer using composer
<textarea class="crayon-plain print-no" style="-moz-tab-size: 4; font-size: 12px ! important; line-height: 15px ! important; z-index: 0; opacity: 0; overflow: hidden; height: 15px;" readonly="" data-settings="dblclick">composer global require "Laravel/installer"</textarea>
1 |
Composer Global require "Laravel/installer" |
Then add it to the system path cp composer.phar /usr/local/bin/composer
, adding the following code at the bottom of the/etc/profile:
<textarea class="crayon-plain print-no" style="-moz-tab-size: 4; font-size: 12px ! important; line-height: 15px ! important; z-index: 0; opacity: 0; overflow: hidden;" readonly="" data-settings="dblclick">export path= "/root/.composer/vendor/bin: $PATH"</textarea>
1 |
Export PATH="/root/.composer/vendor/bin: $PATH" |
And then executesource /etc/profile
After execution laravel
, if a help prompt appears, the installation is successful
Mac iOS install PHP framework laravel and version control tools git