تعليمات خطوة بخطوة
- 1
Step
Download the Official Installer
While you can curl it, it's easier to download the official macOS or Windows installer directly from the website. Install it like a normal app.
curl -O https://ollama.com/download/Ollama-darwin.zip - 2
Step
Verify the Ollama Service
If you get 'command not found', ensure you have launched the Ollama app from your Applications/Start menu first.
ollama --version - 3
Step
Run Your First Local Model
The first time you run a model, Ollama downloads the multi-gigabyte weights. Future runs will start instantly.
ollama run llama3 - 4
Step
List Installed Models
You can remove models you no longer need using the 'ollama rm' command (e.g., ollama rm llama3) to free up space.
ollama list
لماذا هذا مهم
تشغيل نماذج الذكاء الاصطناعي الكبيرة (LLMs) محليًا يحمي خصوصية بياناتك ويعمل دون اتصال بالإنترنت بالكامل.
استكشاف الأخطاء وإصلاحها
- **'Error: could not connect to ollama app':** The CLI is just a client. The background Ollama service must be running. Check your Mac menu bar or Windows system tray. If it's not there, launch the Ollama app manually from your Applications or Start menu.
- **Port 11434 conflicts:** By default, Ollama binds to `localhost:11434`. If another app uses this port, you can change it by setting the `OLLAMA_HOST` environment variable (e.g., `export OLLAMA_HOST=127.0.0.1:11435`) before launching the service.
- **Slow inference speeds:** Ollama automatically detects and uses your GPU (Apple Silicon or NVIDIA/AMD). If it's running incredibly slow, it might be falling back to CPU mode. Ensure your graphics drivers are up to date, especially on Windows.
FAQ
How do I install Ollama on Windows?
Go to ollama.com/download and select the Windows preview. Download the `.exe` installer, run it, and follow the setup wizard. Once finished, you can use the `ollama` command in PowerShell or Command Prompt.
Can I run Ollama on a Mac without an M-series Apple Silicon chip?
Yes, Ollama supports older Intel-based Macs. However, inference will run entirely on the CPU and will be significantly slower than on Apple Silicon (M1/M2/M3) machines, which use unified memory architecture.
How do I stop the Ollama server?
On Mac, click the Ollama alpaca icon in your top menu bar and select 'Quit'. On Windows, right-click the icon in your system tray (bottom right) and select 'Quit'.
What port does the Ollama API use?
Ollama automatically starts a local REST API server on port 11434. You can send JSON requests to `http://localhost:11434/api/generate` to interact with it programmatically.
How do I update Ollama to the latest version?
When an update is available, the Ollama app usually prompts you with an update notification in your OS tray or menu bar. Alternatively, just download and run the latest installer from the website to overwrite your current version.
Related
Copilot
How to Install GitHub Copilot CLI on Mac and Windows
Step-by-step guide to installing the GitHub Copilot CLI extension. Learn how to authenticate and run gh copilot suggest and explain in your terminal.
Aider
كيفية تثبيت Aider AI Coding CLI على Mac و Windows
دليل خطوة بخطوة لتثبيت Aider AI pair programming CLI على macOS و Windows. تعلم كيفية تكوين مفاتيح API لـ Claude 3.7 و GPT-4o.