Você está na página 1de 334

Front cover

Front cover Linux Applications on pSeries Jan-Rainer Lahmann Janethe Co Björn Rodén Luis Ferreira AIX Toolbox

Linux Applications on pSeries

Jan-Rainer Lahmann Janethe Co Björn Rodén Luis Ferreira
Jan-Rainer Lahmann
Janethe Co
Björn Rodén
Luis Ferreira
Jan-Rainer Lahmann Janethe Co Björn Rodén Luis Ferreira AIX Toolbox for Linux Applications Recompiling Linux

AIX Toolbox for Linux Applications

Rodén Luis Ferreira AIX Toolbox for Linux Applications Recompiling Linux Applications on AIX Running Linux

Recompiling Linux Applications on AIX

Toolbox for Linux Applications Recompiling Linux Applications on AIX Running Linux natively on pSeries ibm.com /redbooks

Running Linux natively on pSeries

ibm.com/redbooks

Toolbox for Linux Applications Recompiling Linux Applications on AIX Running Linux natively on pSeries ibm.com /redbooks
Toolbox for Linux Applications Recompiling Linux Applications on AIX Running Linux natively on pSeries ibm.com /redbooks
International Technical Support Organization Linux Applications on pSeries February 2003 SG24-6033-01

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 page xi.

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 page 116.

© 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

.

 

xiii

Become a published author

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

xv

Comments

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

xv

Summary of changes

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

xvii

February 2003, Second Edition

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

xvii

Chapter 1.

Introduction .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

1

1.1 . Current version and .

1.2 Linux

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

1.1.1

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

2

2

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

 

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

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

 

36

2.3.4 How to install packages using the rpm

 

37

2.3.5 How to uninstall packages using the rpm

 

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

 

45

2.3.12 How to query package information from the RPM

46

2.3.13 How to query all files in uninstalled

 

47

2.3.14 How to query all files in installed

 

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

 

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

 

63

3.4.3 How to build RPMs from patched Toolbox

 

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

 

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

89

4.2.4 The dtwm window manager

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

89

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 desktop

KDE

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

95

4.5.2 KDE

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

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

 

120

5.2.1 Linux installation on pSeries deskside models

 

120

5.2.2 Using VNC and putty for easier

 

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

 

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.

.

.

.

.

.