Skip to content

Instantly share code, notes, and snippets.

@finger-berlin
Forked from FrancisVarga/setup_macosx.sh
Created February 18, 2012 20:28
Show Gist options
  • Save finger-berlin/1860929 to your computer and use it in GitHub Desktop.
Save finger-berlin/1860929 to your computer and use it in GitHub Desktop.
setup a virgin mac osx
#!/bin/bash
function test_setup () {
PASS=1
for b in \
/usr/bin/ruby \
/usr/bin/make \
/usr/bin/gcc
do
echo -n "check for '$b'..."
if [ -f $b ]
then echo OK
else echo ERR ; PASS=0
fi;
done
if [ $PASS == 1 ]
then true
else exit
fi
}
function setup_brew () {
if [ -f /usr/local/bin/brew ]
then true
else /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
fi
}
#####
sudo true || exit
test_setup
setup_brew
brew update
brew upgrade
brew install wget
brew install findutils
brew install pwgen
brew install nmap
brew install git
brew install git-extras
brew install git-flow
brew install git-multipush
brew install git-utils
brew install mysql
if [ -f /etc/my.cnf ]
then echo "check if /etc/my.cnf fit your need!"
else
MY_CNF=https://raw.github.com/gist/1869325/my.cnf
sudo wget $MY_CNF -O /etc/my.cnf
fi
if [ -d /usr/local/var/mysql/performance_schema ];
then true # mysql looks fine...
else
mysql_install_db --verbose --user=`whoami` \
--basedir="$(brew --prefix mysql)" \
--datadir="$(brew --prefix)/var/mysql" \
--tmpdir=/tmp
fi
brew install libxml2
brew install mcrypt
wget https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb -O /usr/local/Library/Formula/php.rb
wget https://raw.github.com/finger-berlin/brew-formulas/master/libcouchbase.rb -O /usr/local/Library/Formula/libcouchbase.rb
wget https://raw.github.com/finger-berlin/brew-formulas/master/libvbucket.rb -O /usr/local/Library/Formula/libvbucket.rb
wget https://github.com/finger-berlin/brew-formulas/blob/master/php-memcached.rb -O /usr/local/Library/Formula/php-memcached.rb
brew install libvbucket
brew install libcouchbase
brew install php --with-fpm --with-mysql
brew install nginx
brew instell php-memcached
exit
@finger-berlin
Copy link
Author

to setup/install:

wget https://gist.github.com/gists/1860929/download -O setup_brew.sh
sh setup_brew.sh

done...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment