Mac 环境配置
创建日期:2015-02-23 02:21

开发软件

Composer

安装

curl -sS https://getcomposer.org/installer | php

设置为全局

mv composer.phar /usr/local/bin/composer

参考

https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx

Laravel

安装

composer global require "laravel/installer=~1.1"

依赖

PHP >= 5.4
MCrypt PHP 扩展

参考

http://v4.golaravel.com/docs/4.2/installation#install-composer

PATH设置

设置用户级环境变量,修改 ~/.bash_profile

export PATH=${PATH}:~/.composer/vendor/bin

使环境变量生效

source ~/.bash_profile

PHP修改

借用MAMP的PHP

mv /usr/bin/php /usr/bin/php.old
ln -s /Applications/MAMP/bin/php/php5.6.2/bin/php /usr/bin/php

依赖

MAMP php5.6.2