Skip to content

Instantly share code, notes, and snippets.

@malinky
Last active August 29, 2015 14:22
Show Gist options
  • Save malinky/596d49c504eb4db8e600 to your computer and use it in GitHub Desktop.
Save malinky/596d49c504eb4db8e600 to your computer and use it in GitHub Desktop.
Install Composer and Laravel
# Install composer. Moving to /usr/local/bin/composer means it can now be run as composer COMMAND rather php composer.phar COMMAND
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
# Download Laravel installer.
composer global require "laravel/installer=~1.1"
# Add to $PATH https://gist.github.com/malinky/e7fb7e4a757c4bbd5acc
~/.composer/vendor/bin
# Can now create projects with
laravel new blog
# Instead of
composer create-project laravel/laravel --prefer-dist
# Note if running php through xampp etc then ensure the $PATH in ~/.bash_profile has a reference to the xampp install first.
# This makes sure composer uses that php rather than the OSX installed one.
# Avoids the mcrypt issue.
# Example $PATH export PATH=/Applications/XAMPP/xamppfiles/bin:$PATH:~/.composer/vendor/bin
# http://laravel.io/forum/02-08-2014-difficulty-installing-laravel-getting-error-mcrypt-php-extension-required?page=1
# Can test this in terminal with
which php
php -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment