Improved installation instructions
I managed to get the install line down to a one-liner.
This commit is contained in:
parent
e1d82cde79
commit
2b4f9e45b2
99
README.md
99
README.md
@ -116,51 +116,32 @@ Max Howell -- <http://twitter.com/mxcl>
|
|||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
Homebrew requires no setup, but almost everything it installs is built from
|
Homebrew is pretty flexible in how it can be installed and used. What follows
|
||||||
source; so you need Xcode:
|
are probably the simplest methods.
|
||||||
|
|
||||||
<http://developer.apple.com/technology/xcode.html>
|
Download
|
||||||
|
--------
|
||||||
|
mkdir homebrew
|
||||||
|
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew
|
||||||
|
|
||||||
Many build scripts assume MacPorts or Fink on OS X. Which isn't too much of a
|
Homebrew can already be used, try it:
|
||||||
problem until you uninstall them and stuff you built with Homebrew breaks. So
|
|
||||||
uninstall them (if you prefer, renaming their root folders is sufficient).
|
|
||||||
|
|
||||||
<http://trac.macports.org/wiki/FAQ#uninstall>
|
homebrew/bin/brew install git
|
||||||
<http://www.finkproject.org/faq/usage-fink.php#removing>
|
homebrew/bin/brew list git
|
||||||
|
|
||||||
Now, download Homebrew:
|
Notice how Homebrew installed Git to homebrew/bin/git. Homebrew never touches
|
||||||
|
files outside its prefix.
|
||||||
|
|
||||||
git clone git://github.com/mxcl/homebrew.git
|
Installing to /usr/local
|
||||||
|
------------------------
|
||||||
|
We think /usr/local is the best location for Homebrew because:
|
||||||
|
|
||||||
If this leaves you shaking your head because you are installing Homebrew
|
1. It's already in your PATH
|
||||||
*in order to* install git, then try [this installer script][sh] or [this
|
2. Other software checks /usr/local for stuff (eg. RubyGems)
|
||||||
.pkg installer][pkg]. Note these are somewhat new and are not stamped
|
3. Building your own software is easier when dependencies are in /usr/local
|
||||||
"definitely works" yet.
|
|
||||||
|
|
||||||
[sh]: http://gist.github.com/203926
|
But… don't sudo!
|
||||||
[pkg]: http://demaree.me/x/7
|
----------------
|
||||||
|
|
||||||
Homebrew is self-contained so once you've put it somewhere, it's ready to go.
|
|
||||||
Copy this directory anywhere you like. But we recommend installing to
|
|
||||||
/usr/local because:
|
|
||||||
|
|
||||||
1. It is already in your path
|
|
||||||
2. Build scripts always look in /usr/local for dependencies so it makes it
|
|
||||||
easier for you personally to build and install software
|
|
||||||
|
|
||||||
You can move the location of Homebrew at a later time, although this *will*
|
|
||||||
break some tools because they hardcode their installtion prefixes into their
|
|
||||||
binaries. Homebrew does make more effort than competing solutions to prevent
|
|
||||||
this though.
|
|
||||||
|
|
||||||
Finally, if you don't install to /usr/local, you have to add the following to
|
|
||||||
your ~/.profile file:
|
|
||||||
|
|
||||||
export PATH=`brew --prefix`/bin:$PATH
|
|
||||||
export MANPATH=`brew --prefix`/share/man:$MANPATH
|
|
||||||
|
|
||||||
Don't sudo
|
|
||||||
----------
|
|
||||||
Well clearly you can sudo if you like. Homebrew is all about you doing it your
|
Well clearly you can sudo if you like. Homebrew is all about you doing it your
|
||||||
way. But the Homebrew recommendation is: don't sudo!
|
way. But the Homebrew recommendation is: don't sudo!
|
||||||
|
|
||||||
@ -180,26 +161,39 @@ installing anything system-critical. Apple already did that.
|
|||||||
|
|
||||||
Let this be the last sudo you do for quite some time:
|
Let this be the last sudo you do for quite some time:
|
||||||
|
|
||||||
sudo chown -R `whoami`:staff `brew --prefix`
|
sudo chown -R `whoami` /usr/local
|
||||||
|
|
||||||
I already have a bunch of junk in /usr/local
|
But! I already have a bunch of junk in /usr/local
|
||||||
--------------------------------------------
|
-------------------------------------------------
|
||||||
The easiest thing to do is just git clone into /usr/local. The files that are
|
Homebrew can co-exist with any software already installed in its prefix.
|
||||||
there can remain there, Homebrew will never touch them.
|
|
||||||
|
Installing to /usr/local
|
||||||
|
------------------------
|
||||||
|
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
|
||||||
|
|
||||||
|
You may prefer this third party [installer script][sh] or [.pkg installer][pkg].
|
||||||
|
|
||||||
|
Using git to install
|
||||||
|
--------------------
|
||||||
|
If you already have git installed then this is the easiest way to install:
|
||||||
|
|
||||||
cd /usr/local
|
cd /usr/local
|
||||||
git init
|
git init
|
||||||
git remote add origin git://github.com/mxcl/homebrew.git
|
git remote add origin git://github.com/mxcl/homebrew.git
|
||||||
git pull origin master
|
git pull origin master
|
||||||
|
|
||||||
Otherwise, delete everything and reinstall with Homebrew. Or merge it in two
|
Building Stuff
|
||||||
steps by hand.
|
--------------
|
||||||
|
Almost everything Homebrew installs is written in C, so you need Xcode:
|
||||||
|
|
||||||
How about mate and gitx and that?
|
<http://developer.apple.com/technology/xcode.html>
|
||||||
---------------------------------
|
|
||||||
These tools install from TextMate and GitX into /usr/local/bin. They (and
|
Many build scripts assume MacPorts or Fink on OS X. Which isn't too much of a
|
||||||
other similar tools) can co-exist with Homebrew without requiring further
|
problem until you uninstall them and stuff you built with Homebrew breaks. So
|
||||||
effort from yourself.
|
uninstall them (if you prefer, renaming their root folders is sufficient).
|
||||||
|
|
||||||
|
<http://trac.macports.org/wiki/FAQ#uninstall>
|
||||||
|
<http://www.finkproject.org/faq/usage-fink.php#removing>
|
||||||
|
|
||||||
|
|
||||||
Uninstallation
|
Uninstallation
|
||||||
@ -207,8 +201,7 @@ Uninstallation
|
|||||||
cd `brew --prefix`
|
cd `brew --prefix`
|
||||||
rm -rf Cellar
|
rm -rf Cellar
|
||||||
brew prune
|
brew prune
|
||||||
rm -rf Library .git
|
rm -rf Library .git* bin/brew README.md
|
||||||
rm bin/brew .gitignore README.md
|
|
||||||
|
|
||||||
It is worth noting that if you installed somewhere like /usr/local then these
|
It is worth noting that if you installed somewhere like /usr/local then these
|
||||||
uninstallation steps will leave that directory exactly like it was before
|
uninstallation steps will leave that directory exactly like it was before
|
||||||
@ -319,3 +312,5 @@ FAQ
|
|||||||
|
|
||||||
[wiki]: http://wiki.github.com/mxcl/homebrew
|
[wiki]: http://wiki.github.com/mxcl/homebrew
|
||||||
[github-gem]: http://github.com/defunkt/github-gem
|
[github-gem]: http://github.com/defunkt/github-gem
|
||||||
|
[sh]: http://gist.github.com/203926
|
||||||
|
[pkg]: http://demaree.me/x/7
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user