I'm using a Lenny/Squeeze mix, KDE 3.5.
Before migrating to a hard drive I'm learning my way around Debian by running in a virtual machine. I am learning a lot about the Debian design and I'm looking forward to running Debian full time.
My self-teaching virtual machine process includes installations, which I have performed several times. During those various runs, I have created a list of about 100 packages that I add after the initial installation. I'd like to run a shell script to install those packages in one sweep.
I am aware of the apt-get -y option.
I also have read about preseeding. Although that process might help and be more elite, I would prefer for now to write a simple script that automates this mass installation.
I am no newbie to shell scripts but I am a new to Debian and apt-get/aptitude. So all I am asking is a little help and nudging with apt-get/aptitude to help me automate this task.
Thanks much.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Automating Mass Package Installs
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: Automating Mass Package Installs
You can create a list of all your installed packages with
replace /home/steve/ with the actual location of where you wish the list of packages to go.
You can manually edit that list down to your list of 100 or so packages, but it may be time-consuming. It's faster just to leave the list as is. To reinstall from that file (as root):
Again, replace the argument with the actual path and name of the list file.
Code: Select all
dpkg --get-selections >/home/steve/packages_backup.txt
You can manually edit that list down to your list of 100 or so packages, but it may be time-consuming. It's faster just to leave the list as is. To reinstall from that file (as root):
Code: Select all
dpkg --set-selections </home/steve/packages_backup.txt
apt-get dselect-upgrade
Again, replace the argument with the actual path and name of the list file.
Re: Automating Mass Package Installs
have a look if this if of use for your purpose:
http://www.linuxquestions.org/questions ... s.-726212/
at the end of the script you can add your apps manually:
#This portion needs to be edited to suit your needs, add whatever you like
apt-get install ....
http://www.linuxquestions.org/questions ... s.-726212/
at the end of the script you can add your apps manually:
#This portion needs to be edited to suit your needs, add whatever you like
apt-get install ....
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
Re: Automating Mass Package Installs
Thanks for the replies. More to learn!
Just a comment, if I want automation, should the script linked in LQ be using the "-y" option with apt-get? Otherwise each package installation requires confirmation, correct?
Just a comment, if I want automation, should the script linked in LQ be using the "-y" option with apt-get? Otherwise each package installation requires confirmation, correct?
Re: Automating Mass Package Installs
to be honest: i don't know. i used the script exactly one time and it did work very good. i can't remember i had to confirm each package, but on the other hand i can't see a "-y, do install that package".woodsman wrote:Thanks for the replies. More to learn!
Just a comment, if I want automation, should the script linked in LQ be using the "-y" option with apt-get? Otherwise each package installation requires confirmation, correct?
i would say it simply needs to be added after "apt-get install -y ...."
btw: the dpkg-method by stevepusser seems more "elegant" to me (but i barely use dpkg, if at all, and therfor don't know that much about its power). i would go for that option.
if you use the script and it does work please let me know (i would try it but got other "problems", which are very time-consuming)
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.