Created
March 19, 2010 10:53
-
-
Save rkh/337418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir /usr/local | |
sudo chown -R `whoami` /usr/local | |
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# stolen from http://gist.github.com/265272 | |
set -e | |
localdir=$HOME/.mongodb | |
datadir=$localdir/data | |
conf=$localdir/mongod.conf | |
agentdir=$HOME/Library/LaunchAgents | |
agent=$agentdir/org.mongodb.mongod.plist | |
brew install mongodb | |
mongod=$(which mongod) | |
mkdir -p $datadir | |
mkdir -p $agentdir | |
# daemon configuration | |
echo "dbpath = $datadir | |
# Only accept local connections | |
bind_ip = 127.0.0.1" > $conf | |
# write launchd agent | |
echo "<?xml version='1.0' encoding='UTF-8'?> | |
<!DOCTYPE plist PUBLIC '-//Apple//DTD PLIST 1.0//EN' 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'> | |
<plist version='1.0'> | |
<dict> | |
<key>Label</key> | |
<string>org.mongodb.mongod</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>$mongod</string> | |
<string>run</string> | |
<string>--config</string> | |
<string>$conf</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>KeepAlive</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>$localdir</string> | |
<key>StandardErrorPath</key> | |
<string>$localdir/error.log</string> | |
<key>StandardOutPath</key> | |
<string>$localdir/mongo.log</string> | |
</dict> | |
</plist>" > $agent | |
launchctl load $agent | |
echo "MongoDB should now be running - check its status at http://localhost:28017/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install mysql | |
export ARCHFLAGS="-arch x86_64" | |
launchctl load /usr/local/Cellar/mysql/*/com.mysql.mysqld.plist | |
mysql_install_db | |
launchctl start com.mysql.mysqld | |
rvm ree,1.8.6,1.8.7,1.9.1,1.9.2,rbx-head gem install mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/bin/mysql_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install postgresql | |
export ARCHFLAGS="-arch x86_64" | |
initdb /usr/local/var/postgres | |
launchctl load -w /usr/local/Cellar/postgresql/*/org.postgresql.postgres.plist | |
rvm ree,1.8.6,1.8.7,1.9.1,1.9.2,rbx-head gem install postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install | |
echo 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' >> ~/.bashrc | |
source ~/.rvm/scripts/rvm | |
rvm package install iconv | |
rvm install ree,1.8.6,1.8.7,1.9.1,1.9.2,rbx-head,jruby,macruby,ironruby,maglev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment