Escolar Documentos
Profissional Documentos
Cultura Documentos
Want to read Linu x tips and tricks, bu t don't have time to check ou r blog
everyday? Su bscribe to ou r email newsletter to make su re you don't miss a
single tip/tricks.
you@address.com
Home
T u torials
Shell/Scripts
Software
Howtos & FAQs
Foru m
Linu x docu mentation
RSS
About nixCraft
Topics
Backu p
Linu x
Shell scripting
T ips
See all topics...
1 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
My first server?
Uw eers te s erver wordt uw mees t prettige Hardware and Software
ervaring. Verbaas d? Z ie: failu res are part of Life.
www.ea sybow.nl/iNode/
T hat is why you need to
Linux So ftware have a backu p. I have
Get the lates t news , white papers , already written abou t
dis cus s ion threads , and much more. backing files and MySQL
Linux.I Ttoolbox.com
databases. You need not to backu p all
Linux installed binaries (mostly software) with
Bes paar geld. Implementeer ipv Windows following tips. It will not ju st save you r
s oftware, Linux s oftware. time bu t both Debian and RHEL distro
www.kra tz .nl/
can u pdate them instantly.
Debian Linux
If you are u sing Debian Linu x u se dpkg command to list installed software:
$ dpkg --get-selections
RPM bas ed dis tributions (RHEL, Fedora Core, Cent OS, Sus e Linux
etc)
Use rpm command to get list of all installed software:
$ rpm -qa
OR
$ rpm -qa > /backup/installed-software.log
Now you have a list of installed software. After installing base system you
can immediately install all software.
Debian Linux
Debian Linu x makes you r life easy. All you have to do is type following two
2 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
commands:
# dpkg --set-selections < /backup/installed-software.log
Now you r list is imported u se dselect or other tools to install the package.
# dselect
If you are u sing yu m, type the following for loop to install all software:
# for s in $LIST; do yum install $s; done
Update try ou t following command (thanks to gt):
# yum -y install $(cat /backup/installed-software.log)
Want to stay u p to date with the latest Linu x tips, news and
annou ncements? Su bscribe to ou r free e-mail news letter or RSS feed to
get all u pdates. You can Email this page to a friend.
3 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
Mu ch better
xargs yu m install
# cat /var/lib/portage/world
to get the list of packages
or barely:
4 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
For me this approach is the same that install from DVD/CDROM with
the regu lar installer. Where are the own files? configu ration files,
cu stomizated setu ps, and so on.
Jarl,
As I said earlier, I am assu ming that you are having a backu p of /etc
config file and other important data to tape or FT P or NAS server.
Please read following u rl. T his article is actu ally follow-u p to earlier
article.
Once application installed you can simply restore both data and
configu ration file.
Also, consider the CD/DVD media is not u p-to-date or does not carries
patched version. T his method offers ou t of box protection as both
u p2date, yu m or apt-get installs patched/u p-to-date version.
HT H
5 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
T hanks.
Even easier - Fedora u sers shou ld get their installed packages list
au tomagically u pdated every day to ‘/var/log/rpmpkgs’ - so, assu ming
you ’ve taken a backu p and restored the file the following shou ld
su ffice:
How wou ld you do this on Ubu ntu u sing apt-get instead of dpkg?
apt-get command does not su pport this kind of facility. You need to
u se dpkg command only.
Cou ldn’t you ju st create a kickstart disk after install/config and pop it
in to reinstall then do a yu m u pdate? T hat wou ld get you closer than
ju st reainstalling packages. Of cou rse all of this is fu n to talk abou t
bu t realistically you ’d have backu ps and you ’d ju st restore… I backu p
MBRs and files. T hrow a live cd in the machine to be restored and from
the backu p server - dd if=/backu p/MBR.bin | ssh “cat | dd of=/dev/hda”
It’s late and this is from memory bu t I think that’ll work to restore the
MBR across the network. T hen format and restore from backu p.
6 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
For Debian systems, you can also grab the debconf database and u se it
to preseed the installation qu estions that occu r, inclu ding how to
partition you r hard drive. T his allows you to completely au tomate the
installation process. Check ou t the debian-installer Install manu al at
http://d-i.alioth.debian.org/manu al/en.i386/apb.html.
Ju st what I needed
Linu x is great!!!
7 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
for debian/u bu ntu method. will it reinstall all the 1313 packages that i
noted as being saved to the backu p log or will it skip the packages that
need not be u pdated?
Leave a Reply
Name (required)
Website
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b>
<blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike>
<strong>
8 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
Submit Comment
Tags : backu p linu x software, binaries, Debian Linu x, distribu tions, dselect ,
fedora core, for loop, mysql databases, restore linu x software, rhel, rpm,
Shell scripting, software failu res, software list , software task, su bscriber,
u p2date command, yu m, yu m command
Search
Search
more ~/options
Abou t u s
T estimonials
Contact u s
Archives
Select Mont h
Recent Comments
Hacking Beetel 220x ADSL rou ter (Broadcom BCM6338)
9 of 10 08/14/2008 03:35 PM
Linux G et list of installed software for reinstallatio... http://www.cyberciti.biz/tips/linux-get-list-installed...
Recent Articles
dnsmasq Dns Cache Software Secu rity Update T o Fix DNS Spoofing
Attacks
How T o Install Pu ppet System Management T ool T o Au tomate T asks
Across T he Network
Download Of T he Day: gOS A Lightweight Linu x Distribu tion (ISO
Images)
Comparison: Linu x Disk Schedu ler
Download of the day: Vim T ext Editor 7.2
Paid Su pport From Novell / Red Hat Not Important for Linu x Adoption
Don't Miss
How T o Find Ou t What My DNS Servers Address Is
MySQL Change root Password
Howto: Linu x Add User T o Grou p
Linu x and Open Sou rce Software Blog by Vivek | nixCraft
Open rar file or Extract rar files u nder Linu x or UNIX
Ubu ntu Linu x: How to Install Flash Player for firefox
See all...
10 of 10 08/14/2008 03:35 PM