-
-
Save doncruse/904770 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
# 2011-04-05 | |
# | |
# Mac OS X 10.6.7 | |
# Homebrew 0.8 | |
# Xcode 4.0.1 | |
# Git 1.7.4.3 | |
# Ruby 1.9.2, 1.8.7 | |
# Rails 3.0.5 | |
# RVM 1.5.2 | |
# Passenger 3.0.6 | |
# MySQL 5.5.10 | |
# Memcached | |
# ImageMagick | |
# Make sure you have Snow Leopard | |
# updated to include the Mac App Store | |
# Xcode | |
# If you're a paid Mac or iOS developer, then get your free copy. | |
# Otherwise, it's $4.99 through the Mac App Store. That's a 4.5GB download, | |
# so make some other plans while that downloads. | |
# You need XCode first because it contains the compilers and other | |
# development tools necessary for some of these other steps to work. | |
# Dotfiles | |
# open Terminal.app | |
echo "$(curl -fsS https://gist.github.com/raw/606100/.profile)" > ~/.profile | |
echo "$(curl -fsS https://gist.github.com/raw/606087/.bashrc)" > ~/.bashrc | |
echo "$(curl -fsS https://gist.github.com/raw/606102/.bash_profile)" > ~/.bash_profile | |
echo "$(curl -fsS https://gist.github.com/raw/606107/.gitignore)" > ~/.gitignore | |
echo "$(curl -fsS https://gist.github.com/raw/606105/.rvmrc)" > ~/.rvmrc | |
# Close Terminal window. | |
# Homebrew (package manager that gives you the "brew" command used next) | |
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)" | |
# Git | |
brew install git | |
brew update | |
brew upgrade | |
# RVM (ruby version manager -- you definitely want this) | |
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
# If it's your first install of RVM, you need to edit your bashrc file again | |
# Open Terminal.app | |
# Use a text editor (vim or the like) to open .bashrc | |
# Add this at the end --- substituting your own login name as appropriate: [[ -s "/Users/YOUR_NAME_HERE/.rvm/scripts/rvm" ]] && source | |
"/Users/YOUR_NAME_HERE/.rvm/scripts/rvm" | |
# Now close the terminal app & restart, to reload this configuration file | |
# Now install rubies into RVM, choosing the modern 1.9.2 as the default | |
# (These first two commands take more time than you might expect.) | |
rvm install 1.8.7 | |
rvm install 1.9.2 | |
rvm 1.9.2 --default | |
# Rails - installs rails and all of its dependencies, skipping the doc files | |
gem install rails --no-rdoc --no-ri | |
#### From here down is optional | |
## | |
# Passenger (so rails apps on the local machine behave more like most servers) | |
gem install passenger | |
passenger-install-apache2-module | |
# You'll be prompted by the installer to make some edits to the Apache config file, # which should be at /etc/apache2/httpd.conf on a Mac. You'll need sudo rights to | |
# make edits to that file, so if you're using vim as your editor, invoke it as | |
# sudo vim /etc/apache2/httpd.conf | |
sudo apachectl restart | |
# MySQL (if you like, or choose postgresql) | |
brew install mysql | |
unset TMPDIR | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents | |
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
mysql_secure_installation | |
# Follow instructions | |
# Postgresql (if you prefer, instead of mysql) | |
brew install postgresql | |
# then follow the suggestions for how to configure it | |
# Memcached | |
brew install memcached | |
cp /usr/local/Cellar/memcached/1.4.5/com.danga.memcached.plist ~/Library/LaunchAgents | |
# ImageMagick | |
brew install imagemagick | |
# Reboot. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment