Installing Software, Part 1 - Repositories


Published on

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.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Installing Software, Part 1 - Repositories

  1. 1. Installing Software Part 1 Kevin B. O'Brien Washtenaw Linux Users Group
  2. 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 2
  3. 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 3
  4. 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” 4
  5. 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 5
  6. 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 6
  7. 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 7 file needed by that application
  8. 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 8
  9. 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 9
  10. 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". 10
  11. 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 11
  12. 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 12
  13. 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 13
  14. 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 14
  15. 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 15
  16. 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 16
  17. 17. System Diagram R e p o s it o r ie s P a c k a g e M a n a g e r P a c k a g e M a n a g e r D a t a b a s e 17
  18. 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 18
  19. 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 19
  20. 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 20
  21. 21. Synaptic 2 21
  22. 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 22
  23. 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 23
  24. 24. Synaptic 5 ● To manage your repositories, go to Settings → Repositories 24
  25. 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. 25
  26. 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 26 is in Restricted, and codecs and DVD playing are in Multiverse
  27. 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 27
  28. 28. Synaptic 9 28
  29. 29. Synaptic 10 ● For example, go to ● You will this line, which you can copy deb 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 29
  30. 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”) 30
  31. 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  31
  32. 32. Synaptic 13 32
  33. 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. 33
  34. 34. PackageKit 1 ● This is the Fedora Package Manager ● It is very similar to Synaptic, which is not surprising since they do similar things 34
  35. 35. PackageKit 2 35
  36. 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 36
  37. 37. PackageKit 4 37
  38. 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 38 Repositories
  39. 39. PackageKit 6 ● See ● “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 39
  40. 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 40
  41. 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 41
  42. 42. YAST 2 42
  43. 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 43
  44. 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 ge_Repositories 44
  45. 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 45
  46. 46. YAST 6 46
  47. 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 47
  48. 48. YAST 8 48
  49. 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 49
  50. 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. 50