Skip to content

Instantly share code, notes, and snippets.

@rkeppner
Last active June 1, 2017 00:09
Show Gist options
  • Select an option

  • Save rkeppner/1c7409987dee1df92b27 to your computer and use it in GitHub Desktop.

Select an option

Save rkeppner/1c7409987dee1df92b27 to your computer and use it in GitHub Desktop.
Set up Laravel Developer Environment on OS X Yosemite

Set up Laravel Developer Environment on OS X Yosemite

  1. Create SSH key, if needed:
    ssh-keygen -t rsa -C "fname.lname@localhostname"

  2. Install Xcode via the App Store.

  3. xcode-select --install

  4. Install Homebrew:

  • ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew tap homebrew/dupes
  • brew tap homebrew/versions
  • brew tap homebrew/homebrew-php
  • brew install php56
  • brew install composer
  • brew install node
  • brew install ctags
  1. Update system path to prefer Homebrew packages:
  • Add near top of ~/.bashrc file:

    ```bash
    # reorder PATH
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11/bin
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    if [ -d "$HOME/pear/bin" ] ; then
        PATH="$HOME/pear/bin:$PATH"
    fi
    if [ -d "$HOME/.composer/vendor/bin" ] ; then
        PATH="$HOME/.composer/vendor/bin:$PATH"
    fi
    ```
    
  1. Install Gulp:
  • npm install --global gulp
  1. Install VirtualBox and Vagrant:
  • brew cask install virtualbox
  • brew cask install vagrant
  • brew cask install vagrant-manager
  • vagrant box add laravel/homestead
  1. Install and start Laravel Homestead:
  • composer global require "laravel/homestead=~2.0"
  • composer global require "laravel/installer=~1.1"
  • cd ~
  • git clone https://github.com/laravel/homestead.git Homestead
  • cd Homestead
  • bash init.sh
  • homestead edit
    (If needed, change ports in ~/.composer/vendor/laravel/homestead/scripts/homestead.rb file to values not in use.)
  • Add new host to: /etc/hosts
  • homestead up
  • homestead provision
  1. Create new Laravel project:
  • mkdir Code
  • composer create-project laravel/laravel Code/Laravel
  • cd Code/Laravel
  • cp .env.example .env
  • php artisan key:generate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment