macOS Mojave 10.14 - kevyworks
1. Install Homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile
2. Install Essentials
$ brew install git
$ brew install wget
$ brew cask install google-chrome
$ brew cask install firefox
$ brew cask install visual-studio-code
3. Install Node Version Manager
$ mkdir ~/.nvm
$ echo $'\n# NodeJS' >> ~/.bash_profile
$ echo "export NVM_DIR=~/.nvm" >> ~/.bash_profile
$ echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.bash_profile
$ source ~/.bash_profile
$ brew install nvm
$ nvm install --lts && node -v
4. Install PHP, Composer & Valet+
$ brew install php@7.1
$ echo $'\n# PHP' >> ~./bash_profile
$ echo 'export PATH="/usr/local/opt/php@7.1/bin:$PATH"' >> ~/.bash_profile
$ echo 'export PATH="/usr/local/opt/php@7.1/sbin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile
$ brew install composer
$ echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bash_profile
$ source ~/.bash_profile
$ composer global require weprovide/valet-plus
$ valet fix
$ valet install
$ valet use 7.1
Incase you encountered problems while installing php or valet+. Revert PHP by removing all
inside "# PHP" at ~/.bash_profile
file first (e.g.):
# PHP
export PATH="/usr/local/opt/php@7.1/bin:$PATH"
export PATH="/usr/local/opt/php@7.1/sbin:$PATH"
...
Execute below commands to revert, then follow #4 again.
$ brew uninstall php@7.1
$ brew cleanup
$ which php
My .bash_profile
looks like this:
export PATH="/usr/local/sbin:$PATH"
# NodeJS
export NVM_DIR=~/.nvm
source /usr/local/Cellar/nvm/0.33.11/nvm.sh
# PHP
export PATH="/usr/local/opt/php@7.1/bin:$PATH"
export PATH="/usr/local/opt/php@7.1/sbin:$PATH"
export PATH="$PATH:$HOME/.composer/vendor/bin"
If macOS Mojave font appears just too thin for you, below command will fix it. Restart Atom/VSCode and Chrome. Credits: atom/atom#17486 (comment)
$ defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO