Professional Web Applications Themes

determining the smallest Linux installation to run a particular app - Linux Setup, Configuration & Administration

Because my Linux app needs to be distributed with the OS, and I want to minimize the overall size of the distribution, I need to determine the smallest set of packages that are required to run my app. Is there a programmatic way to determine this? Thanks Bob Kircher Seattle, WA...

  1. #1

    Default determining the smallest Linux installation to run a particular app

    Because my Linux app needs to be distributed with the OS, and I want
    to minimize the overall size of the distribution, I need to determine
    the smallest set of packages that are required to run my app.

    Is there a programmatic way to determine this?

    Thanks

    Bob Kircher
    Seattle, WA
    Bob Guest

  2. #2

    Default Re: determining the smallest Linux installation to run a particularapp

    Bob Kircher wrote: 
    You can find out part of what you need with the ldd command that shows
    you which libraries are used by your program. For example,

    valinux:jdbeyer[~/bin]$ ldd
    libdb2.so.1 => /home/db2inst1/sqllib/lib/libdb2.so.1 (0x40015000)
    libc.so.6 => /usr/i386-glibc21-linux/lib/libc.so.6 (0x4083f000)
    /usr/i386-glibc21-linux/lib/ld-linux.so.2 =>
    /usr/i386-glibc21-linux/lib/ld-linux.so.2 (0x40000000)
    libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x40948000)
    libm.so.6 => /usr/i386-glibc21-linux/lib/libm.so.6 (0x4098c000)
    libcrypt.so.1 => /usr/i386-glibc21-linux/lib/libcrypt.so.1 (0x409a9000)
    libdl.so.2 => /usr/i386-glibc21-linux/lib/libdl.so.2 (0x409d6000)
    libpthread.so.0 => /usr/i386-glibc21-linux/lib/libpthread.so.0 (0x409da000)


    Then, assuming your system uses rpm, you could do things like:

    valinux:jdbeyer[~/bin]$ rpm -qf /home/db2inst1/sqllib/lib/libdb2.so.1
    /usr/i386-glibc21-linux/lib/libc.so.6
    db2cliv61-6.1.0-60
    compat-glibc-6.2-2.1.3.2

    etc.

    Now if your program forks and execs other processes, you would have to
    know that and work on them as well.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 73926.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 2:30pm up 1 day, 1:58, 2 users, load average: 3.36, 3.36, 3.36

    Jean-David Guest

  3. #3

    Default Re: determining the smallest Linux installation to run a particular app


    "Jean-David Beyer" <jd.b> wrote in message news:3FFC6085.4040200d.b... 
    > You can find out part of what you need with the ldd command that shows
    > you which libraries are used by your program. For example,[/ref]

    Ouch. Painful.

    If the package is RPM based, you can say "rpm -q package --requires" to get
    a starting list, then go down the list of packages to see what else is
    needed. Alternatively, if your installation is kickstart based or your
    installation has the "yum" package manager, you can use it to automatically
    find all the dependencies and try to supply them after installation of a
    minimal OS.


    Nico Guest

Similar Threads

  1. Linux Installation Redhat ES 4
    By GuruGod_HUITZILOPOCHTLI in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: April 12th, 07:15 PM
  2. Linux Installation
    By Anant in forum Linux Setup, Configuration & Administration
    Replies: 2
    Last Post: November 30th, 07:45 PM
  3. Validating a linux installation?
    By Doug in forum Linux Setup, Configuration & Administration
    Replies: 5
    Last Post: November 22nd, 06:00 PM
  4. determining OS for Quicktime installation
    By Mark A. Boyd in forum Macromedia Director Basics
    Replies: 1
    Last Post: August 18th, 04:46 PM
  5. Newbie - Installation de Linux
    By Shazbot in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: August 11th, 09:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139