Brew World
In the Linux world, we normally have tools to install software. In Debian we have dpkg, in Ubuntu distros it is apt-get, in Redhat based distros it’s yum.
All nice but when we are given a MacBook Pro to work on in web development we don’t have any of them. Also happens that in the Mac world many software can be installed via GUI but some don’t.
MacOS counts with MacPorts but in many articles you’ll found out that Homebrew is favoured over MacPorts. That’s why Homebrew have a section this handbook.
Homebrew
Homebrew is a package manager for the macOS operating system. It’s easy to install and use.
To install run this script in a terminal window:
1 $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/\
2 master/install)"
To verify it installed run:
1 $ brew help
Install X with Brew
Let’s see how to install some popular software using Homebrew in MacOS.
RVM dependencies
The Ruby Version Manager need many dependencies to be installed. Usually, the command rvm requirements would take care but when not you can install many of its dependencies as follows:
1 $ brew install autoconf
2 $ brew install automake
3 $ brew install libtool
4 $ brew install apple-gcc42
5 $ brew install libyaml
6 $ brew install libxslt
7 $ brew install libksba
8 $ brew install openssl
htop
htop is top on stereoids. Definetely, a most for the lovers of termianl process viewers.
To install with Brew just:
1 $ brew install htop
PostgreSQL
The popular database can also be installed with Homebrew with just one command:
1 $ brew install postgresql
Redis
The popular datastore for caches and more can be installed pretty easily:
1 $ brew install redis
WKHTMLTOPDF
A powerful open-source software to generate PDF documents from HTML ones.
In MacOS can be installed using Homebrew:
1 $ brew install wkhtmltopdf
jq
Not to be confused with the JavaScript library jQuery. jq is a software that simplifies handling JSON data in the command line.
1 $ brew install jq
It’s very powerful and in this gist you can see how I used to process some JSON from AWS Code Deploy service.
Pandoc
Not so DevOps related but one of the tools I used to build this ebook is Pandoc. A very powerful, cross-platform software to generate any kind of document from any kind of document.
In MacOS can be installed as follows:
1 $ brew install pandoc