HOWTO install packages w/o interaction on ubuntu server?
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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).
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.
Last edited by Skaperen; 01-18-2010 at 10:07 AM.
Reason: spelling
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.