
– 技术文章
从github下载ollama的release版本,x86服务器下载amd64的版本 https://github.com/ollama/ollama/releases下载你要安装的版并上传到服务器,我传到/home目录下
https://github.com/ollama/ollama/blob/main/scripts/install.sh
将install.sh中的以下内容修改为如图所示的内容,绕过下载
status "Downloading Linux ${ARCH} bundle"
curl --fail --show-error --location --progress-bar \
"https://ollama.com/download/ollama-linux-${ARCH}.tgz${VER_PARAM}" | \
$SUDO tar -xzf - -C "$OLLAMA_INSTALL_DIR"
替换为:
status "Downloading Linux ${ARCH} bundle"
#curl --fail --show-error --location --progress-bar \
# "https://ollama.com/download/ollama-linux-${ARCH}.tgz${VER_PARAM}" | \
$SUDO tar -xzf /data/ryy/ollama-linux-amd64.tgz -C "$OLLAMA_INSTALL_DIR"
切换:
$SUDO tar -xzf - -C "$OLLAMA_INSTALL_DIR"
换成刚刚下载好的
$SUDO tar -xzf /home/ollama-linux-amd64.tgz -C "$OLLAMA_INSTALL_DIR"
执行sh install.sh
ollama version is 0.5.7执行
ollama --version
,显示以下代表安装成功