Korn and Bash Shell Programming Lab Exercises
Korn and Bash Shell Programming Lab Exercises
cover
Trademarks
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AIX® AIX 5L™ Language Environment®
OS/2® POWER™ RISC System/6000®
RS/6000®
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or
both.
UNIX® is a registered trademark of The Open Group in the United States and other
countries.
Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Other company, product, or service names may be trademarks or service marks of others.
The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.
TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Set Up Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Configuration Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Verification Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
TMK Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AIX® AIX 5L™ Language Environment®
OS/2® POWER™ RISC System/6000®
RS/6000®
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or
both.
UNIX® is a registered trademark of The Open Group in the United States and other
countries.
Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Other company, product, or service names may be trademarks or service marks of others.
LSGp Purpose
This Lab Set Up Guide provides directions for installing, preparing, and verifying the lab
hardware and software in preparation for conducting a class of course AL32.
The Requirements sections of this document may also be used to determine the specific
hardware and software needed to conduct a class.
viii Korn and Bash Shell Programming © Copyright IBM Corp. 2007
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V4.1
Lab Setup Guide
LSG Requirements
The following tables list the hardware, software, and other materials needed to set up a lab
to conduct a class of course AU23.
Hardware Requirements
Table 1 lists the hardware needed to prepare one student lab set. Students may share an
RS/6000 if they log in using different user names, but each student needs own terminal.
Table 1: Hardware for one student lab set
Platform Use Machine Minimum
Minimum Free DASD Features
Machine Type Model Memory
CD-ROM,
2 x 9.1 GB Ethernet or
Student 43p Mod 150 128
hard disks Token-Ring,
printer
CD-ROM,
2 x 9.1 GB Ethernet or
Instructor 43p Mod 150 128
hard disks Token-Ring,
printer
Software Requirements
Table 2 lists the software needed to prepare the student and/or instructor lab set(s). When
preparing for a class, be sure you have the correct number of licensed copies of any
non-IBM software.
Table 2: Software needed
Operating Application Licensing
Platform Use OS Version Applications
System Version Requirement
POWER AIX 5L 5.2 5765-E62
__ 9. You will then be presented with the screen Change Method of Installation. Select
New and Complete Overwrite, item 1.
__ 10. The next screen is Change Disk(s) Where You Want to Install. If you have more than
one disk drive, select at least two of them as the target drives. On PCI RISC
System/6000 Systems, make a note of the eight digit number that looks like
04-C0-00-5,0. You will need to know this later. Press Enter when you are finished
with this screen.
__ 11. On the Installation and Settings menu, choose option 2 to change the Primary
Language Environment before continuing. The default is C (POSIX). You need to
select the correct language for your country at this time so the proper files are
loaded from the media. In the United States, choose United States English and then
choose #1 to select the default keyboard.
Once all items have been properly selected, choose item 0 from the Installation and
Settings menu to continue with the installation.
__ 12. On Classical RISC System/6000 systems ONLY
Turn the key to the normal position. If you forget to do this, you will be prompted to
do so prior to completion of the installation.
The load process will take about 50 minutes.
On PCI RISC System/6000 systems ONLY:
If using a 43P model 140 or 150, the system will reboot automatically. This
section can be skipped unless the bootlist needs to be changed. To change the
bootlist, follow the directions below, but instead press the F1 key to access the
System Management Services program.
If using a 40P or 43P model 7248, the screen that will display after the
installation is complete states:
Remove the installation media.
Press the ENTER key to restart (reboot) the system.
Follow the instructions. For PCI RS/6000 systems that use the System Management
Services (SMS) diskette, be sure that the diskette is in the diskette drive. When the
first screen appears, after the keyboard icon but before the last icon appears, press
the F4 key.
Select Item 2 - Select Boot Devices
Select Item 1 - Display Current Settings
Number 3 on the boot sequence should be for a SCSI disk drive. Note the ID of this
device.
1) Press Enter
2) Select Item 6, configure 4th Boot Device. DO NOT PRESS ENTER
LSG 3) Highlight the SCSI disk with the ID number that is different from the one you
recorded above.
4) Press Enter.
5) Check the list that comes up next to verify you have the correct disk drives in
the list
6) Press Enter
7) Press Esc to quit
8) Press F3 to reboot
9) Answer YES to the question, “Do you want to restart the computer?”
When the system boots after AIX is loaded, you will get a screen titled 'Configuration
Assistant TaskGuide'. Take note if you receive an error message about the amount
of page space on your system. If you receiver this message, it will be necessary to
perform step “c” below. Click on Next to begin customizing the systems for the
classroom environment.
Click on Set or verify system date and time on the Configuration Assistant
TaskGuide menu. Then, click on Next Follow the instructions on the screen to set
the date and time as appropriate to your time zone.
Click on Next to return to the Configuration Assistant TaskGuide to complete the
next steps.
If you received a message indicating that more page space is needed, click on
Manage system storage and paging space, then click on Next. Click on the
recommended value and then click on Next.
Click on Set Password for administrator on the Configuration Assistant menu. Then
click on Next. Follow the instructions to enter ibmaix twice. Click on Next twice to
return to the Configuration Assistance TaskGuide menu.
OPTIONAL: Configure TCP/IP. Using the Configuration Assistant, click on Configure
network communications (TCP/IP) and then click on Next. Then, choose the option
to Manually configure TCP/IP and click on Next.
__ 3. Select Install from System Backup. Selecting this item will bring up the menu
Choose Tape Drive. There is a long wait before a rotating bar appears at the bottom
of the screen. Finally, you will get the message to select your installation language
again.
__ 4. The next screen is the Welcome to Base Operating System menu again. This time
select item 2, Change/Show Installation Settings and Install. The next menu will be
System Backup Installation and Settings.
__ 5. Select item 1 to choose a disk.
__ 6. The next screen is Change Disk(s) Where You Want To Install. Select BOTH of the
disk drives.
__ 7. You will be returned to System Backup Installation and Settings menu. Take the
defaults of no for “use map” and no for “shrink fs”. Continue with the installation and
system will reboot when installation is complete.
Login to the system as root.
LSG __ 10. The next screen is Change Disk(s) Where You Want to Install. If you have 2 disks,
install using BOTH disks.
You will be returned to System Backup Installation and Settings menu. Take the
defaults of no for “use map” and no for “Shrink fs”. Continue with the installation.
__ 11. The screen that will display after the installation is complete states:
Remove the installation media. Press the ENTER key to restart (reboot) the system.
Login to the system as root.
LSG
backpg
Back page
®