 | Hints and tips for Red Hat Linux Linux and SuSE Linux
Ian Shields (ishields@us.ibm.com) Senior programmer, IBM 01 Apr 2002 Updated 01 Oct 2002 To participate in the "Speed-start your Linux app" program, you will need an additional package (pdksh) that is not installed as part of most standard Linux installs. This article tells you how add it from your Red Hat install CDs or from SuSE using the YaST2 tool. This article was extensively updated October 1, 2002, with additional detail for SuSE Linux users. Before you begin
Frequently in Linux you will find many ways to accomplish a task, and package installation is no exception. The ways we describe here are certainly not the only ways to install packages. But if you are new to Linux, they will show you one way of installing a package and ensure that any prerequisite packages that you need are also installed. If you're new to Linux and need help with mounting a CD or opening a terminal
window, see the "Basic tasks for new Linux developers", which covers these tasks and more.
Do I already have the packages installed?
Since there's no point in doing unnecessary work, first check to see if you already have the prerequisite packages installed.
Open a terminal window, and use the which command to check that you
have ksh (the Korn shell) and Netscape installed. If you know the package
names, you may use the rpm command instead. See both methods in Listing 1. Listing 1. Checking for the Korn shell and Netscape
[root@echidna root]# which ksh
/bin/ksh
[root@echidna root]# which netscape
/usr/bin/netscape
[root@echidna root]# rpm -q pdksh
pdksh-5.2.14-13
[root@echidna root]# rpm -q netscape-communicator
netscape-communicator-4.78-2
|
If your output looks something like the above, then you have the packages installed, and you can go on to do other things.
However, if the which command tells you that a command is not found (Red Hat) or comes back with no output (SuSE), then you don't have the command available. If you're using the rpm command to check for packages, then your package levels may be different from those in Listing 1. For example, Red Hat Linux 7.3 ships with pdksh-5.2.14-16.
Adding a package from the Red Hat Linux install CDs
You can install an additional package in several ways. You can use a graphical package installer under either the KDE or GNOME desktop. You can also use the rpm command from a terminal (or shell) window, or you can upgrade existing system from install CDs.
Sometimes when a package has prerequisites, installing from a command line or even with some package managers can be tricky. However, it is fairly easy with the Red Hat install process by electing to upgrade your system, so we'll show you how to do that in this article.
If you are comfortable with a package manager or the rpm command, by all means feel free to use them instead. You should find the pdksh package on CD 2 of the Red Hat install set in the RedHat/RPMS directory. For now, we'll assume that you want to install pdksh by upgrading your system from install CDs.
- Boot your system from the install CD and proceed to the Install Options panel. Click the radio button to upgrade your existing system. On the next panel, check the box to customize the packages to be upgraded. On the boot loader installation panel, choose the same options that you chose for installation. (You can recheck our install suggestions if you forgot what you chose in "Installing and configuring Red Hat Linux".)
- Proceed to the individual package selection panel. There will be a short delay while the installer checks your existing system for packages that may need updating. Click on the triangle next to the Shells group, and select the pdksh package.
- Click Next, and the system checks package dependencies. If there are any dependencies, you will be prompted to install additional packages. You should do so. Continue, and your selected package will be installed.
- If you did not select any kernel packages, your boot loader configuration will probably not be changed, and you can skip the boot disk creation; existing groups should continue to work. When you exit the installation, your system will reboot.
Congratulations! The additional Red Hat Linux package (pdksh) is now installed and ready for your use. You'll find additional resources for using Red Hat Linux and IBM middleware to develop Linux apps at the Speed-start your Linux app page. Adding a package using YaST2 on SuSE Linux
We will show you how to install the Public Domain Korn Shell (pdksh) and Netscape packages on SuSE Linux using the YaST2 program that comes with SuSE Linux. This example was done on SuSE Linux 7.3. Other methods are possible, but we recommend using YaST2 for installing or uninstalling additional system components.
- Place your SuSE Linux install CD 1 in the CDROM drive and mount it using the command
mount /cdrom.
If you're new to Linux and need help with mounting a CD or opening a terminal
window, see "Basic tasks for new Linux developers".
-
To open the Control Center from the KDE desktop, click on the KDE Control Center icon on your task bar:
To open the Control Center from the GNOME desktop, click on the Menu icon:
From either desktop, select YaST2. The remainder of these instructions assume a KDE desktop. The GNOME process is slightly different but recognizable from the KDE steps.
-
Expand the tree on the left by clicking on YaST2 modules, then Software, then Install/Remove software. Wait while the Package selection window opens on the right side of the window, and then scroll down the group menu until you can select System Environment/Shells. The list of packages should have a blank beside the pdksh package. You may either double-click to select it or click the Select/Deselect button. The blank should change to an X indicating that the package will be installed. Your screen should now look something like Figure 1.
Figure 1. Selecting the pdksh package

- In the same manner, scroll the group down to X11/Applications/Internet and choose netscape.
Click OK to perform the install, and wait until it completes.
- You may now close the Control Center window, and unmount and eject the CD.
Congratulations! The additional SuSE Linux packages (pdksh and netscape) are now installed and ready for your use. You'll find additional resources for using SuSE Linux and IBM middleware to develop Linux apps at the Speed-start your Linux app page. Resources About the author Currently researching Linux technology for the developerWorks Linux zone, Ian Shields is a Senior programmer at IBM at the Research Triangle Park, NC. He joined IBM in Canberra, Australia, as a systems engineer in 1973, and has since worked on communications systems and pervasive computing in Montreal, Canada, and RTP, NC. He has several patent filings and seven issued patents. His undergraduate degree is in pure mathematics and philosophy from the Australian National University. He received an M.S. in computer science from North Carolina State University, where he is now pursuing a Ph.D. You can contact Ian at ishields@us.ibm.com. |

|  |