Document Version 0.0.1, zah1/vep2, 2025-08-21
Created by AI, Checked by CI ;)
Ollama auf macOS: Installations- und Konfigurationshandbuch
We dont use Ollama Anymore!!! We use LM Studio 🧙🏼♂️
1. Anmeldung und Systemvorbereitung
Anmeldung (falls remote möglich, siehe Abschnitt 9)
- Benutzer:
sysadmin, Passwort: siehepassword.ti.bfh.ch - Windows:
- Verwende RealVNC (andere VNC-Tools sind zu langsam)
- Mac:
- Drücke
CMD + Kim Finder und verbinde dich mit dem Zielgerät
Setup-Dialoge beim initialen Einrichten on macOS
- Konservative Einstellungen:
- Keine Freigabe von Nutzerdaten (z. B. für Analytics)
- Kein automatisches Sharing aktivieren
- Gerät mit Apple-ID: appledev.ti@bfh.ch Passwort: https://password.ti.bfh.ch/app/passwords/view/02d00cf2-7d07-4cfb-8e15-9cdfb718e0fb registrieren.
2. Ollama Installation
Download und Installation
- Download: https://ollama.com/download/mac
- Installation:
- Per Drag & Drop nach
/Applicationsziehen - Bereinigung:
- Disk-Image aushängen und löschen
Erste Ausführung
- Ollama.app einmal starten, um Berechtigungen zu erteilen
- Login-Items:
- Ollama.app aus den Login-Items entfernen (Systemeinstellungen → Benutzer & Gruppen → Login-Items)
3. Terminal-Konfiguration (Root-Berechtigungen)
Root-Rechte erlangen
sudo -i # Passwort des sysadmin-Benutzers eingeben, Prompt ändert zu #
Symlink für Ollama erstellen
# mkdir -p /usr/local/bin
# cd /usr/local/bin
# ln -s /Applications/Ollama.app/Contents/Resources/ollama ollama
# ls -alh # Symlink überprüfen
LaunchDaemon einrichten
# cd /Library/LaunchDaemons/
# scp sysadmin@thalia.ti.bfh.ch:/Library/LaunchDaemons/ollama.plist .
# chown root:wheel /Library/LaunchDaemons/ollama.plist
# chmod 644 /Library/LaunchDaemons/ollama.plist
Daemon laden und aktivieren
# launchctl load /Library/LaunchDaemons/ollama.plist
# launchctl enable system/ollama.plist
Statusüberprüfung und Neustart
# launchctl list | grep ollama # Daemon-Status prüfen
# reboot # System neustarten
# launchctl list | grep ollama # Nach Neustart prüfen
# ps xa | grep ollama # Ollama-Prozess prüfen
Modell herunterladen
# ollama pull gemma3:27b # Gewünschtes Modell herunterladen
NOTE: When checking the number of Ollama processes, we might get > 1 process. One is very probably the serve process which is the main daemon/API, and a second one which is probably the runner process, this is a separate process for the specific model (only starts when the model is requested or preloaded. IF no inference request has benn made, or the server isn't configured to preload the model, this process may not exist yet, this is the case for eris.ti.bfh.ch, but not the case for the other ones in litellm: kalliope, urania, klio and thalia.) In some servers like euterpe there are two serve processes, even if you try killing the oldest one it creates another one right away because of the \
KeepAlive\ line in the .plist file, for this you have to kill both processes in the same command, the .plist will then create one serve process right after you kill them. Why did we have to serve processes to begin with? idk. Dont kill runner processes. Only the test servers and eris should have only one serve process and no runners. Why eris too? seems like shes not receving requests even though shes in the litellm model group.
4. Systemupdate(s)
Update via CLI
# softwareupdate -l # list available updates# softwareupdate -i -a -R # install all updates and restart- muss evtl. mehrmals gemacht werden, resp. eine Zeit warten, bis System rebootet...
macOS-Version prüfen (nach Restart)
$ sw_vers
Beispielausgabe:
ProductName: macOS
ProductVersion: 15.6.1
BuildVersion: 24G90
5. Netzwerkeinstellungen
Disable Bluetooth
System Settings / Bluetooth off
Disable Wi-Fi
System Settings / Wi-Fi off
WLAN-Adapter deaktivieren
- Systemeinstellungen → Netzwerk öffnen
- Dienst löschen oder deaktivieren
- Konfiguration:
- Keine automatische Netzwerkverbindung
- IPv4: Deaktiviert
- IPv6: Manuell (leer lassen)
Ethernet
Before the Mac Studio can be connected to the BFH switch, the port with the
desired VLAN must be requested from IT Services. For initial setup, Mac Studio must
be started on-site using a USB-C mouse/keyboard and an HDMI cable. The Mac will
automatically assign itself an invalid private IP address.
System Settings / Network /
There is a lookup button in the bottom right corner. Select "Manage virtual interfaces..."
Click + "Add new VLAN ..."
VLAN Name: 1803-VLAN
Tag: 1803
Interfaces: Ethernet
Click ok
There are now two Ethernet connections. The grayed-out connection with the self-assigned IP
address can be deleted.
Firewall
System Settings / Firewall on
Check if you find following services at Options... :
- screensharingd.bundle
- sshd-keygen-wrapper
- sshd-session
6. Hostnamen anpassen
"Real Host Names" ändern
Aktuellen Hostnamen prüfen
scutil --get HostName
scutil --get LocalHostName
scutil --get ComputerName
Hostnamen ändern
# Hostnamen setzen (ersetze "neuer-hostname" mit dem gewünschten Namen)
sudo scutil --set HostName "neuer-hostname"
sudo scutil --set LocalHostName "neuer-hostname"
sudo scutil --set ComputerName "neuer-hostname"
# Änderungen überprüfen
scutil --get HostName
scutil --get LocalHostName
scutil --get ComputerName
# Bonus: Auch den Bonjour-Namen ändern
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "neuer-hostname"
DNS-Cache zurücksetzen
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
7. Login- und Energieoptionen
Login-Optionen
- Anmeldung mit Benutzername/Passwort erzwingen; In den
System Settings→Login options→ (unten)Login window shows:→Name and password
Energieoptionen
- Automatischen Start nach Stromausfall aktivieren:
sudo pmset -a autorestart 1
Terminal im Dock behalten
- Terminal-App in das Dock ziehen für schnellen Zugriff
8. Installation von MacPorts
- Installieren der Apple Dev. Tools nach Aufruf von
gccim Terminal; Wizard durchklicken - MacPorts package downloaden/installieren: https://www.macports.org/install.php
- Installieren von
watch,... sudo /opt/local/bin/ports -v selfupdatesudo /opt/local/bin/ports -v install -pc <package-name>
9. Remote Access
- Aktivieren von
Remote login(SSH) undScreen Sharing(VNC): System Settings→Sharing→Advanced→ Aktivieren obiger Schalter
10. Set up of Time Machine Backup
10.1 Create the share (admin only)
The share name must follow the protocol‑specific pattern:
| Client OS | Share name pattern | Example |
|---|---|---|
| Linux (NFS) | nfs-<hostname>.ti.bfh.ch |
nfs-gemini.ti.bfh.ch |
| macOS / Windows (SMB) | smb-<hostname>.ti.bfh.ch |
smb-kalliope.ti.bfh.ch |
Note – Creation is performed directly on the server
fb‑bottle.ti.bfh.ch. Follow the “Create Share” page.
10.2 Connect to the share from the client Mac
- Finder → Go → Connect to Server… (or press ⌘K).
- Enter the SMB URL: smb://bottle.ti.bfh.ch
- Click Connect.
- In the share list, select the one you created, e.g.: smb‑bottle.ti.bfh.ch
- Authenticate with the service account
fb‑bottleand its password (retrieve frompassword.ti.bfh.ch). - When prompted, store the credentials in the keychain of the user
sysadmin.
10.3 Configure Time Machine
- System Settings → General → Time Machine.
- Click Add Backup Disk….
- Choose the mounted SMB share (the one you just connected).
- Ensure “Back up automatically” is enabled.
- Configure daily backup (default: hourly).
Time Machine will now create daily snapshots on the SMB share.
11. Wichtige Hinweise
- Administratorrechte: Alle Netzwerk- und Systemänderungen erfordern Admin-Rechte
- Keine automatischen Netzwerkänderungen: Netzwerkeinstellungen nur manuell ändern
- Datenfreigabe vermeiden: Keine unnötigen Dienste oder Analytics aktivieren
- Sicherheit: Konservative Einstellungen bei allen Setup-Dialogen wählen
- Neustart erforderlich: Einige Änderungen (wie Hostname-Änderungen) erfordern einen Neustart