Skip to content

Instantly share code, notes, and snippets.

Created July 18, 2020 23:06
What would you like to do?
Quick Mac Web Development Environment Setup with Brew, Node, PHP, Composer, MySQL and Valet.

Use to easily setup your macbook's environment

1. Install Homebrew

/bin/bash -c "$(curl -fsSL"

If Xcode is not installed, you'll be prompted to install it. Go.

2. GIT

brew update
brew install git

3. PHP

brew install php

4. Composer

See (Here)[] Basically 4 lines, at time of creation of this are:

php -r "copy('', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer

Make sure to include composer into your path either ~/.bash_profile or ~/.zhc... That will probably look something like this:

nano ~/.bash_profile

export PATH="$HOME/.composer/vendor/bin:$PATH" and save the file. Either source it, or close and re-open your terminal. Test installation with composer --help.

5. Valet

Install Laravel's Valet, this is quick and painless setup. See for (reference)[]

composer global require laravel/valet
valet install


brew install mysql@5.7
brew services start mysql@5.7

7. Node


brew install node

And that's it. A basic env setup painless and quickly. Intended for personal and team's use mostly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment