Skip to content

Instantly share code, notes, and snippets.

@ozanyurt
Forked from sr75/osx-homebrew-setup.md
Created January 4, 2016 07:55
Show Gist options
  • Save ozanyurt/f11670d58cf4b5b52bb2 to your computer and use it in GitHub Desktop.
Save ozanyurt/f11670d58cf4b5b52bb2 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