Skip to content

Instantly share code, notes, and snippets.

@CatinhoCR
Created July 18, 2020 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CatinhoCR/0d86c22c1e9f2009a7b604c0e16f0198 to your computer and use it in GitHub Desktop.
Save CatinhoCR/0d86c22c1e9f2009a7b604c0e16f0198 to your computer and use it in GitHub Desktop.
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 https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

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)[https://getcomposer.org/download/] Basically 4 lines, at time of creation of this are:

php -r "copy('https://getcomposer.org/installer', '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)[https://laravel.com/docs/7.x/valet]

composer global require laravel/valet
valet install

6 MySQL

brew install mysql@5.7
brew services start mysql@5.7

7. Node

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