Manual Ollama Installation: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Tested on Debian 13 Main reference: [https://docs.ollama.com/linux Linux - Ollama - Manual installation] Since I don't want to pollute my system with software whose origin is not the operating system's package repository, I install Ollama to "/opt" rather than "/bin". # Download and Install Its necessary to install some packages: apt install zstd curl -y Then let's download Ollama: curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst Unpack the arc...") |
(+Improved ollama.service file) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
Main reference: [https://docs.ollama.com/linux Linux - Ollama - Manual installation] | Main reference: [https://docs.ollama.com/linux Linux - Ollama - Manual installation] | ||
== Rationale == | |||
Since I don't want to pollute my system with software whose origin is not the operating system's package repository, I install Ollama to "/opt" rather than "/bin". | Since I don't want to pollute my system with software whose origin is not the operating system's package repository, I install Ollama to "/opt" rather than "/bin". | ||
== Download and Install == | |||
Its necessary to install some packages: | Its necessary to install some packages: | ||
| Line 18: | Line 20: | ||
tar --zstd -xf ollama-linux-amd64.tar.zst -C /opt | tar --zstd -xf ollama-linux-amd64.tar.zst -C /opt | ||
== Improved ollama.service file == | |||
[Unit] | |||
Description=Ollama Service | |||
After=network-online.target | |||
[Service] | |||
ExecStart=/media/data/opt/bin/ollama serve | |||
User=ollama | |||
Group=ollama | |||
Restart=always | |||
RestartSec=3 | |||
Environment="PATH=$PATH" | |||
Environment="OLLAMA_HOST=0.0.0.0" | |||
Environment="OLLAMA_CONTEXT_LENGTH=16384" | |||
[Install] | |||
WantedBy=multi-user.target | |||
Latest revision as of 20:29, 10 May 2026
Tested on Debian 13
Main reference: Linux - Ollama - Manual installation
Rationale
Since I don't want to pollute my system with software whose origin is not the operating system's package repository, I install Ollama to "/opt" rather than "/bin".
Download and Install
Its necessary to install some packages:
apt install zstd curl -y
Then let's download Ollama:
curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst
Unpack the archive:
tar --zstd -xf ollama-linux-amd64.tar.zst -C /opt
Improved ollama.service file
[Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/media/data/opt/bin/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="PATH=$PATH" Environment="OLLAMA_HOST=0.0.0.0" Environment="OLLAMA_CONTEXT_LENGTH=16384" [Install] WantedBy=multi-user.target