Results 1 to 5 of 5

Thread: Download packages for installing in computer with internet connection

  1. #1

    Default Download packages for installing in computer with internet connection

    Dear all,
    I would like to ask your help on how I can install packages for the latest opensuse 12.3 from my work computer that I can install later on on my home computer that has no internet connection.

    Is it possible to download kile package and with the help of a usb stick copy it to the other computer?

    Regards
    Alex

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Download packages for installing in computer with internet connection

    On 2013-04-04 11:46, alaios wrote:
    >
    > Dear all,
    > I would like to ask your help on how I can install packages for the
    > latest opensuse 12.3 from my work computer that I can install later on
    > on my home computer that has no internet connection.


    There is no known way to produce a list of needed packages with
    dependencies for use on an off-line computer.

    The only method I know is to clone the entire repository into an
    external disk. And they are huge, even only considering oss, non-oss,
    and updates.


    In theory it is possible to download the repository metadata; knowing
    where those files are stored, you copy them to your off-line computer,
    on which you have to configure all repositories to never refresh and
    keep downloaded packages. Then you open there the package manager and
    ask it to install whatever you want, stop, and then hand-copy the list
    of packages it wants to install.

    At that moment you have to go the online machine, download all that, and
    copy them to the directories where the off-line computer looks for them
    (under "/var/cache/zypp/packages/" if repos are configured to keep
    downloaded packages). Then you can tell it to continue the installation.

    I don't know if anybody has attempted this procedure.

    > Is it possible to download kile package and with the help of a usb
    > stick copy it to the other computer?


    Yes, if you also download all dependencies it needs.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,059
    Blog Entries
    14

    Default Re: Download packages for installing in computer with internet connection

    Put the DVD iso on your computer, use the repo manager to add the iso as a repo. That would already give you a good base to start from. Kile might even be on it.
    The next one, is to create an "Install" folder on your system. Add that folder too through the repo manager, add, local folder, browse and select the Install folder, check "rpm-dir" checkbox, done.

    Now transfer downloaded packages + their dependencies into your Install folder. Run "zypper ref", the downloaded packages will be installable through Yast.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  4. #4
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: Download packages for installing in computer with internet connection

    Quote Originally Posted by alaios View Post
    Dear all,
    I would like to ask your help on how I can install packages for the latest opensuse 12.3 from my work computer that I can install later on on my home computer that has no internet connection.

    Is it possible to download kile package and with the help of a usb stick copy it to the other computer?

    Regards
    Alex
    You can install kile at work and then check the "history" in YaST and find the packages that are requires
    Download the relevant rpms from download.opensuse.org or through software.opensuse.org
    Take them on flash drive. copy onto system and do
    Code:
    zypper in abc.rpm cde.rpm fgh.rpm...
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  5. #5
    Join Date
    Jan 2012
    Location
    BC
    Posts
    178

    Default Re: Download packages for installing in computer with internet connection

    Quote Originally Posted by alaios View Post
    Dear all,
    Is it possible to download kile package and with the help of a usb stick copy it to the other computer?
    Yes you can. I do this all the time!

    I need to do this at home because I am on usage based billing (UBB) that only allows so much bandwidth before I start getting charged.

    You can copy the rpm files to a USB and then copy those onto the target machine.

    But you need to configure zypper to do this first!

    Example:
    Say I have a fresh new machine that I just installed openSUSE on that doesn't have any updates (because during the initial install I told it not to automatically update). Now I need to go get updates.

    But before I do my first update/patch I need to tell zypper to cache the packages that it is going to download.

    I'm more familiar with the command line so I'll explain how this happens there.

    Open up a terminal.

    Type
    Code:
    zypper lr
    That should output a list of your repositories and some status info.
    You should enable caching on the repos that have the Enabled flag set to "yes" - you can see this near the right of the output of the above command.

    Instead of typing in the full repo name, you can use the repo number on the far left or the alias for this.
    The base repos that should have caching turned on are: openSUSE-12.2-Oss, openSUSE-12.2-Non-Oss, openSUSE-12.2-Update, openSUSE-12.2-Update-Non-Oss

    Those four repos in my `zypper lr` list are numbers 11, 12, 15, and 16. They will definitely be different for yours so change as needed!
    Also include any other repos you want cached besides just the base openSUSE ones (basically any repos with yes under Enabled)

    So I could then issue the zypper command, as root:
    Code:
    su -
    zypper mr -k 11 12 15 16
    The -k flag tells zypper to modify repos (mr) and store the files on disk when they are downloaded instead of temporarily.

    You can see more info from issuing:
    Code:
    zypper help mr
    So now when I run
    Code:
    zypper patch
    or
    Code:
    zypper up
    all the files it downloads are saved in the /var/cache/zypp/packages folder.
    So this step has to happen on the machine that is connected to the internet - or what I call the "hot machine" because it's the only one with internet access or allowed to download packages for openSUSE.

    I like to take that packages folder and place it into a tar file so that the user permissions are kept and not lost when copying directly to a USB that might not be formatted in ext4 or whatever.

    So to tar them, as the root user if you aren't already:
    Code:
    su -
    tar cvpf /mnt/pathtousb/packages.tar /var/cache/zypp/packages
    The above is done as the root user because the files in the packages folder are owned by the user and group root.

    Now on the cold machine (one that can't download openSUSE updates/patches) extract the tar file to the /var/cache/zypp folder and tell it to extract only files that don't already exist there:
    Code:
    su -
    tar xkvf packages.tar /var/cache/zypp/
    Then once those are copied, you can run zypper patch or zypper up and it won't re-download any files it doesn't have to.
    This works well on machines with identical setups (ie, same software) and architecture (ie, 64bit to 64bit).

    Later on you may want to do this again so just plug that usb with the packages.tar file into the hot machine and run a zypper patch or zypper up again to let it download and install the latest packages.

    But the tar command has a slight difference, you can simply update the tar file:
    Code:
    su -
    tar upvf /mnt/pathtousb/packages.tar /var/cache/zypp/packages
    And that should grab only the new rpms.

    Now it's safe, on even the hot machine to remove those old files if you find they are starting to eat up disk space with a zypper clean. Type zypper help clean for more options there.

    That's about it, I know it's a long write up, but it's a short procedure once you get use to it.

    One thing I also do at home is share that packages folder directly over the LAN via Samba or NFS then let the other machines mount it to their systems or configure the zypper configuration directly to change the default packages path to the network path. This way no tar'ing or copying from and to the usb is needed at all.

Posting Permissions

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