On macOS
Setting up environment variables on macOS can be done using the
launchctl
command:
Open your terminal.
Use the following command to set a variable:
bash
launchctl setenv OLLAMA_HOST "0.0.0.0"
Restart the Ollama application to apply changes.
If you want these changes to persist across reboots, consider adding them to your shell configuration file (like
.bash_profile
or
.zshrc
) in the form of:
bash
export OLLAMA_HOST="0.0.0.0"
Make sure to source your file afterward:
bash
source ~/.bash_profile
【 在 SuLiang 的大作中提到: 】
: 【 以下文字转载自 NewExpress 讨论区 】
: 发信人: SuLiang (家有胖娃一枚,胖!), 信区: NewExpress
: 标 题: 请教一下MAC怎么保存环境变量?
: ...................
--
FROM 123.196.11.*