Installing Softwares
Installing Softwares
Installing and Updating Linux Software
In Linux the single piece of file to install software which has many files with in it, there are source codes file there are configuration files and all this constitutes the software and the term used for this is Package.
In Linux there are three different formats for software
tar files : - Is termed as tapped archive and the file type is .tar or .tgz. This type of file is also used to install software in most of the Unix distributions.
rpm files : - Redhat Package Manager files and is in .rpm format.
deb files : - Debian Package Manager files and is in the .deb format.
Taking the discussion more towards the package managers there are two major package managers available for Linux and RPM and DEB.
These software management processes (RPM and DEB) make the installation process unified and also keeps a database of all the package installed and also has information of all the dependencies.
Mostly the rpm package manager can be used on any Linux installation not only Red Hat. But also you should not mix and match the two package managers. I mean to say that this is mostly prevented to have a Linux distribution using both the .deb files and .rpm files for installing software. Let me discuss different features of both the package managers and that will also help you understand the installing, removing, updating and querying a particular software on Linux OS.
Redhat Package Management
Used
This package manager is widely used by various Linux distributions
Redhat
Mandrake
Linux Power PC
Naming Convention
package-a.b.c-x.arch.rpm
package Package name
a.b.c Software version
x Release version of the software
arch Architecture ( like i386, i586, i686 or PPC)
rpm extension for identifying this as a rpm file.
Sometimes you will also see src in the file name this means that this is not precompiled for a architecture and is the source code rpm and you have to compile it of your own for your architecture, Lets not get into what compiling as that will be out of our study scope.
rpm command
rpm [operation] [option] [package]
operations
-i Install package from scratch with the man pages.
-U Update previous installed software
-q Query the database for the package and its dependencies
-e Uninstalls the package and its man pages
options
--force
Say if you cannot complete the installation and you get errors like some files will have to be overwritten or some package will be overwritten. You can use this option but make sure you know what is being overwritten and make sure that does not affect anything else that you might have on the system. Point is that use this option with Caution.
--nodeps
This option installs the software without looking into the dependencies. But again this may not be used as the software will be installed but it may not work correctly due to the dependencies not being installed
Lets just conclude the rpm section with the command used to install softwares
rpm -ivh package.rpm
For online resources to the rpm files use the following links : -
http://www.rhn.redhat.com (you will need a your self registered for RHN first for this)
Debian Package Manager
This package manager is most highly regarded in Linux than Redhat rpm.
Used
Debian
Offshoots (Storm,Corel)
Naming convention
The same as rpm but instead if .rpm this has .deb as file extension.
Commands
dpkg
-i Installs
-P Purge or remove
-p Print information about installed packages
-I Information about the uninstalled packages
apt-get
update Obtains updates from remote locations for updating installed software’s.
install Installs the software from the remote location
The term remote location that I am referring to above is actually contains a list of trusted servers for installation and system updates and the addresses are stored on a local file called sources.list
This apt-get command will install all the required dependencies as well and you don’t have to worry about installing the dependencies for the software once command is run it will install the software automatically.
For Example
apt-get install apache
The above command will download all the dependencies and all the necessary database files from the sites in the sources.list file and will install apache on the system.
Tar Files
Works on every distribution
More work has to be done for installing software using these files
Basic use for such files will be as under
tar xvf package-name.tar package-install-directory
tar xvzf package-name.tgz package-install directory
example: -
tar xvf media-player.tar /opt
So the above command will extract all the required files into the /opt directory and when you get into the newly created directory for media-player you will find a README file in there. Do go through this README file as it will contain the next steps for installing the media-player software