Posts Tagged ‘tar’

How to build a rpm file from a source file

Tuesday, March 11th, 2008

This is for the Redhat, Suse, Fedora, and CentOS users. Sometimes when you try to search for rpm packages, the only thing that you find is the source file. You can create a rpm file using this tar.gz or tar.bz2 file:

  1. save the source file(usually in tar.gz or tar.bz2 format)
  2. extract the files: tar -xvzf filename.tar.gz or tar -xvjf filename.tar.bz2
  3. open the folder of the extracted file and find .spec file
  4. type: rpmbuild -bb filename.spec
  5. see the error and continue according to the error until you finish creating rpm files
  6. type: rpm -Uvh filename.rpm to install

Guide for tar, gzip, and bzip2

Monday, March 3rd, 2008

Another issue I see on the message boards quite frequently users are trying to get their heads around tar archiving utilities, and gzip/bzip2 compression utilities. It pays to keep in mind that in the Windows world both of these are packaged together in the .zip format. In the Linux world, as with most things, more control comes at the price of more complexity, as the two issues of archiving and compression are separated.

I guess the first thing we should do is discuss the difference. Compression is a means to shrink the physical size of a file in bytes. The technical aspects of how compression works is a bit beyond the scope of this guide, so suffice it to say that the computer uses an algorithm to combine redundant bytes of data together. Archiving on the other hand, is the act of combining several files together into one, for ease of backup and distribution, all the while keeping the individual file attributes and permissions intact.

(more…)