Ollama Installation for macOS, Linux, and Windows
Full Ollama installation instruction can be found at Ollama. Bellow you have links to the macOS and Windows installation binaries, download and install.
Installation macOS
Installation Windows
Installation Linux
curl -fsSL https://ollama.com/install.sh | sh
Ollama Server Configuration Guide
These instructions go over how to configure the Ollama server using environment variables on macOS, Linux, and Windows.
Additional info can be found Ollama FAQ
Configuration macOS
If Ollama is run as a macOS application, environment variables should be set using launchctl
.
Steps
- Open the Terminal application.
-
For each environment variable you need to set, use the following command:
launchctl setenv OLLAMA_HOST "0.0.0.0" launchctl setenv OLLAMA_ORIGINS "*"
- After setting the environment variables, restart the Ollama application for the changes to take effect.
Configuration Linux
If Ollama is run as a systemd service, environment variables should be set using systemctl
.
Steps
-
Open a terminal and edit the systemd service for Ollama by running:
sudo systemctl edit ollama.service
This will open an editor.
-
Under the
[Service]
section, add a line for each environment variable:[Service] Environment="OLLAMA_HOST=0.0.0.0" Environment="OLLAMA_ORIGINS=*"
-
Save the file and exit the editor.
-
Reload the systemd daemon to apply the changes:
sudo systemctl daemon-reload
-
Restart the Ollama service:
sudo systemctl restart ollama
Configuration Windows
On Windows, Ollama inherits your user and system environment variables.
Steps
- Quit Ollama by right-clicking the Ollama icon in the taskbar and selecting “Quit”.
- Open the Settings (Windows 11) or Control Panel (Windows 10) application.
- Search for “environment variables” and select Edit environment variables for your account.
- In the Environment Variables window, edit or create a new variable for your user account:
- Variable Name:
OLLAMA_HOST
- Variable Value:
0.0.0.0
- Variable Name:
- Create a new variable for
OLLAMA_ORIGINS
with value"*"
- Click OK or Apply to save your changes.
- Restart the Ollama application from the Windows Start menu.
Models
There are several models we suggest to install. Starting with the main model, LLama3.1. Open a terminal and execute:
ollama pull llama3.1:latest
The other models we suggest are:
Model | Parameters | Size | Download | Why? |
---|---|---|---|---|
Llama 3.1 | 405B | 231GB | ollama pull llama3.1:405b | If you have the space and want full Llama experience. |
Gemma 2 | 2B | 1.6GB | ollama pull gemma2:2b | Good for testing Google SLM |
Mistral | 7B | 4.1GB | ollama pull mistral | SLM with good performance. |
Code Llama | 7B | 3.8GB | ollama pull codellama | Use text prompts to generate and discuss code. |
Qwen 2 | 7.62B | 4.4GB | ollama pull qwen2:latest | LLM with good performance. |
Qwen 2 Math | 72B | 47GB | ollama pull incept5/qwen2-math-72b-instruct:latest | Specialized math LLM built upon the Qwen2 LLM. |