LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2012, 08:20 PM   #1
narin1975
LQ Newbie
 
Registered: Aug 2012
Posts: 16

Rep: Reputation: Disabled
a bunch of linux newbie questions


Hi

I am learning to use linux (CentOS). I have a few questions which I could not quite find the answers from books.

1. Which directory in the file system does rpm actually store all available packages? And if I have a software to install, should I store its .rpm file on that directory or it could be placed anywhere.

2. Is it true that we should not install any non-system admin related software as root? If so, how do we ensure the software will have all necessary permission to access any files it needs to?

3. What is the primary purpose of /var? What should be kept in here in general?


Thanks,
Narin
 
Old 08-19-2012, 08:45 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,379
Blog Entries: 16

Rep: Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155Reputation: 3155
I'll take a quick shot based on my limited understanding as an intermediate home user.

Quote:
1. Which directory in the file system does rpm actually store all available packages? And if I have a software to install, should I store its .rpm file on that directory or it could be placed anywhere.
Package managers such as RPM do not normally store available packages. They store links to repositories on the web where the packages reside. Most users do not store the source package; they install the package and move on. This can vary in enterprise environments, in which local repositories may be desirable.

Quote:
2. Is it true that we should not install any non-system admin related software as root? If so, how do we ensure the software will have all necessary permission to access any files it needs to?
Software that is supposed to be available to all users of the computer should be installed as root. Otherwise, it is available only to the user who installed it.

Quote:
3. What is the primary purpose of /var? What should be kept in here in general?
As regards /var, var is short for "variable." It is a location for log files, mail files, and other files that tend to change with usage. Generally, users do not put anything there; the system does that. In enterprise webserver environments, the Apache htdocs (website) files are sometimes stored in /var.

Here's a good intro to the Linux file system: http://www.cyberciti.biz/tips/unders...em-part-i.html

Last edited by frankbell; 08-19-2012 at 08:46 PM.
 
Old 08-19-2012, 09:00 PM   #3
narin1975
LQ Newbie
 
Registered: Aug 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
thanks a lot!
 
Old 08-20-2012, 12:37 PM   #4
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,516

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
You may have read it, but if you haven't
http://wiki.centos.org/AdditionalRes...epositories%29
tells you about getting extra software from other repositories; CentOS just has the stuff on the 2 installation DVDs. If you do use other repos, follow their advice on using prorities:
http://wiki.centos.org/PackageManagement/Yum/Priorities
Set CentOS with priority=1, EPEL with priority=2, and any others with 3, 4, etc.
 
Old 08-20-2012, 08:44 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
Qn2. addendum answer: if you are installing via the repos, it will take care of ownerships & perms for you.
 
Old 08-21-2012, 02:57 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
A few points to add to frankbell's post.


Your package manager likely does have a directory for the temporary caching of rpm packages it downloads and installs for you (probably somewhere in /var), but there's generally no reason for you to be messing with it, other than perhaps to empty it if your disk runs out of space.

Various projects sometimes offer downloadable rpm's that you can install manually too. Most of the time you should first check to see if your distribution offers the program first, and only go for the manual installation if you find nothing, or you have some other specific reason for not using the distro's package (i.e. it only has an older version available).

Manual installation generally involves simply downloading the package (location doesn't matter) and running a specific installation command with root privileges. My system isn't rpm-based though, so you'll have to research what that command is yourself.

There are also a few projects, such as firefox, that offer binaries that are not standard rpm packages, but come packaged inside their own home-rolled installation scripts. You sometimes have a choice with these. If you run the installer as root, then it can be made available system-wide, but if you run it as another user it can be installed to a local directory (usually your home) and only be available to that user.

Yet another common option for installing software involves downloading the source code for it and compiling it yourself. You download the source package, decompress it to a working directory, and run a series of compiling commands on the files. This can all be done as non-root. Finally you can become root (for global access, or they can usually be configured to install locally as well) and run the final install command, which will put the binary files where they need to go.

One limitation of source compiling (and other non-standard packages) is that they don't generally integrate with your package manager. You have to track/update everything manually and usually keep the source/installer around if you ever want to uninstall it again. For source packages I therefore recommend running the checkinstall program in place of the regular install command. It will convert the source install into an rpm (or other package type), which can be then be installed and managed by your system regularly.

Last edited by David the H.; 08-21-2012 at 02:58 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Preparing to switch to linux, bunch of silly questions linuxfanboy Linux - Newbie 11 05-26-2009 03:06 AM
A bunch of vaguely Linux-related questions ... aslam_md Linux - Newbie 17 09-05-2008 08:10 AM
Working with SuSE (a bunch of newbie questions..) Kelvie Linux - Newbie 2 05-21-2004 03:50 AM
Bunch of newbie questions about mandrake 9.1 calimer Linux - Newbie 3 05-26-2003 02:33 AM
A bunch of newbie questions so you can laugh at me Peleus Linux - Newbie 4 05-06-2003 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:09 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration