This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Task Discussion


  • Anonym   Sept. 25, 2011, 3:15 p.m.

    A question about rpm and yum... I had to install both utilities on Ubuntu (VirtualBox). Easy enough, but when running the commands shown in the videos about rpm and yum they don't return anything exiting. For instance, rpm -qa | wc -l returns 0 (no packages installed) and yum list returns nothing (no packages). Is this because Ubuntu / Debian use deb and apt-get instead? And if so, should I use rpm and yum on Ubuntu / Debian?

  • micklweiss   Sept. 25, 2011, 5:35 p.m.
    In Reply To:   Anonym   Sept. 25, 2011, 3:15 p.m.

    TL;DR:  Yes, that is correct (mostly). The exception being: instead of "deb" use "dpkg".

    You have different package managers for different Linux distributions - but you pretty much have to deal with either Redhat based distributions and Debian based distributions (technically there are also distros that just package source files, but they are not as popular).

    .rpm packages are for Redhat based distros while .deb packages are used by Debian based distros. On Redhat you have the rpm command, on Debian you have dpkg (Debian Packager).

    Package management on Redhat used to be particularly horrible- when you only had rpm to deal with(you had something like .dll hell), until package managers like yum came along. Yum was originally a package manager used on Yellowdog Linux (a distro that runs on PowerPC)- based on Redhat. yum stands for Yellowdog Updater Modified. Another popular distro named SuSE had another solution named YaST (yet another setup tool)- which had a GUI to do package management. It was a bit clunky, and slow - so they created a wrapper around it called zypper (similar to yum and apt-get).

    For the Linux+ cert I believe they only cover the rpm command and yum. I haven't taken it - so I'm no authority in the matter. You will always find the rpm command on Redhat based distros  and you will always find dpkg on Debian based distros. They work more on a "lower level" - doing things like package manipulation - while the other tools work more like intelligent wrappers around those lower level tools.

    On Debian apt-get is the package manager that is used by default (APT stands for Advanced Package Tool), but most people have switched to aptitude. One of the reasons that people switched was because aptitude handles dependency hell a lot better than apt-get. If you have circular dependencies (weird things can happen), it gives you options as to how to hand

    If you ever need to convert between .rpm and .deb there is a quick and dirty hack called "alien". Only use it if you must (like when some weird vendor refuses to give you the source of the package, and they package it for a different distro than yours). This isn't the "normal case", and should be avoided- but it is great when you need it.

    To get back to your post:

    To list your installed packages (and count them) on Debian/Ubuntu you can do:

    dpkg -l | wc -l

    For more info on your package manager of choice, check the manpage:

    man apt-get

    Rant:

    If you are thinking "geez, on Mac/Windows package management is easier..." - it isn't. You have: .app, .dmg, .pkg, .mpkg etc. on OSX. Also, it is lots of fun to try and uninstall a .pkg/.mpkg without a third party package manager (as many of those exist for OSX as there are for Linux).

    In Windows you have a bunch of different installers like: Wise, Microsoft Installer, NSIS, InnoSetup, InstallShield, InstallBuilder, InstallJammer, IzPack, InstallSimple ... (there are more) and software removal can be pretty painful - especially when there is no uninstaller.

  • Frank Perez   Sept. 25, 2011, 7:53 p.m.
    In Reply To:   micklweiss   Sept. 25, 2011, 5:35 p.m.

    Nicely Said.

  • Anonym   Sept. 26, 2011, 6:17 a.m.
    In Reply To:   micklweiss   Sept. 25, 2011, 5:35 p.m.

    Many thanks for your comprehensive reply - all makes perfect sense.

  • Simphiwe   July 20, 2011, 9:20 a.m.

    It sends me to the link https://rapidshare.com/#!download|145tl|461717020|VirtualBoxLinuxInstall.mp4|42526, where i've been asked to sign-up before download and seems there are costs involved there too. Is there a free download of the vidoes maybe torrents or something?

  • Frank Perez   July 20, 2011, 10:10 a.m.
    In Reply To:   Simphiwe   July 20, 2011, 9:20 a.m.

    You should see the regular download part that does not cost anything. That is a free site for downloads. You only have to pay if you want faster downloads.

  • Simphiwe   July 20, 2011, 8:53 a.m.

    Is there a way I can download the whole videos of the caurse to my computer rather than watching them in the internet online. Its kind of expensive that way and I dont have 24 hour internet access...

  • Frank Perez   July 20, 2011, 8:55 a.m.
    In Reply To:   Simphiwe   July 20, 2011, 8:53 a.m.

    When opening the page with the video, you will see a download link that will allow you to download the video directly to your computer.