ebook img

Linux Applications on pSeries PDF

334 Pages·2003·4.726 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Linux Applications on pSeries

Front cover Linux Applications on pSeries AIX Toolbox for Linux Applications Recompiling Linux Applications on AIX Running Linux natively on pSeries Jan-Rainer Lahmann Janethe Co Björn Rodén Luis Ferreira ibm.com/redbooks International Technical Support Organization Linux Applications on pSeries February 2003 SG24-6033-01 Note: Before using this information and the product it supports, read the information in “Notices” on pagexi. Second Edition (February 2003) This edition presents additional material and updated material not found in the original work. It reflects changes in installation procedures and usage of the AIX Toolbox for Linux Applications, adds a detailed description of the most-used tools in the Toolbox, and discusses various aspects of native Linux on IBM eServer pSeries hardware. This edition applies to AIX Toolbox for Linux Applications for use with AIX 5L and AIX 4.3.3 operating systems. The chapter about native Linux applies to pSeries hardware and Linux distributions listed in 5.1, “Introduction” on page116. © Copyright International Business Machines Corporation 2001, 2003. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ix Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiii The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiii Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Summary of changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii February 2003, Second Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Chapter 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 AIX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.1 Current version and features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1 Brief history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 About Linux’s copyright. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.3 The GNU Project and the Linux kernel. . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.4 Different flavors of Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Linux at IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.1 IBM’s UNIX-based operating system strategy . . . . . . . . . . . . . . . . . . 9 1.4 The integration of AIX and Linux on pSeries. . . . . . . . . . . . . . . . . . . . . . . 10 1.4.1 Linux on xSeries + AIX on pSeries . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4.2 Linux affinity on AIX 5L. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4.3 Linux and AIX interoperability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.4 Native Linux on pSeries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Chapter 2. AIX Toolbox for Linux Applications . . . . . . . . . . . . . . . . . . . . . 15 2.1 Toolbox overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.1.1 UNIX/AIX/Linux standard compliance. . . . . . . . . . . . . . . . . . . . . . . . 16 2.1.2 Toolbox objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1.3 Open Source Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1.4 Open Source Software in the Toolbox . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.5 Other sources of Open Source Software . . . . . . . . . . . . . . . . . . . . . 22 2.2 Design of the Toolbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2.1 Toolbox FTP site directory structure. . . . . . . . . . . . . . . . . . . . . . . . . 23 2.2.2 Creation of the Toolbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 © Copyright IBM Corp. 2003. All rights reserved. iii 2.2.3 Toolbox RPM packaging format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.2.4 Toolbox directory structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.2.5 How to enable the use of the Toolbox commands . . . . . . . . . . . . . . 29 2.3 Installing the Toolbox RPM packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.3.1 How to install rpm.rte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.3.2 How to download Toolbox packages . . . . . . . . . . . . . . . . . . . . . . . . 34 2.3.3 How to install and manage the Toolbox RPM packages. . . . . . . . . . 36 2.3.4 How to install packages using the rpm command. . . . . . . . . . . . . . . 37 2.3.5 How to uninstall packages using the rpm command. . . . . . . . . . . . . 42 2.3.6 How to verify installed packages using the rpm command. . . . . . . . 43 2.3.7 How to query installed packages with the rpm command. . . . . . . . . 43 2.3.8 How to find the installed package a file belongs to. . . . . . . . . . . . . . 44 2.3.9 How to find the uninstalled package a file belongs to. . . . . . . . . . . . 44 2.3.10 How to find the prerequisites for a package . . . . . . . . . . . . . . . . . . 45 2.3.11 How to query package information from the RPM file. . . . . . . . . . . 45 2.3.12 How to query package information from the RPM database. . . . . . 46 2.3.13 How to query all files in uninstalled packages. . . . . . . . . . . . . . . . . 47 2.3.14 How to query all files in installed packages. . . . . . . . . . . . . . . . . . . 47 2.3.15 How to query specific information from the RPM database . . . . . . 48 2.3.16 How to identify corrupt package files . . . . . . . . . . . . . . . . . . . . . . . 49 2.3.17 How to extract files from a package . . . . . . . . . . . . . . . . . . . . . . . . 49 2.3.18 How to install RPM and BFF packages with SMIT or geninstall. . . 51 Chapter 3. Porting Open Source Software to AIX . . . . . . . . . . . . . . . . . . . 57 3.1 Why to port Open Source Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.2 How to obtain Open Source Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.3 The GNUPro development environment. . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.4 How to build RPM packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.4.1 How to build a RPM from a Toolbox SRPM . . . . . . . . . . . . . . . . . . . 62 3.4.2 How to build RPMs from Toolbox SRPM with upgraded source. . . . 63 3.4.3 How to build RPMs from patched Toolbox SRPMs. . . . . . . . . . . . . . 65 3.5 How to compile OSS from TAR packages . . . . . . . . . . . . . . . . . . . . . . . . 69 3.6 How to create your own Open Source Software. . . . . . . . . . . . . . . . . . . . 72 3.7 How to create SRPMs and RPMs from sources. . . . . . . . . . . . . . . . . . . . 74 Chapter 4. Graphical desktops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4.1 Desktop and graphical applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.1.1 The X Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.2 X Window managers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.2.1 The kwin window managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.2.2 The enlightenment window manager . . . . . . . . . . . . . . . . . . . . . . . . 89 4.2.3 The sawfish window manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.2.4 The dtwm window manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 iv Linux Applications on pSeries 4.3 The Toolbox graphical environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.4 The CDE desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 4.4.1 The front panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 4.5 The KDE desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4.5.1 KDE desktop layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 4.5.2 KDE applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.6 The Gnome desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 4.6.1 Gnome desktop layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.6.2 GnomeRPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.7 Installing KDE and Gnome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.7.1 How to install a desktop during AIX 5.2 base installation . . . . . . . . 102 4.7.2 How to install and customize KDE from the Toolbox . . . . . . . . . . . 104 4.7.3 How to install and customize Gnome from the Toolbox . . . . . . . . . 109 Chapter 5. Native Linux on pSeries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5.2 Installation of native Linux on pSeries. . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.2.1 Linux installation on pSeries deskside models . . . . . . . . . . . . . . . . 120 5.2.2 Using VNC and putty for easier installation. . . . . . . . . . . . . . . . . . . 126 5.2.3 Systems without a graphics adapter. . . . . . . . . . . . . . . . . . . . . . . . 127 5.2.4 Linux Installation on pSeries LPARs (p690 - Regatta) . . . . . . . . . . 134 5.2.5 Boot configuration and kernel recompile. . . . . . . . . . . . . . . . . . . . . 137 5.3 Available software for Linux on pSeries . . . . . . . . . . . . . . . . . . . . . . . . . 140 Chapter 6. Tools in the Toolbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.1 Toolbox tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.2 Networking and e-mail tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.2.1 ethereal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.2.2 rsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6.2.3 ftpcopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 6.2.4 ncftp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 6.2.5 wget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 6.2.6 rdist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 6.2.7 lynx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6.2.8 curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.2.9 elm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 6.2.10 fetchmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 6.2.11 mutt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 6.2.12 proftpd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.2.13 pine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.2.14 wu-ftpd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 6.3 File handling tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 6.3.1 zip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Contents v 6.3.2 unzip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.3.3 gzip/gunzip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 6.3.4 bzip2/bunzip2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 6.3.5 zoo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 6.3.6 lsof. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 6.3.7 less . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 6.3.8 findutils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 6.3.9 fileutils. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 6.3.10 diffutils. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 6.3.11 hexedit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 6.3.12 sh-utils. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 6.4 Development tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 6.4.1 libtool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 6.4.2 autoconf/automake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 6.4.3 rcs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 6.4.4 patch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 6.4.5 gcc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 6.4.6 gdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 6.4.7 binutils. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 6.4.8 m4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 6.4.9 gmake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 6.4.10 cvs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 6.4.11 info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 6.5 Miscellaneous tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 6.5.1 webmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 6.5.2 samba. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 6.5.3 vnc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 6.5.4 php . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 6.5.5 sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 6.6 Login shells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 6.6.1 AIX shells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 6.6.2 Toolbox shells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 6.6.3 bash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 6.6.4 tcsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 6.6.5 zsh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Other resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 Referenced Web sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 IBM Redbooks collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 vi Linux Applications on pSeries Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Contents vii viii Linux Applications on pSeries

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.