This repository has been archived by the owner on May 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Mac Developer Quick Start
DC edited this page Nov 18, 2013
·
13 revisions
You'll need Homebrew.
Once you have that, here's a script that sets up MySQL and other dependencies.
Finally, head back to Developer Quick Start to compile and run Scramble.
#!/bin/bash
set -e
# Install MySQL
echo "Installing MySQL. Better have Homebrew!"
brew update
brew install mysql
unset TMPDIR
mysql.server start
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
# Set up MySQL locally
# (By default, MySQL only accepts connections from localhost.
# Do NOT allow outside connections unless you've locked it down first.)
# Make a user `scramble` and corresponding DB.
echo "Creating MySQL user 'scramble' and database 'scramble', password 'scramble'..."
(
echo "create database if not exists scramble;"
echo "grant all on scramble.* to scramble@localhost identified by 'scramble';"
echo "flush privileges;"
) | mysql -u root
# Install and configure some dependencies.
brew install markdown go git hg
echo "export GOPATH=$HOME/go" >> ~/.bashrc
source ~/.bashrc