Artle Hre System Ver Wal Tung 2010
Artle Hre System Ver Wal Tung 2010
Artle Hre System Ver Wal Tung 2010
cover
Front cover
Student Exercises
ERC 12.0
Student Exercises
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 AS/400 Domino Language Environment MVS OS/2 POWER5 pSeries RS/6000 System p Tivoli AIX 5L CICS/6000 HACMP Lotus Network Station POWER POWER6 Requisite SecureWay System/370 400 AIX 6 (logo) DB2 iSeries Magstar Notes POWER4 PowerPC RISC System/6000 SP System Storage
VMware and the VMware "boxes" logo and design, Virtual SMP and VMotion are registered trademarks or trademarks (the "Marks") of VMware, Inc. in the United States and/or other jurisdictions. Alerts is a registered trademark of Alphablox Corporation in the United States, other countries, or both. PS/2 is a trademark or registered trademark of Lenovo in the United States, other countries, or both. PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States, and/or other countries. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.
Student Exercises
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United States and other countries. 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.
iii
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
iv
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
TOC
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Exercise 1. root login methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Part 1 - Direct logins to root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Part 2 - Using the su command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Exercise 2. Using SMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Part 1 - Using SMIT (ASCII interface) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Part 2 - (Optional) Using SMIT (Motif interface). . . . . . . . . . . . . . . . . . . . . . . . 2-4 Exercise 3. System startup and shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Part 1 - Multi-User mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Part 2 - Boot using System Management Services . . . . . . . . . . . . . . . . . . . . . 3-2 Part 3 - System Resource Controller (SRC) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Exercise 4. AIX software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Part 1 - List and install AIX software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Part 2 - Working with AIX Fixes (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Exercise 5. AIX 6.1 installation and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 Exercise 6. Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 Part 1: Use the Web-based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Part 2 (Optional): Configure the Web-based System Manager for AIX client access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 Part 3 (Optional): Configure the Web-based System Manager for remote client access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Exercise 7. Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 Part 1 - List device configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Part 2 - List and change system parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Part 3 - Removing and redefining a network adapter device . . . . . . . . . . . . . . 7-4 Part 4 - Changing the status of a disk drive device . . . . . . . . . . . . . . . . . . . . . 7-5 Part 5 - Configure a tape device (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 Exercise 8. LVM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 Exercise 9. Working with LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 Part 1 - Adding and removing a disk from a volume group . . . . . . . . . . . . . . . 9-2 Part 2 - Creating and removing a volume group . . . . . . . . . . . . . . . . . . . . . . . 9-3 Part 3 - Exploring your storage environment . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Contents
Student Exercises
Part 4 - Adding a volume group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Part 5 - Adding a logical volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Exercise 10. Working with file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-1 Part 1 - Inodes and NBPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Part 2 - Creating a journaled file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Part 3 - Changing the file system size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5 Part 4 - Reducing the size of a file system . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6 Part 5 - Removing a file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7 Part 6 - Working with mirrors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8 Exercise 11. Managing file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-1 Part 1 - Determining file system usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3 Part 2 - Using fragments for disk usage efficiency . . . . . . . . . . . . . . . . . . . . . 11-4 Part 3 - Using JFS compression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6 Part 4 - Fixing file system problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8 Part 5 - Optional exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9 Exercise 12. Paging space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-1 Exercise 13. Using backup and restore . . . . . . . . . Part 1 - Use SMIT to backup a non-rootvg volume group . . Part 2 - Prepare file system for backup/restore . . . . . . . . . Part 3 - Backup and restore by inode (file system) . . . . . . . Part 4 - Backup and restore by name . . . . . . . . . . . . . . . . . Part 5 - (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....... ....... ....... ....... ....... . .. .. .. .. .. . . . ..... ..... ..... ..... ..... 13-1 13-3 13-4 13-5 13-8 13-9
Exercise 14. (Optional) Using tar and cpio . . . . . . . . . . . . . . . . 14-1 Part 1 - Using tar. . . . . . . . . . . . . . . . . . . . . . . . . 14-2 Part 2 - Using cpio (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4 Exercise 15. Security files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-1 Part 1 - Security control files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2 Part 2 - SUID and sticky bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-3 Exercise 16. User administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16-1 Part 1: User administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2 Part 2 - Group administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4 Part 3 - Customizing the default .profile file . . . . . . . . . . . . . . . . . . . . . . . . . . 16-5 Part 4 - Removing users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-5 Part 5 - Communicating with users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-7 Part 6 - Examine the security set up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8 Part 7 - Customizing the login herald . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-9 Exercise 17. Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17-1
vi
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
TOC
1 2 3 4
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Exercise 18. Printers and queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-1 Part 1 - Add a local printer and a queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-2 Part 2 - Add a file device queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-3 Part 3 - Check the queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-4 Part 4 - Change the characteristics of a queue . . . . . . . . . . . . . . . . . . . . . . . 18-5 Part 5 - Manage jobs in queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-6 Part 6 - Add a remote print queue (optional) . . . . . . . . . . . . . . . . . . . . . . . . . 18-7 Exercise 19. Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-1 Part 1 - Deconfigure TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2 Part 2 - Configure TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-3 Part 3 - Testing the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-3 Part 4 - Using telnet. . . . . . . . . . . . . . . . . . . . . . . . 19-5 Part 5 - Using ftp . . . . . . . . . . . . . . . . . . . . . . . . . 19-6 Appendix A. Optional exercise: AIX 5L V5.3 installation . . . . . . . . . . . . . . . . . . . A-1 Appendix B. Serial devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1 Part 1 - Verify a terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2 Part 2 - Remove a terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 Part 3 - Add a terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4 Part 4 - Check terminal communications settings . . . . . . . . . . . . . . . . . . . . . . B-5 Part 5 - Change terminal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-6 Part 6 - Fixing a hung terminal (optional). . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-7 Appendix C. Optional exercise: The System V print subsystem. . . . . . . . . . . . . C-1 Part 1 - Switch print subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2 Part 2 - Add a System V printer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2 Part 3 - Submit print jobs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-6 Part 4 - (Optional) Configure a remote print server and client . . . . . . . . . . . . . C-8
Contents
vii
Student Exercises
viii
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
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 AS/400 Domino Language Environment MVS OS/2 POWER5 pSeries RS/6000 System p Tivoli AIX 5L CICS/6000 HACMP Lotus Network Station POWER POWER6 Requisite SecureWay System/370 400 AIX 6 (logo) DB2 iSeries Magstar Notes POWER4 PowerPC RISC System/6000 SP System Storage
VMware and the VMware "boxes" logo and design, Virtual SMP and VMotion are registered trademarks or trademarks (the "Marks") of VMware, Inc. in the United States and/or other jurisdictions. Alerts is a registered trademark of Alphablox Corporation in the United States, other countries, or both. PS/2 is a trademark or registered trademark of Lenovo in the United States, other countries, or both. PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States, and/or other countries. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United States and other countries. 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.
Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Trademarks
ix
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
pref
Exercises description
Exercise Instructions This section contains what it is you are to accomplish. There are no definitive details on how to perform the tasks. You are given the opportunity to work through the exercise given what you learned in the unit presentation, utilizing the unit Student Notebook, your past experience and maybe a little intuition. Exercise Instructions With Hints This section is an exact duplicate of the Exercise Instructions section except that in addition, specific details and/or hints are provided to help step you through the exercise. A combination of using the Instructions section along with Instructions With Hints section can make for a rewarding combination providing you with no hints when you don't want them and hints when you need them. Optional Exercises This section gives you additional exercises to perform relating to the unit of discussion. It is strictly optional and should be performed when you have completed the required exercises. The required exercises pertain to the most pertinent information provided in the unit. This section may help round out the hands-on experience for a related unit.
Exercises description
xi
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Text highlighting
The following text highlighting conventions are used throughout this book: Bold Italics Identifies file names, file paths, directories, user names and principals. Identifies links to Web sites, publication titles, and is used where the word or phrase is meant to stand out from the surrounding text. Identifies attributes, variables, file listings, SMIT menus, code examples of text similar to what you might see displayed, examples of portions of program code similar to what you might write as a programmer, and messages from the system. Identifies commands, daemons, menu paths and what the user would enter in examples of commands and SMIT menus. The text between the < and > symbols identifies information the user must supply. The text may be normal highlighting, bold or monospace, or monospace bold depending on the context.
Monospace
xii
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
Typically the system administrator should not use root as their normal login account. Instead, they should use the su command to become root for a short period of time to do administrative tasks.
1-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
1-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 5. Determine your current directory and your home directory. Current directory: ________/__ Home directory: ________/__
__ 6. To verify that you do, in fact, have root privileges, cat out the file /etc/security/passwd. This file holds the encrypted passwords for the users on your system. Only root can look at this file. More details on this file are mentioned later in the course. Did you see the contents of the file? __________
1-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 10. Determine your current directory and your home directory. Current directory: __________ Home directory: __________
__ 11. Check to see if you have the authority to view /etc/security/passwd. Did you see the contents of the file? __________
__ 13. Now, switch user to root without using the - (dash) option.
__ 14. Determine your current directory and your home directory. Current directory: __________ Home directory: __________ Has anything changed? _____________________________________________
__ 17. Exit back to team01. __ 18. Did the su and the cd to /etc (in the resulting subshell) affect the current directory after exiting the subshell? ______ __ 19. Now, try using the su command with the - (dash) option. What is your home directory? If you're not sure, check before performing the su. .
1-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 20. Determine your current directory and your home directory. Current directory: _____/_____ Home directory: _____/_____ Is there any thing different this time?
End of exercise
1-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
1-6
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise is designed to give you experience working with the system management tools supplied with AIX. In most classrooms, there are two students per AIX system. In many cases, only one person is able to perform the task at a time. You need to work together with your teammate. Be sure to take turns at the keyboard.
2-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. Note that on some terminal emulations, the function keys are not operative and you may need to substitute escape sequences. For example, instead of pressing F3, you might need to press <ESC><3> for the same function. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 4. Add five users to the system. They should be named team100 through team104. Take all of the defaults. Customizing the attributes is covered later in the course. Assign a password for each user that is the same as the user name. When the five users and their passwords have been entered, exit from SMIT.
__ 5. Start SMIT using the options to redirect the smit.script and smit.log files to the /home/team100 directory. From the main SMIT menu, select Processes & Subsystems. Display all the current process running on your system. Examine the output. Which command do you think was executed? _______. How can you find out? ___________________________________________ Return to the main menu.
__ 6. In a similar manner, select each of the main SMIT menu entries, examine the submenu, then use the F3 key to back up to the previous menu. Do not execute any commands that may cause changes to the system. Because you are logged in as root, you must be very careful.
2-2 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty __ 7. Shell out (F9) and execute the date command. Return to SMIT and do the following: 1) Stop syslogd subsystem. 2) View the command that was executed. 3) List ALL subsystems to see that syslogd is inoperative. 4) Restart syslogd. 5) Continue to the next step. Do not press F3 or exit SMIT. __ 8. You should have the COMMAND STATUS screen displayed. Capture an image of this screen. Exit SMIT. __ 9. Look at the SMIT history files using pg or more. Look for the image you captured in the previous step. What information is in each of these files? ____________________________ _____________________________________________________________ Why should these files be monitored? _____________________________________________________________ __ 10. Look at the ownership of the SMIT history files of user team100 with ls -al. Was it a good idea to create these files as root? ____ What will happen if user team100 will use SMIT? _____________________________________________________________
__ 11. As the system administrator, you can select the default interface that the users can use. Depending on your classroom environment, you may be able to set a different interface. Ask your instructor if you would like to change the interface. For the new interface to take effect, you need to reboot your system. Log out when you are done. Note If you are using VNC for remote graphics, do not change the system user interface in this step; your VNC server is configured to only work with a CDE user interface.
__ 12. If you did not change your System User Interface (and thus did not need to reboot), terminate smit and log off of your system.
Copyright IBM Corp. 1997, 2008 Exercise 2. Using SMIT 2-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 14. If necessary, open a terminal window. If one already exists, skip to the next step.
__ 15. Add five users to the system. They should be named team200 through team204. Take all the defaults. Do not assign passwords for these users. When the five users have been entered, exit from SMIT.
__ 16. In a similar manner, select each of the main SMIT menu entries, examine the submenu, and then use the Cancel button to go back to the previous menu. Do not execute any commands that may cause changes to the system. Because you are logged in as root, you must be very careful. __ 17. Exit from SMIT. Look at the SMIT history files with pg or more. What information is in each of these files? _____________________________________________________________ Why should these files be monitored? _____________________________________________________________
End of exercise
2-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
If there are two or more students per system, you must work as a single team throughout this exercise. All instructions involve using the system unit for starting and stopping the system in various modes.
3-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 2. Page out the /etc/inittab file. Take a moment to become familiar with its contents. What is the run level of shdaemon? _______ What does it mean? ___________________________________ __ 3. Log out of this session.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 7. Start the Hardware Management Console application by clicking the Launch link. Log into your system HMC as hscroot. and password abc1234. Locate your machine and the logical partition which your are assigned. __ 8. Locate the icon for your partition. The state of the partition should be not active. Activate the partition, specifying that you want to open a terminal window and that you want a boot mode of SMS.
__ 9. If you are using a local non-partitioned system (otherwise skip to the next step): As the root user, shut down and reboot the system to the System Management Services mode. As soon as you see the keyboard and hear a beep, you should press the numeric 1 key or <F1> key to access SMS. __ 10. System Management Services (SMS) menus and contents vary from one System p machine/model to another. Take a few moments to explore the menu options which display on your system. Do not make any changes or run any tests. Also, dont click Exit on the main SMS screen until you are finished exploring the other options.
__ 11. When you are done exploring, exit the SMS program and allow the system to reboot in multi-user mode.
3-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 18. Reset the run level to Single User Mode without rebooting the system.
__ 20. Verify that there are few processes running on the system. __ 21. Run /etc/rc.net to start the network interfaces and then reset the Run Level to Multi-User Mode.
__ 22. Ensure that all normal subsystems have been started and are working properly. If you have been using CDE, and CDE fails/hangs now, you forgot to run /etc/rc.net in the previous step.
__ 23. Shut down and reboot the system one more time.
End of exercise
3-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise is designed to give you experience working with the installation facilities supplied with AIX. If there is more than one student sharing a system, then only one person can actually perform these steps. All other students on that system should observe while the steps are being done. In this exercise, you install two software packages: bos.dosutil bos.games In this exercise, you may also install a fix to already installed software packages. The instructions are written assuming you are using SMIT in ASCII mode. However, it is easy to interpret the instructions so that they can be used with SMIT in the AIXWindows environment. Feel free to use SMIT in either mode. When you select an item while using the ASCII user interface, use the cursor keys on the keyboard to highlight a menu item, then press Enter. On a graphics display, choose (that is, click) the selected item with the left mouse button. The fix installation and display of the fix history is optional. It requires that the lab setup for the exercises used an AIX 5L V5.3 TL6 base installation. If the image used in your lab environment has additional
4-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
maintenance already installed and committed, you may not be able to successfully complete the optional steps.
4-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 3. Now it is time to install the two software packages, bos.dosutil and bos.games: These packages have been preloaded (but not installed) in a directory called /usr/sys/inst.images. The procedure to install these packages from this directory are the same as those to install software from CD or tape. Use SMIT to install the bos.games and bos.dosutil packages. When this task has successfully completed, return to the AIX command line.
__ 4. Verify that the bos.games fileset installed correctly and list the games which are available.
__ 5. Use SMIT to remove the bos.dosutil fileset. __ 6. If not doing the optional Part 2 - Working with AIX Fixes, log off the system at this point.
4-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 8. Return to the Software Installation and Maintenance menu and choose the menu sequence which allows you to list software that is on installation media (which could be a directory). List the APARs that are addressed by the filesets in the /usr/sys/inst.images/fixes directory. Briefly examine the output. __ 9. Return to the Software Installation and Maintenance menu and follow a menu sequence that presents a dialogue panel which allows you to install a fix by specifying the related APAR number. Request to use our /usr/sys/inst.images/fixes directory as the source of the fixes. __ 10. There is a bug in AIX 5L V5.3 TL6 where the usrck command can (incorrectly) lock all user accounts. You do not want that to happen. In the dialogue panel, get a listing of APARs which are available to be installed. Find the APAR which was just described. Select and install that fix. Examine the output to verify that the fix was installed. What filesets have been installed? ______________________________________________________________ ______________________________________________________________ __ 11. View the history of the installed filesets using the lslpp command. __ 12. Log off from the system.
End of exercise
4-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
The Hardware Management Console (HMC) and Configuration Assistant are graphics-based applications that assist the system administrator with various tasks. These applications are used to perform the installation of the operating system and system configuration respectively.
5-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. The objective for the first part of this lab is to install an IBM AIX 6.1 mksysb image. The instructions to accomplish this using an eLab environment and a stand-alone system is listed. Ask your instructor to confirm that the /spot and lppsource (bos) have been allocated for your system before starting. __ 1. Log in to your assigned system. __ 2. Before you start the migration/install, you need to identify the boot disk and the adapter which has a configured interface. Use the bootlist -o command to identify the boot disk. Use the netstat -in and the lsfg commands to obtain the location of the configured interfaces adapter. If the configured interface is en4, then the related adapter is ent4 (the number in both names will always match). You only need the last two positions of the location code (either C#-T# or P#-T#)). You cover location codes in more detail in the Device unit later in the course. boot disk: __________________________________________________ configured interface and IP address ______________________________ location code of the network adapter _____________________________ __ 3. If you do not already have a working HMC window, access your systems HMC by starting a Web browser and using the HMCs IP address as the URL. If you do not have this IP address, ask your instructor. If you are not using a HMC, log on to your stand-alone system and skip to Step 3. __ 4. If you are not already logged into the HMC, start the Hardware Management Console application by clicking the Launch link. Log into your system HMC as hscroot. and password abc1234. __ 5. Locate your machine and the logical partition which your are assigned. __ 6. Shutdown your assigned lpar, This can be performed using the HMC (Operating System options only) or by using the shutdown command at an interactive root user prompt. __ 7. If you currently have a virtual terminal open, close that window. __ 8. Boot your system in SMS mode. Open a console session if you are using a lpar system and HMC configuration.
5-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 9. Configure your system Remote IPL parameters. You need the correct subnet mask, plus the IP addresses of the NIM server and the gateway. These must be configured to boot off the network adapter. The instructor provides you with the NIM and gateway addresses. NIM server IP address: _______________________________________ Gateway IP address: _________________________________________
__ 10. Assign your network adapter as the first and only boot device. Be sure the location of the adapter matches what you recorded earlier. __ 11. Your system should be downloading an AIX network boot image at this time. The download and execution of the network boot image takes 2 to 3 minutes. When done, you see a prompt; select the terminal console and the English during installation. __ 12. On the Main Installation and Maintenance menu, select Change/Show Setting and Install. __ 13. Verify that the Method of Installation is set to Migration and the Disk to Install is the one you previously identified as the boot disk (probably hdisk0). When verified, enter 0 to start the installation. __ 14. You may get prompted once or twice for other verifications. For example, it may give you the option of listing filesets and configuration files that are replaced. You may choose to examine these; the lists are not very large. Eventually respond with a 0 to continue with the migration. When you see the Installing Base Operation System, you can take a break (though the instructor may wish to use this time to discuss another topic). This takes 30 to 40 minutes. __ 15. Once the install is complete, the system automatically reboots. Once the reboot is completed, there will be a login prompt on the system console. At that point, continue to the next step. __ 16. Log in as root user and start the Configuration Assistant.
__ 18. Familiarize yourself with some of the other options. When youve finished, exit from Configuration Assistant and select the option to Finish now, and do not restart Configuration Assistant when restarting AIX.
5-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
End of exercise
5-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise is designed to give you experience working with the Web-based System Manager in AIX. If you are sharing the machine, only one person should perform each step. You must work from a graphical interface for this exercise. If your classroom is networked, you can configure and test the Web-based System Manager for client machine access. The client machine can be another AIX system or a PC. In both cases, the client platform must have a browser that is Java-enabled.
6-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. If there are multiple interfaces on your system, your instructor should identify which interface to use for this exercise. If you are in an environment where the AIX system is accessed remotely, be sure to not deconfigure the interface used for that purpose.
__ 3. If you are in a CDE environment and there is no terminal emulation window, open the Personal Application subpanel (arrow over the pencil and paper icon) and click on the Terminal icon. Access the Web-based System Manager. __ 4. View system processes by both details and tree details. Viewing processes by tree detail provides a pictorial view of the parent/child relationship of the processes. Return to the view of the task icons for Processes when you have completed this task.
__ 5. View the Web-based System Manager window that displays the current system date and time.
6-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 6. Close the Web-based System Manager Launch Pad window and log out of the system.
Part 2 (Optional): Configure the Web-based System Manager for AIX client access
Preface
For the optional sections, you need to have a functioning network environment in lab room. The lab teams need to pair up and work together. Each team pair select which machine is remotely managed (Web-based System Manager server) and which machines are the remote system administrator platform (Web-based System Manager client). There is no need for additional configuration to use the Web-based System Manager to manage an AIX platform from an AIX client with the Web-based System Manager installed. Client-server mode does not require that the server run a Web server; the connection is made directly between the two Web-based System Manager applications.
__ 7. Log into the WebSM Client system as root and using the correct root password.
__ 8. On the WebSM Client system, make sure you are in the AIX windows or CDE environment. If you are in a CDE environment and there is no terminal emulation window, open the Personal Application subpanel (arrow over the pencil and paper icon) and click the Terminal icon. Access the Web-Based System Manager on the client platform, but specify the IP address or hostname of the Web-based System Manager server machine.
__ 9. Do a couple things to validate that the interface is working correctly and then close down the application.
__ 10. At the Web-based System Manager server system, disable client-server (and remote client) access. This way you can use the Web-based System Manager locally on a platform but not allow remote client-server access.
__ 11. At the client platform, again start the Web-based System Manager specifying the IP address or hostname of the Web-based System Manager server machine. Did it work? _____
6-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 12. At the Web-based System Manager server platform, re-enable client-server (and remote client) access.
6-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Part 3 (Optional): Configure the Web-based System Manager for remote client access
Preface
In order to do this optional exercise, you must have a qualified PC running a supported version of Windows or Linux, a supported desktop environment, and a Java-capable Web browser. The PC must have network connectivity to the AIX server platform. When using a PC platform as the Web-based System Manager Remote Client, you must first install the Web-based System Manager remote client application on that platform. This is done using the Web server on the Web-based System Manager Server platform. One a PC has the WebSM Client, it can access any AIX system which has wsmserver enabled (as in the previous exercise part). The AIX WebSM servers do not need the following configuration completed, only the server that provides for Web browser-based download of the WebSM client package. The alternative to using a Web browser interface is to ftp download the install shield executable file to the PC. The path to that file is: /usr/websm/pc_client/setup.exe
__ 13. While a Web page server is not needed to use the Web-based System Manager function, it is used to download the Web-based System Manager client to an remote Linux or Windows platforms you might wish to work from. The HTTP Server Web Server software (IHS2), which is delivered on the AIX 5L V5.3 Expansion Pack CD, should already be pre-installed on your system. Verify that it has been installed.
__ 14. You need a graphic interface to configure the Web server support for providing the WebSM PC client. In your graphic environment start a terminal emulation window and execute configassist in the background. Configure the Web server support for Web-based System Manager using the following values. The root document directory is: /usr/HTTPServer/htdocs The root CGI directory is: /usr/HTTPServer/cgi-bin The HTTPServer start command is: /usr/HTTPServer/bin/apachectl restart
__ 15. On the client PC, start the Web browser and enter a URL of: http://<wsmservername>/remote_client.html
6-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 16. Click the InstallShield hyperlink on the new Web page. (The Java Web Start method requires additional security software to be installed on both client and server platforms).
__ 17. Identify the client as either a Linux or Windows platform on the resulting Web page.
__ 18. On the File Download pop-up, click the Save to Disk button. In the Save In: field, navigate to store it on the desktop and again click the Save button. In the Download complete pop-up, click the Open button. This runs the Install Shield wizard. (There will be a command prompt window launch to execute java.exe just before the Installer window appears; do not do anything with the command prompt window.) On the Installer window, click the Next button. Use the default install Directory name and click the Next button. Note the location and size of the install and click the Next button. After the install is complete, click the Finish button.
__ 19. You should now see an icon on your desktop labeled: Web Based System Manager Application. Open this new icon. In the Log On window, enter the Web-based System Manager server hostname or IP address and click the Log On button. After the handshake procedure is completed, enter root and the root password and again click the Log On button.
__ 20. Once the Web System Manager window appears and has all the icons filled in, try a few operations to prove it is operational and then exit the application.
End of exercise
6-6
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Exercise 7. Devices
What this exercise is about
This exercise familiarizes the students with listing device configuration information on the system and configuring a defined device.
Introduction
This exercise is designed for you to become familiar with the methods you can use to discover what devices are on your system and how they are configured. It deals exclusively with adapters and SCSI types of devices. Future optional exercises will deal with terminals and printers. Part 5 - Configuring a defined device, can only be done if you have an externally attached tape drive or CD-ROM. Most lab facilities do not have this.
Exercise 7. Devices
7-1
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. If your lab environment uses remote System p/AIX platforms, the instructor will provide you with the addressing (IP address or hostname) and instructions for accessing the remote machine. For example, you might be using telnet, an X-windows server, or a VNC client. Whatever tool you are using, at various points in the labs you may need to re-launch your remote access tool to obtain a new login prompt.
__ 4. List the configured devices on the system. Are your SCSI devices available? ____________________________________________________________ __ 5. List information about the memory you have on the system. Record the amount of memory you have.
__ 6. List the disks on your system. Record how many you have.
7-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Exercise 7. Devices
7-3
Student Exercises
__ 11. For the interfaces which are only defined, select one and list the adapter which the interface is using. For example, if the interface is en4, then the corresponding network adapter device name is ent4 (the numbers always match). What is the status of the adapter? _______________________________________________________________ __ 12. Put the Ethernet adapter device into a Defined state. Be careful to specify the correct adapter and not the one with a configured interface. Display the adapter and verify its status.
__ 14. Rediscover and configure the Ethernet adapter. Check its status.
7-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 16. Generate a device listing for the disk devices. Select one disk which was not in a volume group and record the location of that disk. If it is SCSI attached, what is the SCSI ID of the disk. _______________________________________________________________ _______________________________________________________________ __ 17. Using the disk selected above, put that disk device into a Defined state. __ 18. Remove the disk device from the customized database.
__ 19. Rediscover and configure that same disk for use. Does the device that appears have the same location? _________________________________________ ____________________________________________________________
Exercise 7. Devices
7-5
Student Exercises
__ 21. Turn off the tape drive. Reboot the system. __ 22. Log in and su to root. Check the status of the tape drive. Is it in a state where it can be used? ____ Why? _______________________________ Record the name of the tape drive.
__ 23. Put the tape drive into the available state so it can be used. Use the name for the tape drive that you recorded in the previous instruction.
End of exercise
7-6
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
8-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. __ 1. Log in as team01 and su to root. __ 2. View the contents of /etc/filesystems and list the file systems on your machine. __ 3. Execute the command: lsfs. What does it show? _____________________________________________ __ 4. Execute the command: lsvg. What does it show? _____________________________________________ __ 5. Execute the command: lspv. What does it show? _____________________________________________ __ 6. Execute the command: lsvg -l rootvg. What does it show?
End of exercise
8-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
In this exercise you work extensively with SMIT to work with the Logical Volume Manager. First, you investigate existing volume groups, physical volumes and logical volumes. Once you are comfortable with the layout of your storage, you have the opportunity to add a physical volume to a volume group and then create a logical volume. Finally, you make some changes to the logical volume characteristics. In many cases, both the SMIT screens and the command are provided in the Exercise Instruction With Hints section. All tasks shown can also be done using the graphical version of SMIT.
9-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 2. Ensure you have a hard disk available to create a new volume group. What is the name of the disk that is currently available? _______________
__ 3. From the disk information that you determined in the step above, add a free disk into rootvg. Note You need to substitute your free disk name when hdiskn is referenced.
__ 5. Take the same disk that you added to rootvg, out of rootvg. Make sure you remove the correct disk.
9-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 8. Verify that the new volume group was created. What are the maximum number of physical volumes that can be added to this volume group? _________________________________________________
__ 10. What is the maximum number of physical volumes that can be added to the converted newvg? _________________________________________________
__ 11. Convert newvg into a scalable volume group. In order to make this change the volume group must first be varied offline. Vary it back online when the conversion is completed.
__ 12. What is the maximum number of physical volumes that can be added to the scalable format newvg? _________________________________________________ __ 13. Remove the newvg volume group.
__ 14. Verify that hdiskn is not associated with any volume group. If it is not, repeat the steps above. You need to have this disk free for a later exercise.
9-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 17. List the contents of the rootvg volume group. If you are using SMIT, for List OPTION use status. Find the information that is necessary to answer the following questions about your environment:
a) How many physical volumes are there? ______________________________ b) How many logical volumes are there? _______________________________ c) How many total physical partitions are there for this volume group?_________ d) How many of those physical partitions are free? ________________________ e) How large are the physical partitions? _______________________________ f) What is the Logical Track Group size? _______________________________ g) What is the maximum number of PPs per physical volume? _______________
__ 18. List the contents of the rootvg volume group once again this time selecting physical volumes for the List OPTION. Note: the free distribution of physical partitions is shown relative to the position on disk. These positions represent outer edge, outer middle, center, inner middle, inner edge. Make a note of the free partitions and their position on disk. ______ ______ ______ ______ ______
__ 20. List the contents of any physical volume on your system. If you are using SMIT, for List OPTION use status. Find the information that is necessary to answer the following questions about your environment: a) To which volume group does the physical volume belong? _______________ b) What is the physical partition size? _________________________________
9-4 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
c) How many total physical partitions are there? __________________________ d) How many of those physical partitions are used? _______________________ e) What is the maximum transfer size? _________________________________ Try other options for listing information about the physical volume you select.
__ 21. List all of the logical volumes in the rootvg volume group.
__ 22. Show the characteristics for the logical volume hd4. If you are using SMIT, for List OPTION use status. Find the information that is necessary to answer the following questions about your environment: a) To which volume group does it belong? ______________________________ b) How many copies? ______________________________________________ c) How many physical partitions is it? __________________________________ d) How large is the logical volume in megabytes? _________________________
9-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 23. Only one physical volume has been defined to be a member of the rootvg volume group. Using an available physical volume located on your system, create a new volume group called datavg. Verify that the new volume group was successfully created.
__ 25. Rename the logical volume created above to yylv (where yy represents the initials of your first and last name) instead of the system generated one, and verify that it has been renamed.
__ 26. Extend the yylv logical volume by one partition and specify that the added partition be allocated on the outer edge of the disk. This logical volume is used in the next exercise.
End of exercise
9-6
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
In this exercise, you are using SMIT extensively to work with file systems. You add a file system to the logical volume you created in the previous exercise and then mount it so users can access the storage space. You copy files into this file system and then experiment with unmounting and mounting the file system once again but in different locations. You also get an opportunity to remove a file system and create a file system. The last portion of the exercise provides exposure to creating a mirrored file system and then changing some characteristics of the mirrored file system.
10-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 2. If you are creating a JFS file system intended to store files about 8 KB in size, what would you choose for the following values? Fragment Size: NBPI:
__ 3. If you are creating a JFS file system intended to store files about 2 MB in size, what would you choose for the following values? Fragment Size: NBPI:
__ 4. When should you use large file-enable file systems? _______________________ ________________________________________________________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 7. At this moment, can the space be used to create an AIX file? _____________________________________________________________ _____________________________________________________________ Mount the file system. Verify that it is mounted. Check the owner and group of the mount point. Change the owner and group of the mount point to teamxx and staff. Copy all files and directories that are in the /usr/samples directory to the /home/teamxx/dir1 directory.
__ 8. Create an enhanced journaled file system in the rootvg and let the system create the logical volume for you. Have it mount automatically at system restart. Set its default mount point to /home/teamxx/dir2. First try to create it with a size of 1 MB. If that fails, create the file system with a size of 16 MB.
__ 9. Check to see if it is mounted. It shouldn't be. Mount it. Verify that it is mounted. Change the owner and group of the mount point to teamxx and staff.
__ 10. Add several files to the /home/teamxx/dir2 directory. (Note: A quick way to do this is through the use of the touch command.) __ 11. List the files in the /home/teamxx/dir1 directory. Unmount /home/teamxx/dir1 and list the files again. (Note: If you aren't root then su to root) __ 12. List the files in the /home/teamxx/dir2 directory. It should have all the files you created in it from instruction 5. Then mount yylv on /home/teamxx/dir2 and list the files in /home/teamxx/dir2. What files are there now? _________________________________________ Where did they come from? _______________________________________
10-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
What happened to the files that were originally seen in /home/teamxx/dir2? _____________________________________________________________
__ 13. Unmount /dev/yylv. Mount /home/teamxx/dir1. List the files in both /home/teamxx/dir1 and /home/teamxx/dir2 to be sure they are set up as originally created.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 15. Record the current size of the filesystem. ____________________________________________________________ __ 16. Extend the size of /home/teamxx/dir1 file system by ten 512-byte blocks. What is the new size of the file system? ___________________ How much did the file system actually get extended? ____________________ Why didn't the size increase by 5,120 bytes? __________________________ Did this change the size of the logical volume with which it is associated?____
__ 17. Extend the size of the yylv logical volume by one physical partition. What is the size of the logical volume? _______________________ What is the size of the file system? __________________________ Did this change the size of the file system? _____ Why not? ______________________________________________________ ______________________________________________________________ Make it so the file system takes up all the space allocated to the logical volume.
10-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 19. Change the characteristics of the /home/teamxx/dir2 enhanced journal file system to increase the size by one 512 byte block. What is the final size resulting from this? _____________________________
__ 20. Change the characteristics of the /home/teamxx/dir2 enhanced journal file system to reduce the size down to a final size of 16 megabytes. Was this successful? ________________________________________________________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 22. Unmount /home/teamxx/dir1 and remove the yylv logical volume. Does this remove all references to the logical volume and its mount point? ___
__ 23. Ensure that all references to the yylv logical volume and its mount point have been removed by removing the file system. Do you see any potential problems with removing a logical volume and then removing the file system? _________________________________________ _____________________________________________________________
10-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 25. Change the characteristics of the fslvxx logical volume so that mirroring is turned on to have a single mirror (two copies). Be sure to allow creating a mirror on the same disk if you do not have two drives in your volume group. Other than that, take all the defaults.
__ 26. Show the characteristics of the fslvxx logical volume. Can you tell that it is mirrored? ________________________ What information indicates it is mirrored? _____________________________ What is the LV STATE? __________________________________ Why do you think it is marked stale? _________________________________ What is the scheduling policy for writes? _______________________
__ 27. Change the characteristics of your mirrored logical volume to do sequential writes. Synchronize the copies. Fix the problem based on the message you receive and try again. Be sure it is mounted before continuing to the next instruction.
__ 28. Show the characteristics of the fslvxx logical volume. What values have changed? _______________________________________
__ 30. Remove the, now unused, second disk from the rootvg.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
End of exercise
10-9
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
In this exercise you perform many of the activities required of a system administrator to manage disk space. Most of these activities require use of commands on a command line. This exercise requires the successful completion of the last two exercises; Working with LVM and Working with File Systems. Throughout this exercise you are asked to change several times from your regular user name, teamxx, to root and then back again. It is a good idea to use exit to return to the previous user after completion of a task by the current user instead of continually executing the su command.
11-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
In order to do Part 2 - Using Fragments For Disk Usage Efficiency and Part 3 - Using JFS Compression, it is assumed that you have two disk drives in your system and that you have completed Exercise 10 Working with LVM, Part 4 - Adding A Volume Group.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 3. Let's assume that you have concluded that more space is needed (as opposed to removing files to free up space); therefore, the file system needs to be expanded. Expand the file system by the size of 1 physical partition. Verify the usage of this file system.
11-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 7. To test the number of 512-byte files that can be stored in each file system, run the shell script /home/workshop/fragcopy. The shell script has the usage: fragcopy numfiles dir/sourcefilename dir/targetfilename. The fragcopy script creates copies of the sourcefilename until either the file system is full or the numfiles value is reached. The files are put in the directory specified in dir/targetfilename with the targetfilename as the prefix followed by a . and a number which represents the count of the file currently being created. While fragcopy processes, a count is displayed showing the number of files that have been successfully copied. Have fragcopy copy /tmp/512bytefile 500 times and have as the dir/targetfilename value: /tmp/frag512/frag500. __ 8. Look at the contents of the /tmp/frag512 directory. Note how many files are in this directory.
__ 9. Do the same as step 7 only this time create copies of the 512bytefile in /tmp/frag4096
11-4 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty __ 10. Look at the contents for /tmp/frag4096. Note how many files are in this directory.
__ 11. Now that there are two file systems with the same number of files, see how much disk space each has utilized. How many 512-byte blocks have the files used in /tmp/frag512? _____ How many inodes have the files used in /tmp/frag512? _______ How many 512-byte blocks have the files used in /tmp/frag4096? _____ How many inodes have the files used in /tmp/frag4096?_______ What can you conclude from this? __________________________________
__ 12. When you are finished reviewing the results, unmount and remove both file systems.
11-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 14. Create a third file system (the same size as the two file systems you just created and also in the datavg volume group) that does not use compression, that also has a fragment size of 2048 and an NBPI of 2048, that has a mount point of /tmp/uncompress, and that is automatically mounted at system restart. This will be used for purposes of comparison.
__ 15. Check that the journaled file systems have been correctly created.
__ 17. Next, check the performance of the compressed file system by creating a 4 MB file named bigfile by using the script /home/workshop/mkfile and then move it to /home/workshop. Then copy it to each file system, and measure the performance using timex. First, check that the logical volume configuration is similar. Then, record copy times. Real time for compress512: ____________________________________ Real time for compress: _______________________________________ Real time for uncompress: _____________________________________ __ 18. Use du to check how much space is really used and how efficient the compression is. Disk usage for compress512: _____________________________________ Disk usage for compress: _________________________________________ Disk usage for uncompress: ______________________________________ __ 19. Use ls -l to verify the normal size of each file. What is the amount of data in the bigsize file in each filesystem?
11-6 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
File size of bigfile in compress512: ____________________________________ File size of bigfile in compress: _______________________________________ File size of bigfile in uncompress: _____________________________________
11-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 22. Perform a check on the /home/teamxx/dir2 file system so that if it finds something wrong you are prompted as to whether or not to take any action. What kind of message did you get? ______________________________ Unmount the file system and check it again. Mount the file system again after the check is complete.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
End of exercise
11-9
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
In this exercise you work with paging logical volumes, adding, deleting, and changing them. To do this exercise, you need to work in teams one team per AIX system. Only one team member is able to do the exercise, the other team members provide support and assistance where needed.
12-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. __ 1. If you are not already logged into your system, log in as teamxx and su to root. Check the current memory size on the system and then check the paging space.
__ 2. If you have two disks on your system and successfully created another volume group named datavg during the Working with LVM exercise, create two page spaces: first one in the rootvg volume group with a size of one partition and then the other in the datavg volume group with an equivalent amount of space. (Be careful, the volume groups may have different ppsize values.) Otherwise, create both page spaces in the rootvg volume group. If you are short of space in rootvg, put both paging spaces in datavg. Make them one partition each. Have them become active now and at system restart. What names did the system assign to the two new paging spaces?____________
__ 3. Check to be sure the new paging spaces are active. Create some system activity and monitor the % of paging space used. Check the % used on the paging spaces. What conclusion can you come to based on these observations? _____________________________________________________________ If necessary, run these commands again and notice how the page space usage becomes balanced over time. Note that your system may have so much memory that this step may not use enough to trigger an noticeable increase in paging space utilization.
__ 4. Change the size of paging00 to four partitions. Check to be sure that paging00 has been increased.
__ 5. Reduce the size of paging00 by one partition. Check to be sure that paging00 has been decreased.
12-2 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
End of exercise
12-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
your /home/teamxx directory and not the /(root) directory. Being in /(root) can cause some Irrecoverable problems that might only be fixed by reloading your system. The Exercise Instructions with Hints section provides both the command line and SMIT methods. Select the one that is most appropriate for you.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Exercise Instructions
Important You are backing up the file system that you created in the Working with File Systems exercise; therefore, that exercise must have been completed successfully before continuing with this exercise. When referencing the file system you can use either the logical volume name, /dev/fslvxx or the file system name, /home/teamxx/dir2.
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 3. Make sure the backup completes successfully before doing this step. Remove the datavg volume group. The volume group must not have any physical partitions allocated to logical volumes. In order to remove these logical volumes in the datavg, you must first make sure that they are all closed. In others words, the file systems must be unmounted and the paging spaces must be inactive.You need to unmount all mounted file systems in datavg first.
__ 6. Examine the contents of the file /tmp/vgdata/datavg/datavg.data. What is the file used for?
13-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 8. Create a new file system in datavg named /home/bkupxx, where xx is your login team number. Make the file system one partition in size.
__ 10. Make sure the file system you created in the Working with File Systems exercise, /home/teamxx/dir2 in logical volume /dev/fslvxx, is mounted. If it isn't, mount it.
__ 11. Ensure that all files from the /usr/samples directory were copied into the /home/teamxx/dir2 file system. You are backing up these files to the new file system, /home/bkupxx, which you created in Step 8.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 13. You should be ready to back it up: Change directory to /home/teamxx. Unmount the /home/teamxx/dir2 file system. Verify that the file system is unmounted. If you got an error unmounting the file system, it may be that you were residing in that directory. You must be out of the file system before you can unmount it. Remember, it is a good idea to unmount the file system before you back it up to ensure that there is no activity happening in the file system at the time of backup. Ensure that the mount point is empty. Do a listing on the directory. If it is empty, proceed to the next step. If not, ensure you are in your home directory, /home/teamxx, and delete the files in the directory /home/teamxx/dir2.
__ 14. Back up the entire file system in inode format. Make sure to update /etc/dumpdates. Your output media will be a file named weekly in the /home/bkupxx file system.
__ 15. Display the table of contents of the /home/bkupxx/weekly backup to ensure that all files in the /home/teamxx/dir2 file system were backed up properly. How are the files listed? ______________________________________________________
__ 16. View /etc/dumpdates and analyze the contents. Note If there is more than one team on your system, you will be writing to /etc/dumpdates simultaneously. Analyze the information that relates to your logical volume name. You see the other team's logical volumes listed as well.
__ 17. Mount the /home/teamxx/dir2 file system and simulate a daily change to the file named /home/teamxx/dir2/samples/tcpip/resolv.conf. Add your name in uppercase to the first line of the file.
Copyright IBM Corp. 1997, 2008 Exercise 13. Using backup and restore 13-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 18. Now unmount the file system. Verify it is unmounted. Perform an incremental inode backup of /home/teamxx/dir2 to the file /home/bkupxx /daily. It should backup just the changed file, resolv.conf. You are simulating the fact that you have a base backup in /home/bkupxx/weekly (analogous to the monthly backup explained in class) and an incremental backup in /home/bkupxx/daily (analogous to the daily backup explained in class).
__ 19. Display the table of contents of the /home/bkupxx/daily backup to ensure that just the changed file was backed up. Record the EXACT name of the file.
Note The next few steps show command line hints rather than SMIT screens because of the extra steps of removing files and destroying file systems, which is necessary to perform simulated recovery functions. You may continue to use the SMIT F9 shellout feature to execute the crash procedures.
__ 21. Simulate a user accident and recover the lost file using the above backup: Mount the file system. Change directory to /home/teamxx/dir2. Remove the samples/tcpip/resolv.conf file. Check that it no longer exists.
__ 22. Before you start the restore, be sure you are in the directory /home /teamxx/dir2. Why is this important? ______________________________________________ You will see messages displayed before the restore takes place. When prompted to specify next volume #, type in 1. When prompted to set owner/mode, type in no. __ 23. Now, you perform a crash of the entire /home/teamxx/dir2 file system and then restore it using your backups. Ensure you are in the /home/teamxx/dir2 directory. Remove all files and directories in this file system. Check to see that they were all removed. Restore the file system and check to ensure all the files were restored. Which backup should you use first? ____________________________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 24. The restoresymtable file is created or updated upon each restore when working with incremental inode backups. Do a long listing on this file to see that it exists. Remove the restoresymtable. Note The restoresymtable file keeps track of links and deleted files that were created between the backups. This file is only created when working with the -r restore option. The system does not know when you are finished restoring all your incremental inode backups, so it leaves you with the chore of cleaning up this control file. This file did not appear during the single file restore. This is because the -r option is not appropriate for a single file restore. The -x option is the option of choice when restoring a single file and the unusual problems of restoring links and deleted files correctly is not an issue.
The next three steps demonstrate the advantage of backing up by relative path name, by restoring into a directory that is different from where the files originally resided.
__ 25. Create a new directory named /home/teamxx/mybkup. Change and verify that you are in the new directory.
__ 26. Restore the contents of /home/bkupxx/weekly into your new directory /home/teamxx/mybkup. Don't forget to use the verbose option so you can see what the restore command is doing. __ 27. Check the directory /home/teamxx/mybkup. It should contain the contents of the weekly backup. You can see that backing up files by relative path name allows you to restore them back to ANY directory.
13-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 30. List the table of contents to verify the backup was successful. How were the files listed? _________________________________________
__ 31. Let's take a look at the difference between relative and full path backups by restoring by relative path name. First, cd to /home/teamxx/mybkup directory and delete all the files. Ensure the directory is empty.
__ 32. The goal is to restore the files from /home/bkupxx/weekly into the /home/teamxx/mybkup directory. Restore the files and note the way the files are listed in the output of the restore command. Take a look at the contents of the /home /teamxx/mybkup directory. During restore where the filenames full or relative path? _________________ Does it contain any files? _________________________________________
__ 33. Back up the file system by name, but use a relative path name. Make sure you are in /home/teamxx/dir2. List the contents of weekly. The file names should be in a ./filename (relative path name) format.
__ 34. Now, you should be able to restore these files into the /home/teamxx/mybkup directory. Change to the /home/teamxx/mybkup directory. Perform the restore.
__ 35. List the contents of the /home/teamxx/mybkup directory. All of the files should be listed.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Part 5 - (Optional)
The next eight steps are included to show what happens if you don't remember to mount a file system before performing a restore. This is a very common error that can cause a lot of headaches. Hopefully, by intentionally making this mistake in class, you can avoid it back at work or be able to identify the problem immediately and resolve it.
__ 36. The /home/teamxx/dir2 file system should still be mounted from the previous restore. Once again, delete all the files and directories in the file system. (If you clean out the file system now, it is much easier to see if your restore is working properly later.) Double check to make sure the files are removed.
__ 38. Change to the directory mount point and perform the restore.
__ 39. Mount the file system and look at the contents to make sure that the restore worked. Does the file system contain any files?_______ Why? ________________________________________________________
__ 40. Unmount the file system and list the files in the mount point directory. You see that this is where your files went when you performed the restore.
__ 41. Clean up the mount point by deleting all the files in the /home/teamxx/dir2 directory.
__ 43. Now that you have the file system mounted, try the restore again. List the files after you are through with the restore.
End of exercise
13-9
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
14-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 3. Change directory to the file system and create a directory called myjunk. In that directory, create four zero-length files named file1, file2, file3, and file4. __ 4. Back up the file system using the tar command to the file /home/bkupxx/tardata using relative path names. List the contents of tardata to ensure all files are backed up.
__ 5. Since the backup was done using relative path names, restore them to a different directory. Use tar to restore the contents of the tardata directory to the /home/teamxx/mybkup directory. Verify that all files were restored.
__ 6. Change your directory to /home/teamxx/mybkup. Remove all the files in /home/teamxx/mybkup. Verify that it is empty. Use tar to extract only the files contained in the myjunk directory in tardata and load these files to the /home/teamxx/mybkup directory. List the files in the /home/teamxx/mybkup directory. __ 7. You have been using relative path names up to this point with tar. Specify a full path name and tar backs it up in full path name format. Backup the contents of the file system to tardata directory using full path names.
14-2 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty __ 8. Check the contents of tardata. All file names should be referenced by full path name. If you restored the files, they would restore back to the same directory that you copied them from.
14-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 12. Change your directory to /home/teamxx/mybkup. Remove all the files in /home/teamxx/mybkup. Verify that it is empty. Use cpio to extract only the files contained in the myjunk directory in cpiodata and load these files to the /home/teamxx/mybkup directory. List the files in the /home/teamxx/mybkup directory. __ 13. You have been using relative path names up to this point with cpio. Specify a full path name with the find command and cpio backs it up with a full path name format. Back up the contents of the file system to cpiodata using full path names.
__ 14. Check the contents of cpiodata. All the file names should be referenced by full path names. If you restored the files, they would restore back to the same directory that you copied them from.
End of exercise
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
During this exercise, you are given an opportunity to look at some of the files discussed in the unit. You also have a chance to work with the SUID and sticky bits.
15-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 2. Exit SMIT if you are in SMIT, and display the groups of which root is a member. Next, without logging out, display the groups of which your teamxx login is a member. __ 3. Display the contents of the file that keeps track of the successful and failed su attempts. How can you determine the failed attempts? _________ __ 4. When a user logs in successfully, the login program writes the associated information in the two files /var/adm/wtmp and /etc/utmp. Using the who command, examine the contents of these two files. __ 5. Display in reverse chronological order, all previous logins and logouts recorded in /var/adm/wtmp for your login user name, teamxx, and root. __ 6. Check to see if there were any invalid login attempts on your system due to an incorrect login name or password. How can you tell? ______________________________________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 9. Turn the SUID bit off. Verify that the bit is turned off. __ 10. Exit back to your teamxx login shell and try to su to root. Can you? _____________________________________________________ __ 11. Since you cannot su to root to turn the SUID bit back on, login over yourself as root and set SUID on the program /usr/bin/su. Verify that the SUID bit is turned on. __ 12. Log in over yourself as teamxx and su to root. __ 13. Do a long listing on the /tmp directory. Locate the sticky bit that is set on the directory.
__ 14. Exit back to your teamxx login shell. Ensure you are in your teamxx home directory. Create a subdirectory in your home directory named stickydir. Change the bits on the stickydir directory for full access by user, group, and others with the sticky bit turned on. Verify that the change was made.
__ 15. Create a zero-length file in the stickydir directory named sticky1. __ 16. Now, su to a teamyy user name that is not being used on your system. Check with any other teams that may be sharing your system. The existing user names should be team01 - team05 with passwords the same as the user name. As this other teamyy user, try to first add and then remove a file named sticky2. Can you do it? __________________________________________________
Copyright IBM Corp. 1997, 2008 Exercise 15. Security files 15-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
As this other teamyy user, try and remove the teamxx file named sticky1. Can you do it? __________________________________________________
End of exercise
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise has two parts. Be sure to do only the currently assigned part of the exercise. This exercise concentrates on the SMIT interface for creating and maintaining users and groups. The exercise instructions direct you to create users usera, userb and userc. If two students are sharing an AIX system, and performing this exercise separately, create users useraxx, userbxx, usercxx where xx represents the student's initials. This will ensure unique user IDs.
16-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 2. Create a new user named usera with the following restrictions: Three-day password expiration warning Two passwords before reuse One week between expiration and lockout Prevent other users from switching to usera
__ 3. List the user attributes. Exit SMIT and look at the /etc/security/user file. Compare the defaults in this file with the attributes listed for usera.
__ 4. To test the new user, log off and log in as usera. Could you log in? ______ Why? ________________________________________________________
__ 5. Log in as root and page through the /etc/passwd file. What is in the password field for usera? ________
__ 6. Assign a password to usera. Display the /etc/passwd file. What is in the password field for usera? _______________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 7. Do a long listing of all files including hidden files in usera's home directory. What files were created? ______________________________
__ 8. Test the new user ID. Log off and log in as usera. When prompted to change the password, type in the same password assigned in step 6 to test the reuse restriction set on the user ID from step 2. After you get the reuse error message, proceed to change usera's password to something different. After successfully logging in as usera, log out.
__ 9. Suppose usera is going on an extended vacation. Log in as root and using SMIT, lock usera's login account.
__ 10. Exit SMIT and test the account lock by attempting to log in as usera. You should not be able to. If you could, redo step 9 and test it again. __ 11. Log in as root and try to su to usera. Change to useras environment at the same time. Could you? _______ Why? ________________________________________________________ Kill the subshell and return to root. Unlock usera's account.
__ 12. Some users may try to guess other user's passwords. To help prevent illegal logins, set the number of failed login attempts to two for usera. Exit SMIT and log out.
__ 13. Test the change by trying to log in as usera and entering an incorrect password three times. On the fourth attempt, enter the correct password. If you are in a Windows session, exit and execute this instruction from an ASCII command line.
__ 14. Log in as root and reset the failed login count for usera. __ 15. Attempt to login at usera with the correct password. Was it successful? __ 16. Log in as root and change the failed login attempts limit to 0 for usera to disable the failed login check.
16-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 18. Exit SMIT. Page through the /etc/group file. Locate security and ensure that helper is listed there.
__ 19. Log out and back in as helper. Execute the groups command to ensure that you belong to two groups, staff and security. As a new system administrator, add a new group called budget. List all groups to verify the addition of the new group.
__ 20. Now add two new users, userb and userc making both members of budget as their group set.
__ 21. Exit SMIT. Assign the passwords for userb and userc. Make the password for each user the same as the user name. __ 22. Log off and back in as userb. (Because this is userb's first login, you are prompted to change the password. Simply keep it the same. You should be familiar with what to do; therefore, the prompts are not shown). Change to the budget group and create a file named report. Add group write permission to report. Do a long listing on the file to verify that the group access is the budget group. Return to the default group. Other than the command you used to change groups, what other command could be used? _________________________________________________
__ 23. Let's test to see if a member of the budget group can edit the file report. Log out and back in as userc. As in the step above, this is userc's first time to log in. Change the password accordingly. Edit report and add your name. Log out. Did userc have to issue any special command before editing the file? _____ Why? _________________________________________________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 25. Create a user named userd. Assign a password to userd. Log out and back in as userd. You should see the current directory listed as your prompt. Next display the value of the EDITOR variable. If the results are not what you expected, repeat the previous step and try again.
__ 27. Remove userb from the system. Take the default to the option Remove AUTHENTICATION which is yes. What is this doing? ______________________________________________
__ 28. Page through the /etc/security/passwd file to ensure that the stanza for userb was removed.
__ 29. When a user is removed from the system, the user's home directory and files owned by the user are NOT removed. Verify that userb's home directory and files still exist. Remove all files and directories associated with userb.
Copyright IBM Corp. 1997, 2008 Exercise 16. User administration 16-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 31. Display the message by logging out and back in as usera. __ 32. Now create a zero-length hidden file in usera's home directory named .hushlogin. You want everyone that logs in to see the output of /etc/motd except usera. Log out and back in as usera. The /etc/motd file should not have been displayed.
__ 33. As root, create a file named newsitem in the /var/news directory. Type in a few lines. Log out and back in as teamxx and read the news.
__ 34. To do this step you must have more than one user on your local system. If you are the only person on your system and you have two terminals, log in on both terminals using two different teamxx IDs. Perform the exercise from one terminal and look for the message on the other terminal. As root, send a note to all users on the system that the system shuts down in 30 minutes.
16-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 37. Edit the default stanza in /etc/security/login.cfg and add the herald line. Tip! - Do not use <Enter> at what looks like the end of the line. Let vi wrap the line. The \r and \n are escape sequences that will signal to the <RETURN> and <NEW LINE> for you. Note that for some terminal emulations, the \r <carriage return> is displayed as a literal. On those emulations, the \n <new line> handles both the carriage return and new line feed. When finished, save the file and log out.
__ 38. Check to see if the login prompt is what you expect. You must be using an ascii interface to see the effect of the change. For students using a local console: If you are using an ASCII screen, your new herald should be displayed. If you are using CDE, you cannot see your changes unless you select the Option button and selection Command Line. If you don't see your new herald, then check your entry in /etc/security/login.cfg. For student using remote access, attempt a new remote connection. For example you might use a telnet protocol either via a telnet command or via PuTTY.
End of exercise
16-9
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
You can issue a command by entering it on the command line. It can run in the foreground or the background. A command can also be issued with nohup allowing you to log off and go home while the command is still running. The scheduling utilities covered in this exercise allow you to schedule commands to run after you have left for the day.
17-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
Part 1 - Using at
__ 1. Log in as teamxx. Submit a single at job that immediately echoes the message Running an at command. and then echoes another message This is it! Check your mail. Notice the shell script name assigned to your job. __ 2. Repeat the above instruction, but this time force your output to your screen. (Suggestion: Use the tty command to get your device name.)
__ 3. Experiment with the time specifications of next week and next month. After entering jobs to be executed next week and next month, list the at jobs waiting to run and check to see whether the jobs you just submitted appear in the list. __ 4. Let's take a look at the environment when an at job executes. Change directory to /etc. Submit an at job that returns the current directory to your screen and have it execute in one minute. Now change directory to /var/adm and repeat the at request. Change directory to the /(root) directory, list the at queued jobs, then wait for the execution of your two jobs. What can you deduce from the results you obtained in this exercise step? _____________________________________________________________ __ 5. You should now have several at jobs scheduled. su to root to give yourself proper permission for viewing these jobs. Change to the directory /var/spool/cron/atjobs. Examine some of the files in this directory and notice the additional statements that are created for the at job besides the ones that the user entered.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Note pg won't work very well because lines get truncated. For one thing, you should see that the directory for the at job does indeed get set specifically within the at job itself. If the content of a file looks disjointed, it is because nulls are used as field delimiters within the file. When you have finished, return to your teamxx ID.
__ 6. As teamxx, list your at jobs. Use the appropriate option to cancel several of them. Note You need to specify the whole job name.
__ 7. Switch to root to gain proper permission to view the security files. Page the /var/adm/cron/at.deny file. Notice that there are no entries. What security implications does this have? ____________________________ For this exercise we won't modify this file, but if we were to, we would put one userid on each line to specify each user for whom we wanted to deny access. Notice, also, that there is no at.allow file. Exit the root subshell and return to teamxx.
17-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 11. Create a zero length file called datefile in the /tmp directory.
__ 12. In your home directory, create a file called cron00 (which will be used as a crontab file) which specifies that the output of the date command will be appended (using the >> operator) to the file /tmp/datefile every minute from now on. Remember to use full path names for commands used in crontab files. Remember, there can be NO blank lines in the file including lines created by pressing Enter after the last entry. __ 13. Place your crontab file in the crontabs directory via the crontab command. Then, use the appropriate option with crontab to look at the crontab entry that you created. __ 14. Use the -f option of the tail command to check for additions to the file /tmp/datefile. If you have done the last few steps correctly, you should see an addition to the file in 1 minute, another in 2 minutes, and so on. Wait to see 3 or 4 additions to the file, then terminate the tail -f session. __ 15. As teamxx, use the appropriate option of the crontab command to remove your current crontab file. Verify that it has been removed.
17-4 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
17-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Part 4 - Optional
The remaining exercise steps are optional. Complete them if there is time available in this lab session and if you would like more practice working with AIX scheduling facilities. __ 16. Continuing as teamxx, cd back to your home directory and create a shell script called sizechk to: __ a. Echo the message Active files over 2 blocks in /home. __ b. Display the date and time. __ c. Display the names of all files that are larger than 2 blocks in /home and that have been modified within the last 2 days. Hint Use the find command, redirecting error messages to /dev/null).
__ d. Echo Done. __ e. Make sure all output goes to the screen. __ f. Make the script executable.
__ 17. Test your script. If you don't get any output, change the blocksize to 1. __ 18. Run sizechk as an at job without redirecting output here (let the script do it). Make sure that your at job runs and that your output goes to your screen. __ 19. Verify the system date and time. Create a file called cron01 that causes sizechk to be invoked every minute for the next 5 minutes for today only. Remember to use full path names for commands used in crontab files. Remember, there can be NO blank lines in the file including lines created by pressing Enter after the last entry. __ 20. Place your crontab file in the crontabs directory via the crontab command. Wait for the next 1 minute interval and check that your sizechk script did indeed get invoked by cron and that it executed successfully. While you are waiting, use the appropriate option with crontab to look at the crontab entry that you created.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 21. Switch user to root. Change directory to /var/spool/cron/crontabs and look at the files that are in this directory. Your cron01 should be there with the name teamxx. Examine the contents of several of the files. They may contain statements that are commented and could be uncommented and/or modified based on specific installation requirements. They provide a starting point for the execution of some administrative commands in different areas.
__ 22. Return to teamxx. Edit the current crontab file by adding to the existing crontab data a line that executes the sizechk script on the hour, every hour of every day except Sunday. Wait a moment, and then verify that this line has been added to your crontab. Once you are done, remove this particular entry so it does not drive you crazy the rest of the week. Verify that it was removed. __ 23. Switch to root. Examine the file /etc/inittab and notice how the cron daemon actually gets started. cron will respawn if it is not running. Why is this important? _____________________________________________________________ Return to your teamxx ID.
End of exercise
17-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise is designed for you to become familiar with adding a printer and a queue. In the area of printing, there are many commands that can be used to do the same thing. In many of these cases, we have provided only one command method and the other method takes you through SMIT. If you are already comfortable with certain UNIX commands for handling print activities, like submitting a print job, please feel free to use that command. Some of the functions provided by AIX can only be accessed through the command shown or through SMIT. Printer configurations vary widely in the classrooms. Check with your instructor for specific instruction for your site. If more than one student is sharing an AIX system, but performing this exercise separately, be sure that the queue names are unique. For example, name one of the queues xxdraft where xx is the student's initials. Wherever you see draft in the exercise instructions, use your unique name. Wherever you see the queue name quality, use a queue name such as xxquality where the xx is the student's initials.
18-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 3. Using SMIT, add a second queue to the printer and name it draft.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
18-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 13. Exit out of SMIT and check the status and order of your queues.
__ 14. Create a file that can be used as a print test file. Put the file in the /tmp directory and name the file printxx, where xx represents your initials. Put about 10 lines of data in it.
__ 15. Test your queues and printer by sending the printxx file you created in the step above to both the draft queue and to the quality queue.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 16. If you do not have a physical printer in the lab, you are not able to see the effects of your changed job attributes, but it is still useful to know where to set these defaults. Using SMIT, change the attributes of the quality queue by adjusting some printer characteristics. These may be different depending on the printer used. Try making some changes. Basically, change the look of the printed output. Here is a list of some changes you might try (depending on your printer): Use double spacing Set a top margin of 20 lines Specify 50 lines per page Use double high printing Provide a separator page at the head of the job
__ 17. If you have physical printers, send the printxx file to the quality queue to ensure that the changes were successfully made to the queue.
__ 19. Change the queue characteristics of the draft queue so that its discipline is set to sjn, shortest job next. Check the status of the queues to verify that the change was made successfully.
__ 20. Send the file /etc/security/user to the draft queue and check to see that it is in the queue. Next, send the /tmp/printxx file you created in the previous exercise to the draft queue and again display the job queues. Which job is scheduled to run first after the queue is brought back up? ________ Why? ________________________________________________________
18-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 22. Send the files /etc/qconfig and /etc/filesystems to the quality queue and send the file /etc/motd to the draft queue.
__ 23. Check the order of the print jobs waiting in the two queues. They should all have the same priority value (Pri). In the quality queue, the /etc/filesystems file should be behind the /etc/qconfig file, because it was submitted later. Change the print priority of the /etc/filesystems job to 25 so that it becomes the first print job scheduled for the quality queue.
__ 24. Let us assume that you really wanted the /etc/filesystems printed with the characteristics associated with the draft queue. Move the /etc/filesystems print job to the draft queue.
__ 25. You realize that you already printed /etc/security/user and you don't need to do it again. Cancel the job.
__ 26. You want to print all the jobs currently in your queues except for the /etc/filesystems job, which you want to print at a later time. Put a hold on the /etc/filesystems job, verify the job is being held, and then bring up your two queues.
__ 27. Check to see all jobs have printed successfully. Then, release the /etc/filesystems job so it too can print.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 31. On the server platform, using SMIT, add print access for the client system and start the print server subsystem (lpd daemon).
__ 32. On the client system, using SMIT, configure a remote print queue (called remote) with your server systems hostname as the server with and a server print queue name of quality. Define it with a timeout value of 1 minute.
__ 33. On the client system, send the files /etc/motd and /etc/filesystems to the remote queue.
__ 34. On the client system, check to see the status of the print jobs. __ 35. On the server, see if the remote print jobs are in the quality queue.
End of exercise
18-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Optional Exercise
__ 37. As the root user, run the script /home/workshop/lab6. This script creates problems with the printing subsystem. Try printing a file. Look at the error message and check the file that is being referenced. Try to fix the problem and try printing a file again. If the problem originally presented was fixed, a new error message is generated. Make sure the resource mentioned in the error message is working and then try printing a file again.
End of exercise
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
TCP/IP has been configured on your systems prior to class in order to support the NIM-based installation/migration exercise and to provide remote access to the lab systems. In this exercise, you record the existing network configuration and then you remove that configuration. At that point you only have access to the system from the system console (either a local terminal or via an HMC virtual console). From the console, you configure TCP/IP using the same values as it had before.
19-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. If there are multiple interfaces on your system, your instructor identifies which interface to use for this exercise. If you are in an environment where the AIX system is accessed remotely, be sure to not deconfigure the interface used for that purpose.
__ 6. Collect the current network configuration information. IP address: ____________________________________________________ IP address name resolution: _______________________________________ network mask: _________________________________________________ default gateway: ________________________________________________
__ 7. Identify a partner team with whom you validate network connectivity (this may have been assigned by your instructor or this could be left to you to work out with other
19-2 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
students). Exchange IP address and hostname information with that partner team. Record their configuration information below: IP address: ____________________________________________________ IP address name resolution: _______________________________________ __ 8. ping your partner teams system to verify this currently works. __ 9. Detach both the en0 and et0 interfaces. __ 10. Remove your network interface (en0) and network adapter (ent0) from the ODM. __ 11. Set your hostname to a null string and rename /etc/hosts to /etc/hosts.bak __ 12. Run the configuration manager so that it rebuilds the adapter and interface you just deleted. Once this is complete, you are ready to proceed with the TCP/IP configuration. __ 13. ping your partner teams system to verify that you cannot communicate. __ 14. Display the network interfaces to show that the interface is not configured.
__ 16. Verify that the above action automatically set the hostname and the name resolution for your own system. __ 17. Add an entry for your partner system in the /etc/hosts file. You may use SMIT or vi.
19-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 20. Execute the host command for the hostname of your partner system and, again, for the IP addresses of your partner system. __ 21. Execute the netstat -i command to display the status of the communication adapter(s) on your system.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 23. While remotely logged in to your partner's system, create a file named sysxfile where x is the number of your system. You use this file later in this exercise. List the contents of root's directory to verify that your file exists.
__ 24. Close the connection and verify that you are back on your local system by executing hostname. You should see your host name.
19-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 26. Change to your teamxx's home directory ON YOUR system and list its contents. Pick out a small file that you can transfer to your partner system's /home/teamxx directory. Since you are root, you should not have any problems with permissions. You may want to ask your partner which teamxx home directory to use.
__ 27. End the file transfer session and verify that you are back on your local system.
End of exercise
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise is designed to give you experience in installing a system as if you had just received a new machine without anything on it. You should be using the same type of distribution media you would get from IBM. If you have more than one student sharing a system (all systems have a minimum of two terminals attached to them), then only one person can actually perform these steps. All other students on that system should observe while the steps are being done.
Requirements
A local system capable of running AIX 5L V5.3 with a CD-ROM drive attached to it and at least 128 MB of memory and 2.2 GB of physical disk space Installation media (CD) An ASCII terminal connected to one of the built-in serial ports on the system or a graphics display station directly attached to the system that has a CD-ROM drive attached to it.
A-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
There is only one version of these instructions available; there is not a separate section with Hints as the other exercises have. All instructions are included. All exercises of this chapter depend on the availability of specific equipment in your classroom.
__ 1. If your system is already on, log in as root. Then, shut down the system. Console login: root's Password: ibmaix # shutdown -F When you see the Halt Completed message on the console, shutdown is complete. The system then shuts itself off.
__ 2. Turn on all attached external devices, such as terminals, CD-ROM drives, tape drives, monitors, and external disk drives. DO NOT TURN THE SYSTEM UNIT ON YET.
__ 3. Insert the installation media into the CD-ROM drive. Place the first Installation CD in the CD-ROM drawer and push the drawer in.
__ 4. If you are using a graphics display, skip to the next step. If you are using an ASCII terminal, be sure the communications options on the terminal are set as follows: Line Speed (baud rate) = 9600 Word Length (bits per character) = 8 Parity = no (none) Number of Stop Bits = 1 Interface = RS-232C (or RS-422A) Line Control = IPRTS Be sure the keyboard and display options are set as follows: Screen = normal Row and Column = 24x80 Scroll = jump Auto LF (line feed) = off Line Warp = on Forcing Insert = line (or both) Tab = field
A-2 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Operating Mode = echo Turnaround Character = CR Enter = return Return = new line New Line = CR Send = page Insert Character = space On your IBM 3151 terminal, press the Ctrl+Setup keys to display the Setup Menu and follow the on-screen instructions to check the settings. If you need to make changes, follow the on-screen instructions for making changes. __ 5. Turn the system unit power on. Press F5 after you see the keyboard icon on the screen. The system will begin booting from the installation media.
__ 6. After about five minutes, a screen appears on all directly attached terminal or display devices asking you to define the system console. Notice that you are given these instructions in many different languages. Follow the instructions as they appear on the device you wish to use as the system console.
__ 7. Next, a screen is displayed that prompts you to select an installation language. Follow the directions on this screen to select the language in which the installation instructions will be displayed.
__ 8. The Welcome to Base Operating System - Installation and Maintenance menu will be displayed. Select item 2, Change/Show Installation Settings and Install. Welcome to Base Operating System Installation and Maintenance
Type the number of your choice and press Enter. Choice is indicated by >>>.
1 Start Install now with Default Setting >>> 2 Change/Show Installation Settings and Install 3 Start Maintenance Mode for System Recovery 88 Help ? 99 Previous Menu >>> Choice [1]: 2
A-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 9. The Installation and Settings menu is displayed. Select item 1, System Settings. Installation and Settings Either type 0 and press Enter to install with current settings or type the number of the setting you want to change and press Enter. 1 System Settings Method of Installation............. Preservation Disk Where You Want to Install......hdisk0 2 Primary Language Environment Settings (AFTER Install) Cultural Convention.......... C(POSIX) Language..................... C(POSIX) Keyboard..................... C(POSIX) Keyboard Type ............... Default 3 More Options (Desktop, Security, Kernel, Software, ...)
0 Install AIX with the current settings listed above. 88 Help ? 99 Previous Menu >>> Choice [0]: 1 __ 10. The Change Method of Installation menu is displayed. You are now given the opportunity to change the method of installation. Select item 1, New and Complete Overwrite. Change Method of Installation Type the number of the installation method and press Enter. 1 New and Complete Overwrite Overwrites EVERYTHING on the disk selected for installation. Warning: Only use this method if the disk is totally empty or if there is nothing on the disk you want to preserve. 2 Preservation Install Preserves SOME of the existing data on the disk selected for installation. Warning: This method overwrites the usr (/usr), variable (/var), temporary (/tmp), and root (/) file systems. Other product
A-4 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
(application) files and configuration data will be destroyed. 3 Migration Install Upgrades the Base Operating System to current release. Other product (application) files and configuration data are saved. 88 Help ? 99 Previous Menu >>> Choice [2]: 1 __ 11. The Change Disks Where You Want To Install menu is displayed. You are now given the opportunity to select the disk drives where you want the system to be loaded. Select the disk drive with the greatest amount of space on it, minimum of 2.2 GB, as long as it is marked bootable. If not, select both drives or if there isn't a single drive with greater than 2.2 GB on it, select both drives. Change Disks Where You Want to Install Type one or more numbers for the disk(s) to be used for installation and press Enter. To cancel a choice, type the corresponding number and press Enter. At least one bootable disk must be selected. The current choice is indicated by >>>. Name >>> 1 hdisk0 2 hdisk1 Location Code 04-C0-00-4,0 04-C0-00-5,0 Size (MB) 2063 2063 VG Status rootvg rootvg Bootable yes yes
>>> 0 Continue with choices indicated above 55 66 77 88 99 More Disk Options Disks not known to Base Operating System Installation Display More Disk Information Help ? Previous Menu
__ 12. You are taken back to the Installation and Settings menu. Select item 2, Primary Language Environment Settings (AFTER install).
Copyright IBM Corp. 1997, 2008 Appendix A. Optional exercise: AIX 5L V5.3 installation A-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Installation and Settings Either type 0 and press Enter to install with current settings or type the number of the setting you want to change and press Enter. 1 System Settings Method of Installation............. Preservation Disk Where You Want to Install......hdisk0 2 Primary Language Environment Settings (AFTER Install) Cultural Convention.......... C(POSIX) Language..................... C(POSIX) Keyboard..................... C(POSIX) Keyboard Type ............... Default 3 More Options (Desktop, Security, Kernel, Software, ...)
0 Install AIX with the current settings listed above. 88 Help ? 99 Previous Menu >>> Choice [0]: 2 __ 13. Change the language environment and code set for the language you wish to have after installation. The menu that is displayed looks like this: Type the number for the Cultural Convention (such as date, time, and money), Language and Keyboard for this system and press Enter, or type 106 and press Enter to create your own combination. Cultural Convention Language Keyboard
>> 1. C (POSIX) C (POSIX) C (POSIX) 2. Albanian English (United States) Albanian 3. Arabic Arabic (Bahrain) Arabic (Bahrain) ... several screens later ... 106. Create your own combination of Cultural Convention, Language and Keyboards. 88 Help ? 99 Previous menu Choice [1]:
A-6
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 14. You should now be back at the Installation and Settings menu. If you are happy with your selections, select 0 to continue with the new and complete overwrite installation. Installation and Settings Either type 0 and press Enter to install with current settings or type the number of the setting you want to change and press Enter. 1 System Settings Method of Installation............. New and Complete Overwrite Disk Where You Want to Install......hdisk0 2 Primary Language Environment Settings (AFTER Install) Cultural Convention.......... English (United States) Language..................... English (United States) Keyboard..................... English (United States) Keyboard Type ............... Default 3 More Options (Desktop, Security, Kernel, Software, ...)
0 Install AIX with the current settings listed above. 88 Help ? 99 Previous Menu >>> Choice [0]: 0 __ 15. Once the installation begins, a status screen appears. Note the progress indicator at the bottom of the screen. The installation process will take approximately one hour.
A-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
A-8
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
In this exercise, you are adding a serial device, changing its characteristics both on the RS/6000 and on the device itself, and then delete the device. The serial device you use is an ibm3151 ASCII terminal. The setup screen information may differ depending on whether or not you are using a cartridge to define your language environment. The example information provided relative to setup screens is based on the ibm3151 terminal without a cartridge. If you have another type of ASCII terminal, your instructor should provide directions on how it should be setup. You would use many of the same steps for configuring a modem attached to a serial port. Your terminal should already be physically cabled to the first built-in serial port on your system. For this exercise you will need to work as a team with the other student who is working on your system.
B-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom.
B-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 4. Return to SMIT and complete the process of removing the ASCII terminal. After you complete this step, be sure to do the next section, Part 2 - Add a terminal because you will need this terminal for later exercises.
B-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
B-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 8. Log in to the ASCII terminal as root. Try to go into SMIT. What kind of message do you get? Message: _____________________________________________________________ _____________________________________________________________
__ 9. If SMIT did not run change the terminal type so you can use SMIT and then try starting SMIT again.
B-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 11. Once this change is complete on the system, can you work with the terminal? __ Why not? _________________________________________________________ Change the settings on your terminal so it can communicate with your system.
B-6
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
__ 13. DO NOT DO THIS FROM AN LFT. As root, from the ASCII terminal, run the shell script /home/workshop/lab5.1. This shell script causes display problems with the ibm3151 terminal. Determine what the problem symptoms are, such as a hung terminal (doesn't show any character when you try to type), or strange characters displayed when you try to type something. As part of troubleshooting, check the port attributes, like the baud rate, and whether or not there are any processes running associated with the terminal. Try to fix the problem using the suggestions in the student notebook before taking the last resort of turning the terminal off then on.
End of exercise
B-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
B-8
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
Introduction
This exercise reinforces the material covered in the System V Print Subsystem appendix. It consists of questions and hands-on activities. There are two levels of information: Exercise Instructions Exercise Instructions with Hints Use any level that facilitates your learning process. Use all available resources: team members, documentation, your instructor.
Requirements
System running AIX 5L with connected local printer.
C-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Exercise Instructions
Preface
Two versions of these instructions are available; one with hints and one without. You can use either version to complete this exercise. Also, please dont hesitate to ask the instructor if you have questions. All exercises of this chapter depend on the availability of specific equipment in your classroom. If your lab environment uses remote pSeries/AIX platforms, the instructor will provide you with the addressing (IP address or hostname) and instructions for accessing the remote machine. For example, you might be using telnet, an X-windows server, or a VNC client. Whatever tool you are using, at various points in the labs you may need to re-launch your remote access tool to obtain a new login prompt.
If your classroom does not have printers, you can perform most of these exercises by printing to a file. Notes are provided in the instructions for this option.
__ 4. Switch to the System V print subsystem. What command did you use? _____________________
C-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
How the printer is connected: - (serial or parallel) _____________________, - which adapter _____________________ and - which port it is connected to _____________________. (If you will be printing to a file, you do not need this information.) If the printer is connect via a serial connection, details of the connection (baud rate, parity, bits per character, stop bits, and flow control): ____________________________________________________________ _____________________________________________________________ (If you will be printing to a file, you do not need this information.) Printer type _____________________ (If you will be printing to a file, use printer type unknown.) Printer content type _____________________ (If you will be printing to a file, use content type simple.) Interface script _____________________ (If you will be printing to a file, use the standard interface script.)
__ 8. Log in as root.
__ 9. Configure the printer device: (If you are printing to a file, skip the steps in the table and simply create the target file using the touch command, for example: # touch /tmp/dummy_printer)
Step 1 2 3 4 5
Action Use SMIT fastpath smit pdp to open the Printer/Plotter Devices menu. Move the cursor to select Add a Printer/Plotter; press <Enter>. Scroll through the device list and select the printer device. Select the type of interface (connection). Select the parent adapter.
Appendix C. Optional exercise: The System V print subsystem C-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
Step 6 7
Action For parallel connected printers, enter <p> in the PORT number field and press <Enter>. For serial connected printers, enter the port number in the PORT number field, fill in the baud rate and so forth and press <Enter>.
__ 10. List the newly created printer device. What command did you use? ______________________ __ 11. Use lpadmin to define a new System V printer using the printer device you just created. Use the information you gathered in steps 1 and 2 to configure the printer. What command did you use? ___________________________________ __ 12. Use lpstat to verify queueing status. What command did you use? _____________________ Is the printer accepting requests? _____________________ What reason is given? _____________________ __ 13. Use lpstat to verify printing status. What command did you use? _____________________ Is the printer enabled? _____________________ __ 14. Use lpstat to get a long listing of your printers characteristics. What command did you use? ________________
__ 15. Using the output from the previous step, answer these questions: What users are allowed to access this printer? ____________________ What action will be taken On fault? (This is the default Alert action.) _________
__ 16. View the printer configuration file. What command did you use? ___________________________________________
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty
C-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 21. Resubmit your print job. Note the request-ID here: ________ __ 22. Use lpstat to list outstanding job status. What command did you use? ____________________
__ 24. Examine the request file (X-0) and answer these questions: What file will be printed? ____________________ What is the files size? ______________
__ 25. Submit another request to print /etc/motd, but this time, request that the print service copy the file to the spool directory. What command did you use? _____________
__ 27. Examine the two new files. Which file is the request file? _____________________ Which file is the copy of the file to be printed? _______________
__ 28. Enable printing on your printer. What command did you use? ___________________
C-6 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Exercises
EXempty __ 29. Your print jobs should begin printing as soon as you enabled the printer. Use lpstat -p while the printer is printing to show what job is being printed. (If your jobs do not print, ask the instructor for help.)
__ 30. Examine the request log. What command did you use? _______________ Look for request IDs in the file. What character at the beginning of the line indicates a new entry (new print request) in this file? _____________________________________________ __ 31. Disable printing on your printer using the disable command. What command did you use? __________________ __ 32. Disable queueing using the reject command. What command did you use? ___________________ __ 33. Use lpadmin to remove a System V printer. What command did you use? ________________
C-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
__ 36. One team configures their system as a print server machine (see Section 3.3 in the Redbook). The other team configures their system to use the other machines remote printer (see Section 3.1 in the Redbook).
__ 37. Test your configuration by attempting to print from the client machine to the printer on the server machine.
__ 38. Make notes below of the steps you took and your results.
End of exercise
C-8
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
backpg
Back page