installing software, part 1 - repositories

50
Installing Software Part 1 Kevin B. O'Brien Washtenaw Linux Users Group http://www.lugwash.org

Upload: kevin-obrien

Post on 17-May-2015

1.587 views

Category:

Technology


2 download

DESCRIPTION

This first part in a series looks at how you can use repositories to make it easy to install, upgrade, and maintain your Linux software.

TRANSCRIPT

Page 1: Installing Software, Part 1 - Repositories

Installing Software Part 1

Kevin B. O'BrienWashtenaw Linux Users Group

http://www.lugwash.org

Page 2: Installing Software, Part 1 - Repositories

2

Audience

● This is intended for the new user just getting started on Linux

● I will assume that most new users are coming over from Windows

● I will not assume much knowledge of Linux

Page 3: Installing Software, Part 1 - Repositories

3

Distributions

● I will focus on three representative distributions:

– Ubuntu

– OpenSUSE

– Fedora

● These are likely starter distros for new users● Most other distros are related in some way or

use similar technology

Page 4: Installing Software, Part 1 - Repositories

4

Dependencies 1

● This is the first key concept for installing software

● Linux is built on a modular model – instead of one large monolithic installation file, each package installs only the specific file for that package, and everything else is in other files that are shared among all software packages

● These other files are called “dependencies”

Page 5: Installing Software, Part 1 - Repositories

5

Dependencies 2

● Years ago, dependencies caused a lot of problems

● Today, this is usually not a problem (though you can run into an occasional snag)

● One analogy is that dependencies work in a similar way to *.dll files in Windows, which are also shared among applications

Page 6: Installing Software, Part 1 - Repositories

6

Dependencies 3

● The main problem is when two different programs each need a different version

● In Windows, it often means the last one installed over-writes whatever was there previously

● In Linux, it will note the conflict, and refuse to do the installation

Page 7: Installing Software, Part 1 - Repositories

7

Dependencies 4

● In Windows, there is no way to know which application wanted a particular *.dll, nor can you keep track of these problems

● In Linux, most package managers today will keep a record of this information, and warn you if you try to change a shared library (this is kept in a database)

● Package managers may even insist on removing an application if you force the removal of a key file needed by that application

Page 8: Installing Software, Part 1 - Repositories

8

Packages

● Packages are the name used in Linux for the installation files for software

● They contain the code for the application● They also contain information about any other

files (dependencies) required for the software to work properly

Page 9: Installing Software, Part 1 - Repositories

9

Package Managers 1

● Most of the time, you can do what you need using a Package Manager

● This is a software program that keeps track of what is installed on your system (in a database)

● It also looks at the dependencies, and if possible will download and install any other files needed for your application to work properly

Page 10: Installing Software, Part 1 - Repositories

10

Package Managers 2

Ian Murdock has commented that package management is "the single biggest advancement Linux has brought to the industry", that it blurs the boundaries between operating system and applications, and that it makes it "easier to push new innovations [...] into the marketplace and [...] evolve the OS".

Page 11: Installing Software, Part 1 - Repositories

11

Package Managers 3

● Package Managers can also catch conflicts, and give you an error message rather than overwrite a file that you need for something else

● Among the major package managers are:– Dpkg for Debian

– RPM for Fedora

– Libzypp for OpenSUSE

Page 12: Installing Software, Part 1 - Repositories

12

Package Managers 4

● Package Managers can be handled entirely on the command line

● There are also GUI interfaces that may be easier for a new user:

– Synaptic for Ubuntu

– YAST for OpenSUSE

– PackageKit for Fedora

● Others may also be available if you look

Page 13: Installing Software, Part 1 - Repositories

13

Repositories 1

● These are online collections of downloadable software

● They are designed to work with a Package Manager

● There are large repositories set up by the distro vendor that have all of the basic OS files, and sometimes a distro-specific version of thrid-party applications

Page 14: Installing Software, Part 1 - Repositories

14

Repositories 2

● There are also repositories set up by third party vendors to supply their own applications

● These are often divided into different sections for distro “families”

● Distro “families” come about when a person or group decides to create a “spin-off” distro based on a previously developed one

Page 15: Installing Software, Part 1 - Repositories

15

Distro Families

● Debian is the source for Xandros, Knoppix, and Ubuntu. In turn Ubuntu gave rise to MEPIS and Linux Mint

