-
Book Overview & Buying
-
Table Of Contents
Angular for Enterprise-Ready Web Applications - Second Edition
By :
Installing software through a Graphical User Interface (GUI) is slow and challenging to automate. As a full-stack developer, whether you're a Windows or a Mac user, you must rely on Command-Line Interface (CLI) package managers to efficiently install and configure the software you depend on.
Remember, anything that can be expressed as a CLI command can also be automated.
Chocolatey is a CLI-based package manager for Windows that can be used for automated software installation. To install Chocolatey on Windows, you need to run an elevated command shell:
PowerShellPS> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco
Figure 2.1: Successful installation of Chocolatey
All subsequent Chocolatey commands must also be executed from an elevated command shell. Alternatively, it is possible to install Chocolatey in a non-administrator setting that doesn't require an elevated command shell. However, this results in a non-standard and less secure development environment, and certain applications installed through the tool may still require elevation.
Scoop is an alternative to Chocolatey that provides a more Unix-like experience. If you prefer Unix-style tools and commands, you can install Scoop at https://scoop.sh/ or by executing:
$ iwr -useb get.scoop.sh | iex
For more information on Chocolatey, refer to https://chocolatey.org/install.
Homebrew is a CLI-based package manager for macOS that can be used for automated software installation. To install Homebrew on macOS, you need to run a command shell:
+ Spaceterminal$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew
Figure 2.2: Successful installation of Homebrew
$ brew tap caskroom/cask
On macOS, if you run into permissions issues while installing brew packages, related to chown'ing /usr/local, you need to execute the sudo chown -R $(whoami) $(brew --prefix)/* command. This command reinstates user-level ownership to brew packages, which is more secure than broad superuser/su-level access.
For more information, check out https://brew.sh/.