如何通过 preseed/early_command 安装 squid-deb-proxy-client

hed*_*hog 6 proxy preseed squid

使用 Lucid,从 Lucid mini.iso 安装。都是 AMD64。

在下面我尝试了 \,所有的 apt-get、apt-install、anna-install、dpkg:

d-i preseed/early_command string <cmd+opt> squid-deb-proxy-client
Run Code Online (Sandbox Code Playgroud)

我也试过:

d-i preseed/early_command string /usr/bin/wget \
    -O squid-deb-proxy-client_0.3.1_all.deb \
    http://ubuntu.media.mit.edu/ubuntu//pool/universe/s/squid-deb-proxy/squid-deb-proxy-client_0.3.1_all.deb && dpkg -i squid-deb-proxy-client_0.3.1_all.deb
Run Code Online (Sandbox Code Playgroud)

这是可能的,如果或者最早可以安装使用squid-deb-proxy服务器的点是什么?

ger*_*ijk 4

要强制安装程序使用代理服务器,请使用以下d-i mirror/http/proxy选项正确配置它:

d-i mirror/http/proxy string http://ip-or-hostname-of-proxy:8000/
Run Code Online (Sandbox Code Playgroud)

您实际上并不需要该squid-deb-proxy-client包来使用 Squid 代理。该软件包的唯一目的-client是它可以自动发现网络中的代理服务器。


roa*_*dmr 3

当 Early_command 运行时,我认为您甚至还没有/target格式化/安装。例如,preseed/early_command可用于在安装程序环境中安装 udeb(但请注意,不是标准 deb):

# This first command is run as early as possible, just after
# preseeding is read.
#d-i preseed/early_command string anna-install some-udeb
Run Code Online (Sandbox Code Playgroud)

您可以在 Late_command 中运行此命令,此时您可以实际在目标系统中安装内容:

d-i preseed/late_command string \
in-target apt-get install -y --force-yes openssh-server; \
true
Run Code Online (Sandbox Code Playgroud)

我认为让系统从代理获取包的最佳方法是 Pete Ashdown 建议的。