Linux is a wonderful operating system that has many useful applications and utilities. Most of them are not bundled with macOS, which is a real shame.
If you are a web developer then you may be aware of the web serving applications, such as Nginx and Apache. Between these two web servers, they host some of the largest websites in the world.
macOS currently has Apache 2.4 builtin from when the feature “Web Sharing” was available. However, I would stay away from builtin applications like Apache, because Apple could easily remove it in a future update.
Linux Apps on macOS
If using a Mac computer, then by default installing these Linux applications can be fraught with challenges. You have to compile and install the application that you want. However, you also need to download and install all the dependencies to allow the application to compile.
Steps to Manually Compile an Application
- Download a compiler
- Download the application source code
- Check for any dependencies
- Compile and install the dependencies
- If those dependencies had dependencies then compile them
- Compile and install the application
Any of those steps could cause errors.
Automatically Installing Applications
In the world of Linux, there are package managers that handle the process of installing these applications, as well as all of their dependencies. The package manager for Ubuntu is called APT.
There are a few package managers available for macOS. The package manager that I’m going to talk about is called Homebrew. Homebrew is often abbreviated to brew.
Brew has been described at the missing package manager for the macOS.
With Brew, you have the ability to easily install packages available for Linux, right onto your Mac with one brew command. You will be able to install great programs, like Apache, Nginx, PHP and Python.
Using brew will give you the ability to replace the out-of-date application and commands that Apple supplies with its operating system to the latest version. The original programs will still exist, in case Apple make changes to them. You will have your own version of them installed as well.
It only takes a couple of terminal commands to have brew installed on your computer.