LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   tar.gz or rpm? (https://www.linuxquestions.org/questions/linux-general-1/tar-gz-or-rpm-40058/)

Flawe 01-02-2003 04:20 AM

tar.gz or rpm?
 
What's the difference between tar.gz and rpm?? I mena, I know there is a difference but I've noticed some programs come in both formats. Is rpm something for Suse only??
What's that easiest way to install a program on Suse? I don't really know how to install a program so I'd be glad if some one could help me installing one from rpm or tar.gz.

Thanx

FredrikN 01-02-2003 04:30 AM

RPM stands for RedHatPackageManager.

A lot of linux dist uses RPM, not only Suse and RedHat.

The big diffrent between RPM and and tar.gz is that you don't need to compile the RPM package.

I don't use RPM at all, downloading the source is better in many ways.

All packages don't exists in the RPM format and you will learn a lot more to download and compile the source by yourself

"What's that easiest way to install a program on Suse?"

If you are new to Linux maybe you should use RPM for now

Just download the RPM package you want and then open an console window and type rpm -ivh rpm_package.rpm

Or you can try Yast2 if you like, it's also easy to but takes a little bit longer

MasterC 01-02-2003 04:45 AM

Well see a search probably will turn up LOADS of answers, but it's just after the holidays, I am in a great mood, and at work, bored out of my gored, and can answer this question, so here ya go :)

RPM stands for Redat Package Manager. Redhat designed this packaging system. It does appear to make things so much easier, especially for newbies used to running win. There are some drawbacks, like dependencies. Yes (I will explain them in a minute but for now..) tarballs (.tar.gz .tgz .tar) files have dependencies as well, but just don't seem to have the problems rpm's have sometimes. Also, RPM requires a database that seems to get corrupted at the stroke of midnight every full moon ;) Not really, but it does seem to have it's share of problems.

RPM's are good for systems that are "RPM based" like SuSE, Mandrake, and obviously, Red Hat. They are built with RPM's the database is created, and from there each package added goes into the database. This seems all fine and dandy.

To install an RPM is usually easy, there are many graphical tools that come with most distros, kpackage comes immediately to mind. Also, this can be done via command line:
rpm -Ivh filename.rpm

Or man rpm to see all the options.

Tarballs:

Tarballs seem to have less problems installing, actually search for a file to determine dependency (rather than require a database, although db does speed things up) and runs through and allows you to customize the install path, the lib path, and whatever else you want. It's usually thought to be for more advanced users, but this is not true, not always. Lately it seems that linux is becoming more and more "standard" so a default place to install and look for things is becoming a reality. So now you can:
./configure
make
make install
most tarballs, and everything goes well. Now a break down of those commands:
./configure
This does all the checking on the file to find your architecture, and many other things. It checks lib directories for shared libs, it edits the Makefile that you will be using in the next step.

make
This goes through and prepares all the files in the package to be installed onto your system, or ran from the directory in which the tarball was unpacked. It also compiles the necessary binaries to be able to be executed. (My definition of this sucks, but works for general knowledge ;) )

make install
This usually has to be run as root. It places the files into their necessary locations, the libs go into the lib directory (/usr/lib or /lib or whatever) and the binaries go into a location in your $PATH. The path is a group of locations that linux looks for when executing binaries (programs). Usually your path includes /usr/bin /bin and /usr/local/bin but this can change from distro to distro, and can be set by yourself or by root depending on your needs/wants and desires.

Unpacking the tarball.
If the tarball is compressed, you will need to determine what it's compressed with, if the extension is: .tar.gz or .tgz then it's usually compressed with gzip. This file is said to be gzipped and tarred. To unpack this archive usually:
tar xvzf filename.tar.gz
will suffice. Once upacked, you will usually see a README or INSTALL file in the directory that was created during the unpacking. These files usually contain information on installing these files, but usually the default from above (./configure make make install) will work.

If the file is compressed with bzip, it will usually end with .tar.bz2 This file can usually be decompressed with:
tar xvjf filename.tar.bz2

bz2 files seem to have better compression than gzipped ones.

Tarred files. files ending with .tar are just bundled up, not compressed (usually). To unpack these files:
tar xvf filename.tar

If there is no extension (since linux doesn't require extensions) there is still a way to find out if a file is a compressed archive, and what type. Simply type:
file filename
And it will tell you what type of file it is, and then you can determine how to use it.

Now with all that, let's make sure I've answered your question(s):

RPM is not for SuSE only, but some programmers will make SuSE specific RPM's. If these exist, it is probably a good idea to use these.

Easiest way is probably to search through your CD's and find the program you want to install, if it exists to open up Yast2(?) and locate the filename and install via Yast2.
If it's not on your CD's, download the RPM and attempt to install with either one of the (many) gui RPM installers, or via the command line:
rpm -Ivh filename.rpm

And if you hit dependency issues, try to locate the depended files on your CDROM, if no luck, check out www.rpmfind.net and locate the RPM's that way, get them installed, then install the initial RPM.

FYI:
You'll need some extra packages that may not have been installed during the initial install to use/install tarballs. They are usually located in the development section. Look for make, gcc, autoconf(?) and a few others, but you'll probably figure out which ones farely early on if you don't have em.

Cool

Flawe 01-02-2003 05:52 AM

Thanx a lot guys

I really enjoyed your article here MasterC =) I think I'll have a great time learning Linux with you guys around here ;)

MasterC 01-02-2003 05:53 AM

ha ha ha, my article :D

You're welcome :)

I can sure be long winded when I have 12 hours to reply :D

Cool

Cynthia Blue 01-02-2003 08:28 AM

Well MasterC I'm glad you were bored and in a good mood! I'm just cruising around reading stuff, and this was definitely helpful. :)

Flawe 01-02-2003 11:13 AM

Yeah, that's right. I didn't mean no disrespect when I said article. I enjoyed it a lot :D

Take Care

MasterC 01-02-2003 11:56 AM

ha ha ha, I didn't think you did. :) It's almost big enough to be a mini-how to :D

Pharmacy tech, whoda thunk ;)

Cool


All times are GMT -5. The time now is 11:02 AM.