我正在写一个hadoopconfiguration脚本,但我遇到安装神经节的麻烦。 脚本需要一直运行,没有任何人为干预。 不幸的是,当它碰到这条线时,
sudo apt-get install ganglia-monitor ganglia-webfrontend
脚本冻结在这里。 如果尝试使用Ctrl-D或Ctrl-C进行分解,尝试运行一堆命令后会失败
仔细观察,问题是安装它时,神经节需要用户input。 在apt-get调用期间,popup如下屏幕:
Package configuration ------------------[ Configuring ganglia-webfrontend ]------------------ In order to activate the new configuration, the web server needs to be restarted. If you choose not to do this automatically, you should do so manually at the first opportunity. Restart apache2? <No> <Yes>
有什么办法可以避免这个屏幕? 将-y标签添加到apt-get(即apt-get install ganlgi -y)不起作用。
在进行交互式安装时,我和我们的木偶清单有类似的问题。 这是我做的。
export DEBIAN_FRONTEND=noninteractive ; apt-get -y install ganlgi