Debian:
There are various methods to installing new programs on a Debian system. I like to classify them according to your connection type.
This is the "classic" way of updating a Debian system. Typically, you could go to Debian's website or any one of its mirrors and download a package.
to install it.
The main drawback to this is that you may find a package that you like but it may have dependencies (ie. other programs that it needs to make it run) and if you don't have those packages, then the install will fail.
This is what the Debian people themselves have to say about this method:
Many people find this approach much too time-consuming, since Debian evolves so quickly -- typically, a dozen or more new packages are uploaded every week. This number is larger just before a new major release. To deal with this avalanche, many people prefer to use automated programs.
Despite what they say, the main advantage of dpkg, it seems to me, is that it is easy for people who have dial-up connections. This is because the alternative, automated programs they're talking about, which are dselect and apt-get are better for permanent connections (cable, xDSL, T1, T3). Let's talk about this method of installing new programs with Debian.
When you use dselect you get a graphic user interface of sorts (not under X window, though) to guide you through the install of new programs.
First you'll get asked for your preferred access method. That means, how you're going to get and install them. For example, if I were doing an install of Debian with CDs, then I would choose CD-ROM. But if I were updating, I would choose FTP
Then you would choose the packages you want with a + sign. You can even put updates on hold (indicate that you want to update, but not actually do it) with a = sign. There may even be conflicts or dependency problems and 'dselect' will warn you about those.
Then you start the process by choosing the install option.
Debian will then configure the installed packages.
Then you're on your way.
As I said before, the main advantage to this is that any conflicts or dependency problems will be resolved right here. The Debian people point out that this is ideal for installs or large-scale upgrades. If that's the case, it seems that a slow and sometimes expensive dial-up connection would be less than ideal for this.
Red Hat:
The way you install a new program will depend primarily on two things:
1) What distribution (version) of Linux are you using?
2) What is the origin of the program that you want to install?
RPM
If you're using Red Hat or a distribution that bases itself on Red Hat, then you're going to use the RPM method. OK racing fans- RPM doesn't have anything to do with revolutions per minute. It stands for Red Hat PackageManager. This system takes the heartache out of installing programs under Linux, for the most part. You can go to the Red Hat website or any number of mirrors and get programs for Linux. Developers will almost always offer their programs in RPM format due to its popularity. I also want to note that RPM has also come to mean the package itself (as in \"I downloaded an RPM yesterday\".
There are some basic commands you're going to need to know to take advantage of the RPM system.
This installs the program (-i option for install)
This \"queries\" your system to see if you've got a certain program installed. Let's say you hear there's a new version of the popular Internet browser Opera for Linux and you don't know if your Red Hat based distribution installs this by default or not. Before you download the RPM for Opera, you could type the command:
If you do have the package installed, it would give you the version number:
opera-11.62
If you don't have the package installed, you will see:
package opera is not installed
If you don't have Opera installed, then you can download their RPM and run rpm -i opera_whatever_version.rpm as root and install the program.
If you do have the program installed and the rpm -q opera command gives you a older version number and you want the newerone, then you have two options.
One is to "uninstall" the older package and install a new one in its place. Not that this is the most efficient option. I just wanted to introduce you to the -e option for RPM. That is, to get rid of a program that you've installed, you would type rpm -e program_name. For example, if you've got Opera's beta version 7 and you've just downloaded the beta version 8, then you would first do:
This gets rid of Opera from your system. Then you would type rpm -i opera_beta8.rpm (or whatever the package is actually called). That installs the new version.
As I said, this is not the most efficient way to update packages. The usual way is to use the -U (as inUpdate command.
You would type:
and that would install the new version and remove the old version from your system.
Those are the basic commands of the RPM install/update system in a nutshell.
When you're using your windows manager, there are some very good tools for installing, updating and uninstalling RPMs that are graphically based. You can choose menu options to do all that we explained before instead of having to type the commands in the terminal. You may want to look into programs like Kpackage for KDE orGnome RPM for the GNOME enviroment. They may make these tasks a lot easier, especially if you're just starting out in the Linux world.
Some words of caution on downloading RPMs
Some of the most popular Linux distributions base their install and update prodedures on Red Hat's package management system. These include Mandrake and SuSE for example. Both of these companies create their own RPMs to be specifically installed on their systems. That means if you're using SuSE or Mandrake your best bet is to go to their respective \"official\" websites or mirrors and download their particular RPM and install it using the procedure outlined above or their specific tools. You may run into a problem if you installed an RPM for Red Hat on a SuSE system. Certain components in the package (like documentation or libraries) may get copied into a different directory than was intended for that system. Third party RPMs from reputable companies, like the Opera web browser in mentioned above, should install fine on any RPM based system. I have successfully installed this package (the same exact RPM file) on SuSE, Mandrake and Red Hat. I even converted this RPM to Debian (.deb) package format and successfully installed it in a computer running Debian. More on this conversion later in the show!
Just a brief second word of caution. Getting and RPM doesn't necessarily mean that you're automatically (or "auto-magically") going to be able to install it. Many websites out there offer RPMs for download. The good ones usually include a list on that particular RPM's page of other programs or libraries that you need in order successfully install and use the program. If you see a list a mile long of "requirements" (those other programs and libraries you need), then you might want to ask yourself if you really want to try that program out.
And here's just an editorial comment on my part about this type of thing as well. The big buzz word with Linux is "free". That's fine. You can theoretically get a distribution from the Internet along with programs and install it for free. (ie. no money down). I think, however, that time is money, to use the trite expression. Time might be even more valuable than money. (lost money might be re-earned but not lost time). When I first installed Linux oh so many years ago, updating and installing stuff was at times a frustrating experience. I suggest that newcomers to the Linux world buy (yes, I said buy) a good boxed set of a commercial distribution and then they'll have more programs than they would ever need, all installed and working properly along with a manual to tell you what to doin case something doesn't work.
Yum is a package manager that was developed by Duke University to improve the installation of RPMs. Yum searches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat Enterprise Linux 5 uses Yum to fetch packages and install RPMs and well as many Red Hat derivatives like CentOS and Fedora Core.
Yum uses a configuration file at /etc/yum.conf.
There are multiple ways by which you can install a repository on the system and install/update packages :
Slackware:
Slackware, known to the Linux world as \"Slack\", has the reputation of being, on one hand, a flexible distribution that allows you to do practically anything you want and, on the other hand, one that is for "experienced" Linux users only.
A lot of these considerations are "politically" motivated. Slackware lacks some of the "smooth" and "slick" graphic installation packages that are becoming standard fare in commercial companies' offerings but in the end, if you're willing to just use the command line utilities, it's just as easily updated as any other major distribution.
Slackware's package format
Slackware packages come in *.tgz format. This a variation of the *.tar.gz format we've seen before. You can go to your favorite website and download new programs for your Slackware system and with a simple:
you have your new program installed.
If that particular package doesn't quite move you and inspire you too much, you can just remove it:
You can also add the option -warn between the installpkg/removepkg command and instead of installing the package, it will tell you what new files are going to get added to your hard disk. That's a good option for the "I wonder if I want this" moments of your life.
Upgrading packages
You can upgrade programs to newer versions with this command:
Using other package formats
If you're using Slackware and you can't find a package your looking for in the *.tgz format, you can also grab on to an *.rpm and convert it.
The way to do this is:
This takes the rpm in question and converts it to *.tgz format. Then you can use installpkg on the new file you've created to install it.
GUI does not necessarily = GOOD
Once again, there is a common misconception that just because something doesn't have a wonderful graphic interface that makes you say \"oooh\" and \"ahhhh\", it is somehow inferior. Don't let that missing GUI fool you here. A computer running Slackware is a tremendously flexible and configurable system. So what if you have to write things on a command line? That's what you've got a keyboard for, isn't it?
Enjoy your Slack system!
There are various methods to installing new programs on a Debian system. I like to classify them according to your connection type.
Code:
dpkg
Code:
dpkg -i package.deb
to install it.
The main drawback to this is that you may find a package that you like but it may have dependencies (ie. other programs that it needs to make it run) and if you don't have those packages, then the install will fail.
This is what the Debian people themselves have to say about this method:
Many people find this approach much too time-consuming, since Debian evolves so quickly -- typically, a dozen or more new packages are uploaded every week. This number is larger just before a new major release. To deal with this avalanche, many people prefer to use automated programs.
Despite what they say, the main advantage of dpkg, it seems to me, is that it is easy for people who have dial-up connections. This is because the alternative, automated programs they're talking about, which are dselect and apt-get are better for permanent connections (cable, xDSL, T1, T3). Let's talk about this method of installing new programs with Debian.
Code:
dselect
When you use dselect you get a graphic user interface of sorts (not under X window, though) to guide you through the install of new programs.
First you'll get asked for your preferred access method. That means, how you're going to get and install them. For example, if I were doing an install of Debian with CDs, then I would choose CD-ROM. But if I were updating, I would choose FTP
Then you would choose the packages you want with a + sign. You can even put updates on hold (indicate that you want to update, but not actually do it) with a = sign. There may even be conflicts or dependency problems and 'dselect' will warn you about those.
Then you start the process by choosing the install option.
Debian will then configure the installed packages.
Then you're on your way.
As I said before, the main advantage to this is that any conflicts or dependency problems will be resolved right here. The Debian people point out that this is ideal for installs or large-scale upgrades. If that's the case, it seems that a slow and sometimes expensive dial-up connection would be less than ideal for this.
Red Hat:
The way you install a new program will depend primarily on two things:
1) What distribution (version) of Linux are you using?
2) What is the origin of the program that you want to install?
RPM
If you're using Red Hat or a distribution that bases itself on Red Hat, then you're going to use the RPM method. OK racing fans- RPM doesn't have anything to do with revolutions per minute. It stands for Red Hat PackageManager. This system takes the heartache out of installing programs under Linux, for the most part. You can go to the Red Hat website or any number of mirrors and get programs for Linux. Developers will almost always offer their programs in RPM format due to its popularity. I also want to note that RPM has also come to mean the package itself (as in \"I downloaded an RPM yesterday\".
There are some basic commands you're going to need to know to take advantage of the RPM system.
Code:
rpm -i new_program.rpm
This installs the program (-i option for install)
Code:
rpm -q program_name
This \"queries\" your system to see if you've got a certain program installed. Let's say you hear there's a new version of the popular Internet browser Opera for Linux and you don't know if your Red Hat based distribution installs this by default or not. Before you download the RPM for Opera, you could type the command:
Code:
rpm -q opera
opera-11.62
If you don't have the package installed, you will see:
package opera is not installed
If you don't have Opera installed, then you can download their RPM and run rpm -i opera_whatever_version.rpm as root and install the program.
If you do have the program installed and the rpm -q opera command gives you a older version number and you want the newerone, then you have two options.
One is to "uninstall" the older package and install a new one in its place. Not that this is the most efficient option. I just wanted to introduce you to the -e option for RPM. That is, to get rid of a program that you've installed, you would type rpm -e program_name. For example, if you've got Opera's beta version 7 and you've just downloaded the beta version 8, then you would first do:
Code:
rpm -e opera
As I said, this is not the most efficient way to update packages. The usual way is to use the -U (as inUpdate command.
You would type:
Code:
rpm -U opera_new_version.rpm
and that would install the new version and remove the old version from your system.
Those are the basic commands of the RPM install/update system in a nutshell.
When you're using your windows manager, there are some very good tools for installing, updating and uninstalling RPMs that are graphically based. You can choose menu options to do all that we explained before instead of having to type the commands in the terminal. You may want to look into programs like Kpackage for KDE orGnome RPM for the GNOME enviroment. They may make these tasks a lot easier, especially if you're just starting out in the Linux world.
Some words of caution on downloading RPMs
Some of the most popular Linux distributions base their install and update prodedures on Red Hat's package management system. These include Mandrake and SuSE for example. Both of these companies create their own RPMs to be specifically installed on their systems. That means if you're using SuSE or Mandrake your best bet is to go to their respective \"official\" websites or mirrors and download their particular RPM and install it using the procedure outlined above or their specific tools. You may run into a problem if you installed an RPM for Red Hat on a SuSE system. Certain components in the package (like documentation or libraries) may get copied into a different directory than was intended for that system. Third party RPMs from reputable companies, like the Opera web browser in mentioned above, should install fine on any RPM based system. I have successfully installed this package (the same exact RPM file) on SuSE, Mandrake and Red Hat. I even converted this RPM to Debian (.deb) package format and successfully installed it in a computer running Debian. More on this conversion later in the show!
Just a brief second word of caution. Getting and RPM doesn't necessarily mean that you're automatically (or "auto-magically") going to be able to install it. Many websites out there offer RPMs for download. The good ones usually include a list on that particular RPM's page of other programs or libraries that you need in order successfully install and use the program. If you see a list a mile long of "requirements" (those other programs and libraries you need), then you might want to ask yourself if you really want to try that program out.
And here's just an editorial comment on my part about this type of thing as well. The big buzz word with Linux is "free". That's fine. You can theoretically get a distribution from the Internet along with programs and install it for free. (ie. no money down). I think, however, that time is money, to use the trite expression. Time might be even more valuable than money. (lost money might be re-earned but not lost time). When I first installed Linux oh so many years ago, updating and installing stuff was at times a frustrating experience. I suggest that newcomers to the Linux world buy (yes, I said buy) a good boxed set of a commercial distribution and then they'll have more programs than they would ever need, all installed and working properly along with a manual to tell you what to doin case something doesn't work.
Code:
yum
Yum is a package manager that was developed by Duke University to improve the installation of RPMs. Yum searches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat Enterprise Linux 5 uses Yum to fetch packages and install RPMs and well as many Red Hat derivatives like CentOS and Fedora Core.
Yum uses a configuration file at /etc/yum.conf.
There are multiple ways by which you can install a repository on the system and install/update packages :
Code:
yum search package_name
yum info package_name
yum install package_name
yum update package_name
yum remove package_name
Slackware:
Slackware, known to the Linux world as \"Slack\", has the reputation of being, on one hand, a flexible distribution that allows you to do practically anything you want and, on the other hand, one that is for "experienced" Linux users only.
A lot of these considerations are "politically" motivated. Slackware lacks some of the "smooth" and "slick" graphic installation packages that are becoming standard fare in commercial companies' offerings but in the end, if you're willing to just use the command line utilities, it's just as easily updated as any other major distribution.
Slackware's package format
Slackware packages come in *.tgz format. This a variation of the *.tar.gz format we've seen before. You can go to your favorite website and download new programs for your Slackware system and with a simple:
Code:
installpkg some_program.tgz
you have your new program installed.
If that particular package doesn't quite move you and inspire you too much, you can just remove it:
Code:
removepkg some_program.tgz
You can also add the option -warn between the installpkg/removepkg command and instead of installing the package, it will tell you what new files are going to get added to your hard disk. That's a good option for the "I wonder if I want this" moments of your life.
Upgrading packages
You can upgrade programs to newer versions with this command:
Code:
upgradepkg a_new_version_of_something.tgz
Using other package formats
If you're using Slackware and you can't find a package your looking for in the *.tgz format, you can also grab on to an *.rpm and convert it.
The way to do this is:
Code:
rpm2tgz some_package.rpm
This takes the rpm in question and converts it to *.tgz format. Then you can use installpkg on the new file you've created to install it.
GUI does not necessarily = GOOD
Once again, there is a common misconception that just because something doesn't have a wonderful graphic interface that makes you say \"oooh\" and \"ahhhh\", it is somehow inferior. Don't let that missing GUI fool you here. A computer running Slackware is a tremendously flexible and configurable system. So what if you have to write things on a command line? That's what you've got a keyboard for, isn't it?
Enjoy your Slack system!