A Before installing composer, make sure that you have PHP installed on your machine and that you can execute commands through PHP. Use PHP–V test of course to use PHP directly also need to determine that the PHP command has been set in the global command, otherwise you need to add path/usr/local/php/bin/php–v (this is my installation path). There are some requirements for installing composer in Chinese network: http://docs.phpcomposer.com/
For ease of use, we first set PHP as a global command:
Modify the/etc/profile file to take effect permanently and take effect for all system users, adding the following two lines of code at the end of the file:
Path= $PATH:/usr/local/php/bin//php Command path
Export PATH
If you want to join MySQL at the same time the first sentence:
Path= $PATH:/usr/local/php/bin:/usr/local/mysql/bin//path must be correct
Last: Execute command source/etc/profile or execution Point command./profile to make the changes take effect.
Note: If the/etc/profile modification produces an error that will cause the command to not be used including VI LS or even reboot, then a
/usr/bin/vim/etc/profile in this way to get the wrong change over.
Two Local Installation
The local installation is to install the composer under the current directory (for example, under the project root), and then you can use the composer via PHP Composer.phar.
Linux system: Curl-ss Http://install.phpcomposer.com/installer | Php
Or: Php-r "ReadFile" (' Http://install.phpcomposer.com/installer '); "| Php
Three Global Installation
In the Linux system: just copy/usr/local/composer.phar to/usr/local/bin/under the name composer can be
Cp Composer.phar/usr/local/bin/composer
Run PHP composer.phar-v or composer-v (local and global commands)
This explanation appears to have succeeded ...
When using composer update times wrong:
It means that you cannot use the root update to change to another user.
Use composer to install Laravel error:
It means that you cannot use the root update to change to another user.
Use composer to install Laravel error:
The possible reason is that the composer installation package URL is caused by a foreign mirror, is blocked by the firewall, should be the installation timeout caused an error
Resolution: Composer Config-g Repo.packagist composer https://packagist.phpcomposer.com
According to the web said this can change the installation package of the global mirror URL, and then perform your operation.
and the error:
Solve:
It can be seen from the error that some features are disabled (or not installed).
Open php.ini and search the disable_functions command for something similar to the following:
Disable_functions = Passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_get_status,popen,ini_alter, Ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
Find Proc_open and Proc_get_status and delete them.
Similar to the above error, the treatment method ditto