Tuesday, January 13, 2015

How To Install Software In Linux : An Introduction

http://www.linux.com/community/blogs/133-general-linux/801474-how-to-install-software-in-linux-an-introduction

In any operating system we need to install applications to complete our day to day tasks. In the world of Windows, every program has a simple Setup.exe or a program.zip file. On a Mac a package is a program.dmg or a program.sit file. In both theoperating system you can simply click it and it will ask you some very basic configuration questions like, do you accept the licence agreement or the directory you want to install the software to. Although in Linux, It seems tough to install the programs/softwares but It's not true.
 


The second package manager format is DEB, stands for Debian. Debian packages and the APT (Advanced Packagin Tool) has made advanced features that are now commonly used, like, automatic dependency resolution and signed packages. Debian packages are used by Debian/Linux, and some of the most used Linux distributions, like, Ubuntu, Linux Mint, Mepis etc. The .deb/Debian files look like this program-version-other.deb

APT For Debian based distributions, like, Ubuntu, Linux Mint etc.



The APT is the tool, commonly used to install packages, remotely from the software repository. In short it's a simple command based tool that you use to install files/softwares. Complete command is apt-get and it's the easiest way to install files/Softwares packages. This easy tools informs you about packages that are currently being installed and also it informs you about the packages that are available in repositories.

apt-get install ${packagename}


To remove/uninstall any software, just use remove

apt-get remove ${packagename}


The software packages are somewhere in the online repositoies, APT handles a local database on the user's hard drive that contains informations about the available packages and where they are located. So when the types the command, apt-get install conky, the APT will start finding the package named conky in the database and will install conky once user types 'y' (yes). To get the all newly uploaded packages on the repositories, user need to update APT regularly. To update APT database:

apt-get update


To update the APT database and also upgrade the security updates and patches that might be available for some installed softwares, users may do it at once just by using the commands like this:

apt-get update; apt-get upgrade

And remember all of the package management tools I am discussing, will need user to be in root or superuser, for example to install software in debian based distributions you will use apt-get followed by sudo then It will ask you to enter password.

sudo apt-get install conky
sudo apt-get remove conky
sudo apt-get update

Install Software in Linux, Ubuntu, debian
Insert password to install any package


yum: For RPM based Linux distributions, like, Fedora, Red Hat



You will not have any trouble understanding yum because its same as apt-get. As 'apt-get' installs software packages for Debian packages, like that 'yum' installs software packages for RPM packages. It can also like apt-get download and install packages from a repository.

Yum install ${packagename}


To remove software packages, just use remove

yum remove ${packagename}


There is one thing to note that yum does not keep a local database by default in user's hard disk. So there is no need to update it. But to install available security paches and bug fixes, use the following command:

yum update


If user wants to update any single package then do it in the following way:

yum update ${packagename}


Tar Balls


You would remember in Windows you've Zip files .zip or in Mac .sit. The same way here in Linux you have Tar Balls (files) ending with extentions, like, .tar, .tar.gz, .tgz, or something else. To unpack a tar ball (file), use the following command:

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. The command will not install the software, but it will extract the archived files. After extracting files then you can install the extracted files by reading README file or INSTALL file (because there you can instructions for installing those particular files).

Other Linux Packaging Managements



Afcourse there are many distributions, so the packaging managing tools. Like, SUSE uses RPM as its native package format, but has its own tool to manage softwares on system. Yast is the packaging managing tool used in openSUSE Linux distribution, as well as SUSE's derived commercial distributions. I'll cover Yast in my other post.
I will cover some more majorly used packaging management tools like, 'dpkg' in my other post. The work and attributes of some other packaging management tools will be discussed in that post.
Also Read important article The Linux Permissions: An Introduction

No comments:

Post a Comment