Results 1 to 8 of 8

Thread: Install packages to home folder

  1. #1

    Default Install packages to home folder

    Hi there.
    As a user on a server system, I cannot install software e.g. using yum for obvious reason, as this would effect other users as well.
    In principle, it should be possible to obtain and install a package (.rpm) including its dependencies to my home folder and use the software from there - but how do I achieve this?

    I found howTos like
    http://ajaya.name/?p=6353
    and
    http://www.g-loaded.eu/2008/01/28/ho...-deb-packages/

    but they do not consider a) how to obtain a package and b) how to obtain & install dependencies automatically.

    thank you

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,448

    Default Re: Install packages to home folder

    Yes, as long as you also download all its dependencies to the same folder. A good package will come with an install script that you should run. If it finds a missing dependency, it will tell you and you can download it and run the script again.

    I have such one package that I prefer to run from /home and have had no problems with it.

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

    Default Re: Install packages to home folder

    On 2014-05-28 10:26, a2043037 wrote:
    >
    > Hi there.
    > As a user on a server system, I cannot install software e.g. using yum
    > for obvious reason, as this would effect other users as well.
    > In principle, it should be possible to obtain and install a package
    > (.rpm) including its dependencies to my home folder and use the software
    > from there - but how do I achieve this?


    AFAIK, no, as the rpms have destination directories hardcoded, and the
    applications an libraries inside expect to find other files at precise
    locations.

    You have instead to download those things you need as source, and build
    and install them to your home - which in many cases, it is possible.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  4. #4

    Default Re: Install packages to home folder

    Well, it is true that one can build the binaries from source files. But those source files usually have dozens of dependencies themselves.
    Often the compile tutorial suggest to install the dependencies via a package manager - which is funny, because if I was able to use a package manager, I would install the software itself using this manager....

    Is it such a rare condition on linux systems, that a non-root user wants to use own tools?
    On windows for example, most programms can be installed and started by restricted users by simple changing the destination path of the setup.
    I thought this should be possible with openSUSE/Linux systems as well?!

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

    Default Re: Install packages to home folder

    On 2014-05-29 01:06, a2043037 wrote:
    >
    > Well, it is true that one can build the binaries from source files. But
    > those source files usually have dozens of dependencies themselves.
    > Often the compile tutorial suggest to install the dependencies via a
    > package manager - which is funny, because if I was able to use a package
    > manager, I would install the software itself using this manager....
    >
    > Is it such a rare condition on linux systems, that a non-root user wants
    > to use own tools?


    Yes.

    In fact, it is possible for root to forbid it.

    > On windows for example, most programms can be installed and started by
    > restricted users by simple changing the destination path of the setup.
    > I thought this should be possible with openSUSE/Linux systems as well?!


    But Linux is not Windows! :-)

    The package manager is reserved for the administrator. And, at least
    rpms, are designed to be installed by root, and its files go to the
    places designed by the packager. You can unpack the rpms and install the
    files somewhere else, but there is no assurance at all that it will
    work, because the paths where each file expects other components,
    applications, or libraries, are written at compile time.

    So, if you want to change the paths, you have to recompile. That's the
    Linux way.

    Of course, there are some exceptions.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  6. #6

    Default Re: Install packages to home folder

    well, recompiling per se is not a problem. But it seems like every linux tools has a dozen dependencies, having a dozen of dependencies themselves.
    googling every single dependency, find a working download location and a tutorial to compile and iterate the process - this cannot be the only option, is it?
    Then one runs across a message like "SomeCrapyFile.abc" is missing and you've just got no idea where to get this file from....

    It could be so simple. Just a script the downloads, unpack configures and compiles all the dependencies which are not installed (multi-level).
    Someone has done it before, otherwise the packages would not exist.....

    why bother a admin with every single little tool a user would like to use?
    Sry, I just dont get it. If running binaries from home folder is forbidden, that
    is anoying but somewhat graspable. But I see no point in making it so complicated, if it is not forbidden?!

    ps:
    1. yes, I would like to know/ understand the reason (if there is any)
    2. this is not meant to be a win vs linux discussion.I basically just want to solve my problem.

  7. #7
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,705

    Default Re: Install packages to home folder

    That is exactly what RPMS are a script to install and check/install dependencies.

    Now if you are compiling from source the readme file often has a list of needed libraries. Or maybe the doc's on the programs's site might have them. And yes sometimes the needed libs need other libs that could need other ones. ie dependency hell.



    But if you are going to the trouble to put the lists in a structure that could be used by a given distro you may as well package it up in the format for that distro, In openSUSE that is RPM

    Before compiling for yourself you should check the repos

    http://software.opensuse.org/search

    many people package up stuff that may not be in the main repos

    If you want to install in ~/ then you need to compile it yourself. Some binary package do get installed in /home google earth comes to mind.

    But in Linux in general installing programs is an administrative job

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

    Default Re: Install packages to home folder

    On 2014-05-29 04:26, a2043037 wrote:

    > ps:
    > 1. yes, I would like to know/ understand the reason (if there is any)
    > 2. this is not meant to be a win vs linux discussion.I basically just
    > want to solve my problem.



    Ok, but you see, as gogalthorp says, in Linux one of the jobs of the
    administrator is to install programs, so the tools are designed to make
    the job easy for him.

    It is also his job to decide what to install and what not, an even to
    decide to allow users to run their own programs or not. It depends on
    what the particular machine role is.

    For example, if I create a server machine to provide email
    to a group of people, in the case I allow them to get a
    shell on the machine, it would be for the purpose of managing
    their mail and filters, not to run applications. So I would
    mount home "noexec", for starters, and not allow them to run
    their own scripts.

    Of course, if the users give a reason for they needing to
    do that, it also my job as administrator to facilitate their
    own jobs when using the machines I administer. Depending on
    the constraints, perhaps what would be needed would be
    another machine in which they did what they please, leaving
    the mail server untouched.

    It is just an example, traditional type.


    And, Linux being a multitasking/multiuser system by design from the
    start, it does not make sense for two users to install the same program
    on their own. It is much more sensible to install the program just once,
    and have the program store separate data structures on each user's home.
    It is a different paradigm from Windows, which inherits from MsDOS,
    designed for a single user, doing whatever he wanted. No reason to
    enforce where to install programs.

    In fact, in Linux there is an extensive documentation that
    explains where each thing should go in the directory
    structure (the "Filesystem Hierarchy Standard", or FHS).

    And modern Windows does in fact use a similar system: applications are
    stored on a common structure, as programs, and the user data are stored
    on their homes.

    Also notice that in Linux there are no licensing limits to
    the number of instances an application may have. Once an
    application is installed, a thousand users may use it
    simultaneously. In Windows maybe only one may make use of it,
    or a number of users. There are services to control those
    numbers. If only a user can run certain application, why
    not install it on his home?


    Now, it happens that the repackaging you suggest can not be easily
    automated, either, because how to change the expected path for each
    application depends on each particular application design... this is not
    fixed, there is no common data structure which you can simply search for
    and change automatically.

    In fact, in a distribution such as openSUSE there is a person that
    packages one or more packages, taking some responsibility for it. Each
    single package has a packager behind it. He reads the package
    documentation and decides how to build that particular package for this
    distribution. If you want to rebuild the application for use on a home
    dir, well, you can start from his work, or not, but you do have to edit
    some files. You are redoing his work.


    Remember that Linux applications are designed so that you yourself
    download the sources, configure them for your machine, build them,
    install them. This is tedius, complicated, and requires skills, so
    distributions facilitate this humongous job by providing a set of
    pre-packaged applications and libraries that you simply install - in the
    manner designed by the distribution packagers. You can of course install
    the original applications differently, but in that case, you have to
    redo what the packagers did in your own way.



    However, as I said, there are exceptions. It is common for java
    applications designed to run in multiple platforms to be installed on
    the home of a user. Wine apps also go to a home, but after all, they are
    Windows apps.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

Posting Permissions

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