国内服务器下载慢,借助国外服务器squid
在国外服务器(B)上安装 Squid
yum install -y squid
systemctl start squid
systemctl enable squid
修改 Squid 配置(允许国内服务器 A 访问) 编辑 /etc/squid/squid.conf
http_port 3128
acl localnet src 国内服务器A的IP
http_access allow localnet
http_access deny all
重启 Squid:
systemctl restart squid
在国内服务器上执行
export http_proxy=http://美国服务器B的IP:3128
export https_proxy=http://美国服务器B的IP:3128
取消代理
unset http_proxy
unset https_proxy
测试下载
curl -fsSL https://ollama.com/install.sh | sh
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。