애플에서는 제공하지 않지만, 맥 관련 패키지 관리자를 설치해두시면,
^^ 편리하게 Mac 관련 패키지를 관리하실수 있습니다.
Homebrew 사이트 주소 : http://brew.sh/
Homebrew 한국어 사이트 주소 : http://brew.sh/index_ko.html
Homebrew 설치하기
Mac 터미널에서 다음 명령어를 실행해 줍니다.
1 | ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
wget 설치해주기
1 | brew install wget |
Homebrew는 자신의 디렉토리에 패키지를 설치하고, /usr/local안에 그 파일을 심볼링 링크로 겁니다.
1 2 3 4 5 6 7 8 | $ cd /usr/local $ find Cellar Cellar/wget/ 1.15 Cellar/wget/ 1.15 /bin/wget Cellar/wget/ 1.15 /share/man/man1/wget. 1 $ ls -l bin bin/wget -> ../Cellar/wget/ 1.15 /bin/wget |
Homebrew는 prefix가 붙지 않는 파일은 설치 하지 않지만, 여러분이 원하는 위치 어느곳이든 설치할 수 있습니다.
자신의 Homebrew 패키지를 간편하게 만들 수 있습니다.
1 2 | $ brew create http: //foo.com/bar-1.0.tgz Created /usr/local/Library/Formula/bar.rb |
Homebrew는 모두 git과 ruby기반으로 되어 있어, 여러분이 이미 가진 지식으로 쉽게 수정하거나 업데이트, 병합할 수 있습니다.
1 | $ brew edit wget # opens in $EDITOR! |
Homebrew formula는 간단한 Ruby 스크립트입니다:
1 2 3 4 5 6 7 8 9 10 11 12 | require "formula" class Wget < Formula sha1 "f3c925f19dfe5ed386daae4f339175c108c50574" def install system "./configure" , "--prefix=#{prefix}" system "make" , "install" end end |