● Red Hat gave rise to Fedora, Mandriva, and TurboLinux

● This matters when you are looking at packages and repositories, because the one you need is often based on what “family” you are part of

Page 16: Installing Software, Part 1 - Repositories

16

Repositories 3

● For example, Ubuntu has become so popular that it often has its own repositories, but it is usually fine to add a generic Debian repository

● Similarly, a Fedora or Mandriva user will generally be fine with any Red Hat or RPM repository

Page 17: Installing Software, Part 1 - Repositories

17

System Diagram

P a c k a g e M a n a g e r

D a t a b a s eP a c k a g e M a n a g e r

R e p o s i t o r i e s

Page 18: Installing Software, Part 1 - Repositories

18

Repositories 4

● You should have the repositories for your distro already in the database when you install the OS

● But you can add more● Look for repositories designed for your distro if

possible, or at least for your family

Page 19: Installing Software, Part 1 - Repositories

19

GUI for Package Management

● These all work in pretty similar ways● They allow you to add or remove repositories● You can search for software by name, or

browse by categories● Unless it is a very specialized type of

application (and often even then) you will find software to do just about anything you want to do if you have the right repositories

Page 20: Installing Software, Part 1 - Repositories

20

Synaptic 1

● This is the default GUI for package management in Ubuntu, and is commonly used

● Go to System → Administration → Synaptic Package Manager to start it

● You will need to supply your password to run this since installing software is a system administration task

Page 21: Installing Software, Part 1 - Repositories

21

Synaptic 2

Page 22: Installing Software, Part 1 - Repositories

22

Synaptic 3

● Note you can browse by selecting a category on the left, or you can search by selecting “All” and entering a search on the upper right

● You can reload the database for the most up-to-date information from the repositories by clicking the “Reload” button

● You can look at packages by whether or not they are installed by clicking the “Status” button on the lower left

Page 23: Installing Software, Part 1 - Repositories

23

Synaptic 4

● You can see which repository each package comes from by clicking the “Origin” button on the lower left

● You can view by various filters as well

Page 24: Installing Software, Part 1 - Repositories

24

Synaptic 5

● To manage your repositories, go to Settings → Repositories

Page 25: Installing Software, Part 1 - Repositories

25

Synaptic 6

● The two tabs you are most interested in are the first two, Ubuntu Software and Third-Party Software, but we'll look at all 5

● On the first tab, note that Ubuntu gives you several options

– Main is the repository for Ubuntu-supported packages. These are all open, non-proprietary, and non-controversial.

– Universe is similar, but maintained by the community, not by Canonical employees.

Page 26: Installing Software, Part 1 - Repositories

26

Synaptic 7

● Non-free software– You can uncheck these repositories if you do

not want any non-free software on your system

– This would mean no binary drivers for hardware, no proprietary codecs, no playing of DVDs, etc.

– But if you want to do these things, you can enable these repositories as well

– Proprietary Drivers is for hardware drivers and is in Restricted, and codecs and DVD playing are in Multiverse

Page 27: Installing Software, Part 1 - Repositories

27

Synaptic 8

● Third-Party Software lets you add repositories from other software providers

● Examples: Google, Miro, Sun, VirtualBox● You need to get the repository address from the

Web site, generally

Page 28: Installing Software, Part 1 - Repositories

28

Synaptic 9

Page 29: Installing Software, Part 1 - Repositories

29

Synaptic 10● For example, go to

http://www.virtualbox.org/wiki/Linux_Downloads● You will this line, which you can copy

deb http://download.virtualbox.org/virtualbox/debian jaunty non-free

● The “deb” at the beginning identifies this as a “Debian” style repository. At the end, you can see that it is for Ubuntu Jaunty, and is not a “free” package

Page 30: Installing Software, Part 1 - Repositories

30

Synaptic 11

● In the Third-Party Software screen, click “Add” and copy the entire line, beginning with “deb”, and ending with “non-free”

● If at a later time you need to stop using a repository for some reason, you can either remove it, or just remove the check mark to disable it temporarily

● You can also Edit each entry (e.g. change “intrepid” to “jaunty”)

Page 31: Installing Software, Part 1 - Repositories

31

Synaptic 12

● The third tab lets you fine-tune what you will pull down from Ubuntu repositories

● You can have it check for updates, and notify you when they are available. You can even have security updates automatically installed if you wish.

