LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   HOWTO install packages w/o interaction on ubuntu server? (https://www.linuxquestions.org/questions/ubuntu-63/howto-install-packages-w-o-interaction-on-ubuntu-server-782383/)

Skaperen 01-15-2010 08:32 AM

HOWTO install packages w/o interaction on ubuntu server?
 
I have a big list of packages to install on a lot of ubuntu servers. Initial testing shows that the script doing this hangs because some packages are trying to do "human interaction" to configure the packages. I don't need, or want, this configuration to take place. Configuration files will be added later for what needs to be configured to my needs. I'm using apt-get, with the --assume-yes option, giving it the full list of all packages all at once (including some to be removed).

What I'm looking for is a way to get these packages to just install without the interaction. Whatever configuring it can do w/o interaction is fine; I work from that. But this all definitely needs to run headless (the script logs output to a file in /tmp so if there are problems that can be examined later).

craigevil 01-16-2010 12:47 AM

Try dpkg-reconfigure debconf and set it to low

Skaperen 01-18-2010 09:57 AM

It appears that dpkg-reconfigure only works after the package is installed. The hang that happens is during the install. Looking at dpkg-preconfigure, it requires the .deb file already be downloaded. That can't work because by the time the script runs apt-get to do all the downloads and installs, the headless requirement is in place. What I need is something that can be set from within that script to make all packages not ask questions. Where it is crucial for some package to have information it can't discover from the system, then some means to provide canned answers in a file could work (the script can bring in that file during the first phase).

Skaperen 01-18-2010 10:06 AM

More info ... I am imaging Ubuntu 9.10 server onto the primary drive from a boot stick that grabs the master image from a server that has the image. That image configures its network with DHCP. Once the host is up with its DHCP temporary IP, an automated login via SSH runs rsync to load additional files as needed, which includes setup scripts. One does a network setup to give the machine a static IP address and reboots again. Another SSH login to the static IP runs the second script to select what packages this machine needs, removes packages not needed, does an update, upgrade, installs needed packages, reruns update to be sure, and reboots again. It should be ready to be a server at this point.


All times are GMT -5. The time now is 04:08 PM.