yum和apt的代理设置

vim /etc/yum.conf

proxy=http://server:port
proxy_username=username
proxy_password=password


vim /etc/apt/apt.conf

Acquire::http::Proxy "http://USERNAME:PASSWORD@SERVER:PORT";
Acquire::https::Proxy "https://USERNAME:PASSWORD@SERVER:PORT";

若没有/etc/apt/apt.conf,可以在 /etc/apt/apt.conf.d/下创建一个文件

你可能感兴趣的:(yum和apt的代理设置)