● If you don't like living dangerously, this is a good place to not check for pre-release and unsupported updates

Page 32: Installing Software, Part 1 - Repositories

32

Synaptic 13

Page 33: Installing Software, Part 1 - Repositories

33

Synaptic 14

● On tab 4 you can check and add signing keys for your repositories. This is how you can be sure you are getting the files from the right source.

● On the last tab, you can help Ubuntu find which packages re most popular by agreeing to submit statistics. This might be useful.

Page 34: Installing Software, Part 1 - Repositories

34

PackageKit 1

● This is the Fedora Package Manager● It is very similar to Synaptic, which is not

surprising since they do similar things

Page 35: Installing Software, Part 1 - Repositories

35

PackageKit 2

Page 36: Installing Software, Part 1 - Repositories

36

PackageKit 3

● Again, you can search for a specific package by putting the name in the upper left box and clicking “Find”, or you can browse by category

● You can refresh the listings of packages from your repositories by going to System → Refresh Package Lists

● You can work with your repositories by going to System → Software sources

Page 37: Installing Software, Part 1 - Repositories

37

PackageKit 4

Page 38: Installing Software, Part 1 - Repositories

38

PackageKit 5

● Obviously, the repository system is not as developed in Fedora

● But it will probably be developed more with time

● For instance, in Fedora 11, there is now provision for installing “firmware” or drivers, for hardware

● However, there is also a philosophical difference in how Fedora views Third-Party Repositories

Page 39: Installing Software, Part 1 - Repositories

39

PackageKit 6● See http://www.packagekit.org/pk-faq.html● “Allowing to easily add third party repositories and

install third party software without a certification infrastructure is like opening the gates to hell. Most user just don't have got the technical understanding to handle this well.” _ Sebastian Heinlein

● There is a way, though: installing the repo-release.rpm package which also adds the GPG keys

Page 40: Installing Software, Part 1 - Repositories

40

PackageKit 7

● To install the RPM packages means going to the command line

● Installing from the command line will be covered in the next installment of this series on installing software

● We will definitely cover installing RPM files in that installment

Page 41: Installing Software, Part 1 - Repositories

41

YAST 1

● YAST is the SUSE tool for managing packages● YAST does a lot more. It is the general

administration tool in SUSE.● To begin installing software with YAST, go the

SUSE button in the lower left, then to Applications → Configuration → Install Software

Page 42: Installing Software, Part 1 - Repositories

42

YAST 2

Page 43: Installing Software, Part 1 - Repositories

43

YAST 3

● This looks a little different from Synaptic and PackageKit, but does the same kinds of things

● The “Filters” box is important here. If you set it to “Search”, you can search for specific packages

● If you set it to Package Groups, you can browse for packages by category

● To see your repositories, go to Configuration → Repositories

Page 44: Installing Software, Part 1 - Repositories

44

YAST 4

● Again, only the official repositories are here by default

● But YAST is a little less prickly than PackageKit about adding Third-Party repositories

● There is a good list at http://en.opensuse.org/Additional_YaST_Package_Repositories

Page 45: Installing Software, Part 1 - Repositories

45

YAST 5

● To add a Third-Party Repository, click the “Add” button on the Repository screen

● On the next screen, you will have “Specify URL” and “Download repository description files” selected by default

● Click “Next”, and you can enter the URL of the repository

Page 46: Installing Software, Part 1 - Repositories

46

YAST 6

Page 47: Installing Software, Part 1 - Repositories

47

YAST 7

● Click “Next” and the repository will be added and information downloaded

● Then you will be back at the Repository screen, but with a new Repository now listed

Page 48: Installing Software, Part 1 - Repositories

48

YAST 8

Page 49: Installing Software, Part 1 - Repositories

49

Software Updates● Package Managers will check the repositories at

intervals (usually once a day) for updates to your software

● This can be security or bug fixes (as with Windows Update) but this is even better

– It covers all of your packages, not just the OS

– It can include updates to new features and new versions

● If you do not use Package Managers and Repositories you don't get this

Page 50: Installing Software, Part 1 - Repositories

50

Final Thoughts

● Using these Package Managers and Repositories is the easiest way to access a wealth of software

● When you can use them you probably should● Using Package Managers and Repositories lets

you get automatic updates and fixes. If you install in other ways, you don't get this benefit.