liveBook · Manning

Chapter 3: Installing and setting up Ollama

What you will learn in chapter 3 of Build Applications with Local AI Models on a Mac

Introduces Ollama as the tool for downloading and running large language models directly on a Mac, while previewing the chapter’s setup steps.

After this chapter you will be able to

What it builds on

Section by section

Introduction

Introduces Ollama as the tool for downloading and running large language models directly on a Mac, while previewing the chapter’s setup steps.

Key terms: Ollama, large language models (LLMs)

3.1 What is Ollama?

This section explains that Ollama runs AI models stored on your computer and gives you offline access to them.

Key terms: Ollama, runtime, large language models, model file, offline access, open source models, cloud server, own hard drive

3.1.1 Why Ollama?

This section explains why Ollama is a practical choice for running local LLMs: simple commands, model management, Apple Silicon performance, code access, and privacy.

Key terms: ollama pull, ollama run, model management, Apple Silicon, M-series chips, API access, programming interface, Privacy

3.1.2 How Ollama works

Explains how Ollama waits for requests, generates responses on the Mac, and keeps that processing local.

Key terms: server process, requests, model, CPU, GPU, Neural Engine, Your Mac, internet

3.2 Cloud AI vs. local AI with Ollama

The section contrasts cloud AI’s server-based data flow with local AI on your machine and explains why Ollama suits the book’s hands-on work.

Key terms: cloud AI, local AI, prompt, model, response, private work, experimentation, application building

3.3 Installing Ollama

3.3.1 Step 1: Update Homebrew

3.3.2 Step 2: Install Ollama

This subsection describes installing Ollama with one command and explains why the book recommends Homebrew over the macOS desktop download.

Key terms: Ollama, AI runtime, installation command, Homebrew, macOS desktop application, brew upgrade ollama

3.3.3 Step 3: Verify the installation

This section presents a command-based check of the Ollama installation and an alternative way to view its details through Homebrew.

Key terms: Ollama installation, Homebrew

3.4 Starting the Ollama service

This section explains why the Ollama service must be running before a model can receive requests.

Key terms: Ollama service, foreground server process, requests

3.4.1 Starting the service

This subsection shows how to start the Ollama service, recognize that it is listening for requests, and keep it running while using another terminal window.

Key terms: ollama serve, terminal window, Ollama service, listening on 127.0.0.1:11434, localhost, port number

3.4.2 Verifying the service

This section presents two ways to check Ollama and distinguishes binary access from a live service health check.

Key terms: Ollama binary, health check, service

3.4.3 What happens at startup

Explains the startup sequence when `ollama serve` begins accepting requests.

Key terms: ollama serve, GPU, Neural Engine, port 11434

3.4.4 Stopping the service

This section shows how to stop the Ollama service and confirm that it has stopped.

Key terms: Ollama service, Ctrl-C, http://localhost:11434

3.4.5 Troubleshooting common problems

This section explains how to recognize and fix three common problems when starting or accessing Ollama.

Key terms: address already in use, Activity Monitor, pkill ollama, command not found, brew link ollama, symbolic link, unable to connect, ollama serve, Ollama desktop app

3.5 Exercises

3.6 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 2: Installing and using Homebrew Chapter 4: Downloading an LLM and having your first conversation →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.