Installing new software

From Klaus' wiki
Revision as of 13:47, 21 January 2017 by Klaus (Talk | contribs)

Jump to: navigation, search

Installing new software is usually rather easy on Linux. When you received the Software-in-a-box most software was installed and in a working condition. But sometimes a small bit is missing or your software needs to be updated.

The Yellowdog Update Modified

The Centos uses the yum (Yellow-dog Update Modifier) to control the software. yum is a command-line tool. But luckily a bright Dane wrote a graphical tool the gives a somewhat more intuitive interface to yum, the yumex Yum Extender. So everything yumex can do yum also can do and often a bit quicker because there is no graphics to update.

You'll find yumex in the menu. It should be intuitive to use, so no more explanation here.

Software Repositories

Most of the software you'll need is stored in repositories controlled by e.g. the Centos organisation, but also others contributes with important repositories. In general Centos is built using free software without any kind of patent rights or closed source, but some software is often necessary to circumvent the free and open mind. Hence someone sets up these alternative repositories.

Invoke yum

As told yum is a command-line tool. So you'll have to find a console in order to work with yum. yum requires root access in order to perform install, update and erase of packages. To learn more about yum type in

]$ man yum

If you want to see the active list of repo's (repositories) type in

]$ yum repolist

and you'll get something like this

Yum-repolist.png

From here we can see that we are pulling software packages from the base, extras, updates and epel repo's. The first three is directly from the source of Centos whereas the last is from a group of people, that felt that something is missing and therefore keep a quite large base of other applications, that are usually needed in a Centos (and RHEL, Oracle, Scientific Linux etc, who all are based on the Red Hat Enterprise Linux (RHEL)) installation.

If you need to install software that you cannot find in these repositories first try to locate if somebody have made a repository containing the needed software. E.g. Google Chrome is installed by adding a repository from Google and from that repository you can pull the Chrome browser. In this way you'll always have the latest.

Software updates

Linux software as all other software is updated regularly. The updates contains both important security patches, bugfixes and new functionality.

Therefore you should regularly, say every other week, execute this command

]$ sudo yum update

in order to keep your system up to date.

Often you'll just get something like this

Yum-repolist1.png

but other times you'll get a long list of packages to update. Just let the update run and you can perform other work while the system is being updated. It will not restart or do any other annoying things while updating. If you get a new kernel I recommend you to restart your system first time convenient. Otherwise just keep on working.

Install new software

Sometimes you'll find instructions on the Internet that this or that package must be installed in order to perform some function that you need.

For example lets say that you need the GNU debugger, gdb. First search for the package by executing

]$ yum search gdb

Yum-search1.png

We see that there are a lot of packages that includes the gdb word in the name or in the description. We can see that the package we're instrested in could be gdb.x86_64 : A GNU source-level debugger for C, C++, Fortran, Go and other languages

Let's see what's installed

]$ yum list gbd.x86_64

Yum-search2.png

so gdb was installed and originally it came from the base repo.

In case that the gdb package was not installed you can issue this command:

]$ sudo yum install gdb

Notice: no need to specify the CPU architecture (.x86_64). Yum will just pick the correct version for you.

You'll get something like this:

Yum-search3.png

We can see that in order to install the gdb package yum has found out that gdb is not dependant on other packages. If it were yum will suggests to install the dependant packages also.

Just hit y in order to let the installation begin.

In the following picture you see an example of installe several packages in one time. Just list the packages after the yum install command.

Yum-search4.png