LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-16-2009, 09:54 AM   #1
arm74
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
RPM installation via simple user


Hi all,

I have a problem to solve: I need to install rpm packages via simple user, no root privileges.

Do you know if is there a solution that not imply the rpmdb creation?

Can I create a ~/.rpmmacros file that permit to the simple user to install relocable rpm into fs directory owned by the user?

Yum can solve the problem?

thanks a lot, Arm
 
Old 04-16-2009, 10:21 AM   #2
ssaha
Member
 
Registered: Feb 2009
Location: Kolkata,India
Distribution: Fedora 8,Ubuntu 8.04, 8.10, 9.04, 9.10
Posts: 108

Rep: Reputation: 18
you can open the terminal and type
#su-
password:
#yum install packagename
 
Old 04-16-2009, 11:18 AM   #3
cmdln
Member
 
Registered: Apr 2009
Location: Lawrence, KS
Distribution: Debian, Centos
Posts: 108
Blog Entries: 1

Rep: Reputation: 25
Quote:
Originally Posted by arm74 View Post
Hi all,

I have a problem to solve: I need to install rpm packages via simple user, no root privileges.

Do you know if is there a solution that not imply the rpmdb creation?

Can I create a ~/.rpmmacros file that permit to the simple user to install relocable rpm into fs directory owned by the user?

Yum can solve the problem?

thanks a lot, Arm

I believe you can specify an alternate rpm db to use as well as an alternate prefix to accomplish what you want.

Perhaps something like the following will work.
Code:
rpm -ivh --prefix=/home/arm74/ -dbpath /home/arm74/lib/rpm
You will probably need force it without dependencies.
 
Old 04-17-2009, 06:05 AM   #4
arm74
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
No way to obtain the same result without the creation of rpmdb?

Thanks, Armando
 
Old 04-17-2009, 06:26 AM   #5
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by arm74 View Post
No way to obtain the same result without the creation of rpmdb?

Thanks, Armando
rpm2cpio to conver rpm to cpio. then unpack cpio in any place you want.
You'll of course lost pre/post install scripts if they present.
 
Old 04-17-2009, 10:33 AM   #6
arm74
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Cool!

obviously I'm loosing the dependency check too, can you confirm?

last hope: someone know if the problem can be handle yum side?
In other words, can the simple user run successfully yum install giving it as parameter the rpm relocation path?


Thanks a lot, Arm
 
Old 04-18-2009, 12:57 AM   #7
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by arm74 View Post
Cool!

obviously I'm loosing the dependency check too, can you confirm?
Sure ! But you asked for the way to do it without creating rpmdb.
dependencies tracked via rpmdb, so...

Quote:
last hope: someone know if the problem can be handle yum side?
In other words, can the simple user run successfully yum install giving it as parameter the rpm relocation path?


Thanks a lot, Arm
Lets get it straight.
There are different reasons why rpm install should be run as root.
Some of them can be worked around, another - can't

1) rpm should put files in the directories where only root has write permissions.
Workaround - relocation path

2) rpm have write to rpmdb. Only root has access to rpmdb
Workaround - specify your own rpmdb with --dbpath

3) Sometimes pre/post install script have to do something only root allowed to do. for example creating new user.
Workaround - run rpm with --noscript option.

4) Sometimes program should have specific owner in order to work.
For example su, sudo, login have to be owned by root and with permission 4755 (root setuid programs)
No workaround

So while (most of) rpms can be installed as regular user to alternative location with alternative rpmdb, why bother ?

You lost most/all of rpm benefits.

In install by regular user case
rpm2cpio looks to me like more cleaner solution
 
Old 04-18-2009, 10:12 AM   #8
arm74
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Perfect,

thanks a lot, I'm managing to setup a solution based on creation of new rpmdb. I'm testing the yum install launch by simple user using the new rpmdb, if someone have same links showing the yum setup in this scenario please share that with me

thanks again, Armh
 
Old 04-30-2009, 04:13 AM   #9
vishnugaur
LQ Newbie
 
Registered: Apr 2009
Location: kanpur
Posts: 2

Rep: Reputation: 0
can any tell me the script of yum
 
Old 04-30-2009, 04:13 AM   #10
vishnugaur
LQ Newbie
 
Registered: Apr 2009
Location: kanpur
Posts: 2

Rep: Reputation: 0
how to configure yum through script?
 
Old 04-30-2009, 09:25 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try

man yum

and

http://prefetch.net/articles/yum.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm -ihv hp_qla2x00src-8.01.07.25-1.linux.rpm during Qlogic driver installation Dennisliu Linux - Software 5 09-10-2008 05:08 PM
rpm -i --prefix=/home/user package.src.rpm doesn't work? registering Linux - Software 2 07-18-2007 11:28 AM
how can i switchover from super user to simple user amit_linux Linux - Software 5 05-30-2007 11:52 AM
Why specific user/group for rpm installation alanbe Linux - Newbie 1 03-02-2005 04:27 PM
Simple RPM Question f1uke Linux - Newbie 3 06-05-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration