Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Joseworks
Forked from sr75/osx-homebrew-setup.md
Created December 27, 2015 21:01
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 Joseworks/489e604773df265744a1 to your computer and use it in GitHub Desktop.
Save Joseworks/489e604773df265744a1 to your computer and use it in GitHub Desktop.
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2

Recommended to download iTerm2 and use in place of the default Terminal.app that comes with OSX.

Xcode

First you'll need to install Xcode from the App Store.

After Xcode is installed you can proceed with the following terminal commands:

sudo xcodebuild -license
sudo xcode-select --install ## not needed, if you've updated/installed latest XCode

Homebrew

Homebrew permissions needed:

## (Change the group of homebrew installation directory)
sudo chgrp -R admin /usr/local
## (Allow group members to write inside this directory)
sudo chmod -R g+w /usr/local
## (Create homebrew cache directory)
sudo mkdir -p /Library/Caches/Homebrew
## (Change the group of homebrew cache directory)
sudo chgrp -R admin /Library/Caches/Homebrew
## (Allow group members to write inside this directory)
sudo chmod -R g+w /Library/Caches/Homebrew

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install the following:

brew install bash-completion
brew install git
brew tap homebrew/dupes
brew install libxml2 libxslt libiconv autoconf automake libtool \
pkg-config libyaml readline libksba openssl
curl -L https://get.rvm.io | bash -s stable
# close terminal sessions, create a new terminal session then...
rvm autolibs homebrew
rvm requirements
brew update && brew upgrade && brew cleanup --force && brew prune && brew doctor

Ready to brew?

If no errors, you may want to install these:

brew install autoconf automake bash-completion cmake \
imagemagick jpeg \
libgpg-error libiconv libksba libpng libtool libxml2 \
libxslt libyaml node openssl \
readline tree
## memcached
brew install libevent memcached

Graphviz

brew install gts librsvg freetype
brew install graphviz --with-bindings --with-freetype --with-librsvg --with-pangocairo

MySQL

Setup/Configure mysql:

brew install mysql
brew info mysql
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Test connection:

mysql -uroot

Redis

Setup/Configure redis:

brew install redis
brew info redis
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment