Alex Rivera | Logout

How can I automate dpkg/apt-get?

Asked 2009-03-31T17:53:21.337
10

I'm trying to create a script that automatically downloads packages for new servers. However, some things like 'mysql-server' can not installed automatically cause you need to configure them in the ncurses interface first. I've looked through the man pages and can't find anything appropriate.

I don't care if I have to upload/edit a conf file later -- I just need the appropriate packages installed.

Anyone know what to do besides grabbing tarballs and building them myself?

UPDATE found out that for things like mysql-server you can just do:

DEBIAN_FRONTEND='noninteractive' apt-get install -yq mysql-server

however expect looks like something I'll need for sun-java6-jdk; haven't evaluated it yet

Edit
Report

2 Answers

0

I'm not sure exactly what configuration mysql-server needs, but you could try something like expect

answered 2009-03-31T18:08:22.533
0

I would look into cron-apt. I haven't tried it myself, but it's package description sounds promising.

answered 2009-05-22T23:20:02.370

Your Answer