This documents outlines the initial steps I take to setup my OSX based system for web development. This setup should provide the underlying systems needed to be able to develop OSX. This setup should work for platforms like Laravel, Angular, Vue, MediaWiki, etc...
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install bash
sudo su
echo /usr/local/bin/bash >> /etc/shells
exit
chsh -s /usr/local/bin/bash
Restart terminal to switch to the new batch and verify that you are on version ^4.*.*
bash --verison
brew install vim
brew install bash-completion
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
brew install git
git config --global color.ui true
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
pbcopy <~/.ssh/id_rsa.pub
brew install php
brew install [email protected]
sudo brew services start php71
vi ~/.bash_profile
Add the following:
# Load php 7.1
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
brew install pcre
brew install composer
brew install php-code-sniffer
(note: you will need to install or build additional php extension depending on your project. Ex: memcached, redis, mcrypt, etc.)
brew install nginx
sudo brew service start nginx
brew install nvm
mkdir ~/.nvm
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
nvm install node
brew install dnsmasq
mkdir -p /usr/local/etc/
echo "address=/.gamepedia.local/127.0.0.1" >> /usr/local/etc/dnsmasq.conf
sudo mkdir -p /etc/resolver
sudo sh -c 'echo "nameserver 127.0.0.1" > /etc/resolver/gamepedia.local'
sudo brew services start dnsmasq
scutil --dns
Should see a resolver for app
...
resolver #8
domain : gamepedia.local
nameserver[0] : 127.0.0.1
flags : Request A records, Request AAAA records
reach : Reachable, Local Address, Directly Reachable Address
ping -c 1 test.gamepedia.local
Should see a successful ping
PING test.app (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.033 ms