Composerinstallation
1, to https://getcomposer.org/download/download composer, directly below download the latest version of the composer compression package, extracted after the Composer.phar, rename composer to be placed under /usr/local/bin/ .
2. Toggle Composer 's Chinese Image: Command line execution
Composer Config-g Repo.packagist composer https://packagist.phpcomposer.com
If this step fails, check that the Composer.phar file name is modified and is placed in the environment variable.
( due to " well-known " network reasons, do not switch intra-country Mirror composer cannot be used )
InstallationLaravel
1, mkdir Create a new directory to Place Laravel
2, CD to the directory to execute
Composer Create-project--prefer-dist Laravel/laravel Blog
if you want to download another version, such as 5.3 version, please do:
Composer Create-project--prefer-dist Laravel/laravel blog 5.3.*
Wait a few minutes for the installation to complete, and if the wait time is too long, check composer whether to switch the domestic mirror.
WillLaravelconfigured toApache:
1. CD to laravel root directory, execute
Set the storage/directory to read/write.
2. Configure Apache 's working directory to ./public , which is The public/under the Laravel root directory , like mine. /home/ubuntu/code/blog/public
3. Open Apache rewrite module, execute:
sudo a2enmod rewrite
And then execute
Restart Apache .
4. Visit localhost to see laravel 's Welcome page:
PS: If the route to '/' normally occurs during the use of Laravel, and the route to another location appears 404, check that the Apache rewrite module is open, as well as in the Apache configuration file:
<Directory/var/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Whether to modify to allowoverride all
Linux Quick Configuration Laravel framework