1, composer Chinese network: https://www.phpcomposer.com/
Laravel Chinese web: https://d.laravel-china.org/
2, composer is the role is to give your project management dependencies, install PHP package, without manual, Laravel and Yii framework also through its installation, requires PHP version 5.23+,
3. Download under Linux:
Curl-ss Https://getcomposer.org/installer | Php
Get a Composer.phar, use PHP Composer.phar to see if you can work
4, Composer.phar can work properly move it to/usr/local/bin/, remove the suffix. Phar, you can use it anywhere. (Global recommendation)
MV Composer.phar/usr/local/bin/composer
5. Composer Usage: In the project root directory, Build a Composer.json file, composer Management relies on it, such as to build a project under the WWW app, the project to use the Monolog package, as long as the app under the Declaration of dependencies, that is, the establishment of a Composer.json folder, the content is: require a The package name (for example monolog/monolog ) is mapped to an object of the package version (for example 1.0.* ), and then the install dependency package is executed.
cat>composer.json<<eof{ "require": { " Monolog/monolog " " 1.0.* " }}eof
Composer Install
6, if the download is very slow or other problems, look at the global configuration of [Repositories.packagist.org.url], if it is packagist.org, then replace the domestic. If the error looks 10
Composer Config-l
Composer Config Repo.packagist composer https://packagist.phpcomposer.com
7, if just install a package or update a package, composer also has the command can be solved, the command detailed see 1 or input composer also have, the result and 5, the same, Eventually, files such as Composer.json are generated, and the dependencies are installed in the vendor directory
8, composer installation Laravel framework: Laravel framework for the PHP version is required, laravel5+ need php5.3.9+
9. Install and create laravel5.2*
Composer Create-project Laravel/laravel App 5.2.*
10, encountered the problem: Follow the procedure red hints as follows, meaning that PHP disabled proc_open
[symfony\component\Process\exception\runtimeexception] Process class relies on Proc_open, which are not available on your PHP installation.
Workaround: Go to/usr/local/php/etc/Edit php.ini config file, find disable_functions, put proc_open,proc_close,proc_nice,proc_terminate , Leak,proc_get_status,putenv Open
11, the installation of Laravel after the completion of access to localhost/app/public/index.php, the failure to handle the error
Workaround: Enable the server to write permissions to the storage directory and vendor directory under Laravel
Chmod-r 777 Storage&&chmod-r 777 Vendor
12, refresh, appear laravel greeting page
Linux under Composer+laravel essay