DEV Community

drake
drake

Posted on

aws服务器安装运行ollama

  • 执行一行命令即可自动完成下载、安装和部署 server 和 client
curl -fsSL https://ollama.com/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

1、该命令自动创建ollama systemd service并在后台启动

2、该命令默认开放的是127.0.0.1:11434,如需开放外网访问,需配置/etc/systemd/system/ollama.service

>>> Creating ollama user...
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
>>> Enabling and starting ollama service...
Created symlink /etc/systemd/system/default.target.wants/ollama.service → /etc/systemd/system/ollama.service.
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.
Enter fullscreen mode Exit fullscreen mode

3、ollama自动创建 Ollama 用户和 Ollama 用户组,并且将当前的用户添加到 Ollama 组,比如:“ec2-user”,是当前用户可以直接执行ollama client命令,不需要加sudo

4、自动添加开机启动

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay