LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs > raju.mopidevi
User Name
Password

Notices



Rating: 3 votes, 4.33 average.

Installing a software in LINUX

Posted 12-05-2009 at 12:00 PM by raju.mopidevi
Updated 12-05-2009 at 09:10 PM by raju.mopidevi

One of the most difficult things to get used to in the Linux world is installing new software packages. In the world of Windows, every program comes with a Setup.exe program that asks you some very easy questions and takes care of the job for you. While Linux software can be almost that easy to install, you will sometimes find software that seems to fight every step of the way. I can't cover all the problems you might run into, but I'll try to give you the basics and a few pointers to help get you over the rough spots.

Software tends to come in "packages". In the Windows world a package is a Setup.exe or a program.zip file. On a Mac a package is a program.dmg or a program.sit file. In the Linux world, there are several kinds of packages, and each distribution has its own preferred package format.


The standard Linux package format (according to the Linux Standard Base) is RPM. RPM is a packaging system originally developed by Red Hat and widely used in the Linux community. Distributions using it include Fedora, Mandriva, Red Hat (naturally), and SUSE. An RPM package file normally will be named something like program-version-other.rpm
Another popular package format is DEB, the Debian software package. Debian packages and the Advanced Packaging Tool (APT) were the first to introduce several advanced features that are now common, such as automatic dependency resolution and signed packages. Debian packages are used by Debian GNU/Linux (naturally), and distributions based on it, including Ubuntu, Knoppix, and Mepis. A Debian package file normally will be named something like program-version-other.deb

Tar Balls :

A tar ball is a (usually compressed) archive of files, similar to a Zip file on Windows or a Sit on the Mac. Tar balls come in files that end in .tar, .tar.gz, .tgz, or something along these lines. To unpack a tar ball, use this command.
Code:
[user]$ tar -xzvf filename.tar.gz
The parameters are x to extract files, z to filter through gzip for decompression (leave this off if the file does not have a gz extension), v for verbose mode so you can tell what's going on, f indicating there will be a filename to follow. You may want to create an alias called "untar" that feeds in these options if you have a hard time remembering command line options as I do.
for .bz2 add -j option to untar instead of -z option.
This command will not install the software, it will only extract the archived files. It is your job then to find the README file or INSTALL file and read its instructions for installation. If the archive contains binaries there will usually be a setup script (often called install.sh) that you must execute as "SUPER USER"( using su command )

Debian, Ubuntu: APT

There is a broad array of tools for working with DEB packages, but the one you will commonly use is apt-get, arguably the easiest of Linux package management tools. apt-get is so easy because it not only keeps track of what packages are installed, but also what other packages are available. It will even download them from the Internet for you (if properly configured).
Code:
[root]# apt-get install packagename
To remove software is just as easy.
Code:
[root]# apt-get remove packagename
Although the repositories that contain installable packages might live on the Internet or on a disc somewhere, APT keeps a local database on your hard drive with a list of all available packages and where to find them. This database needs to be explicitly updated. To update the APT database:
Code:
[root]# apt-get update
A common idiom is to update your package database, and then upgrade all the packages that have patches or security updates to install. The following command will do this all at once.
Code:
[root]# apt-get update; apt-get upgrade

Fedora, Red Hat: yum

yum does for RPM packages roughly what apt-get does for Debian packages. Like apt-get, yum can download and install packages from a configured repository.
Code:
[root]# yum install packagename
To remove software is just as easy.
Code:
[root]# yum remove packagename
yum does not keep a local copy of your package database by default, so normally there is no need to update it. To install all available security patches and bug fixes, use this command:
Code:
[root]# yum update
You can also explicitly update a single package with:
Code:
[root]# yum update packagename
Mandriva: urpm

Mandriva Linux (formerly Mandrake and Connectiva) has a toolset similar to APT called urpmi. To install software:
Code:
[root]# urpmi packagename
To remove software:
Code:
[root]# urpme packagename
To update the local package database:
Code:
[root]# urpmi.update -a
To install security updates and bug fixes:
Code:
[root]# urpmi --auto-select
SUSE : Yast

SUSE uses RPM as its native package format, but has its own high level tool to manage system software installation.
SUSE Linux uses a tool called yast (which allegedly is an acronym for Yet Another Setup Tool) to perform all kinds of system administration tasks, including installing software.
for example to install GNU Image Manipulation Program (GIMP)
Code:
# yast -i gimp
# zypper in gimp


Gentoo, Sabayon : Portage ( emerge )

Most users will work with Portage through the emerge tool
Updating the Portage tree
Code:
# emerge --sync
: Installing a software for example gnumeric
Code:
# emerge gnumeric
Updating your system
Code:
# emerge --update --ask world
Posted in Uncategorized
Views 1222 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    and what about "emerge" of gentoo? =)
    Posted 12-05-2009 at 01:51 PM by Web31337 Web31337 is offline
  2. Old Comment
    Quote:
    Originally Posted by Web31337 View Comment
    and what about "emerge" of gentoo? =)
    thanks for suggestion, i have added gentoo also
    Posted 12-05-2009 at 09:11 PM by raju.mopidevi raju.mopidevi is offline
 

  



All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement

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