Académique Documents
Professionnel Documents
Culture Documents
cover
Front cover
Student Exercises
ERC 7.1
Student Exercises
Trademarks
IBM® and the IBM logo are registered trademarks of International Business Machines
Corporation.
The following are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide:
AIX® Current® GPFS™
Notes® Power® PowerPC®
PowerPC®
PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated
in the United States, and/or other countries.
Intel and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other product and service names might be trademarks of IBM or other companies.
TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
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® and the IBM logo are registered trademarks of International Business Machines
Corporation.
The following are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide:
AIX® Current® GPFS™
Notes® Power® PowerPC®
PowerPC®
PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated
in the United States, and/or other countries.
Intel and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other product and service names might be trademarks of IBM or other companies.
viii Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4.0.3
Student Exercises
Introduction
You will install Linux on your classroom workstation or on a remote
server in this exercise. This installation will then be used for all
following exercises, therefore please follow the instructions as given
(to assure the proper setup).
Verify with your instructor which Linux distribution should be loaded.
Requirements
• Boot media to invoke a network install, or a network server setup to
provide a PXEboot network installation image
• The host name or IP address of the install server as well as the
NFS port path (your instructor will provide you with this)
© Copyright IBM Corp. 2002, 2011 Exercise 1. Advanced Linux Installation 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Important
1-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty • If you are installing SLES11 from SUSE media, perform steps 55 through 75.
Part 1: Select your correct machine type and access your machine
If you are installing on a physical machine:
__ 1. Walk over to the PC that is assigned to you. Locate the Power-On button and press
it.
__ 2. As soon as the BIOS menu appears, press the appropriate key (typically F2, F12, or
Esc) to get the boot list menu.
__ 3. Continue with Part 2, below.
If you are installing on a virtual machine located at the IBM Training Datacenter in
Montpellier, France:
__ 4. Your instructor will provide you with the following information:
• The Citrix user ID and password
• The Remote Desktop user ID and password (normally: student / passw0rd)
__ 5. Open your Web browser and go to the following URL:
https://elabgateway.moppssc.com
__ 6. Depending on whether the Citrix client has been installed before on your PC, Citrix
will now install or upgrade the Citrix plug-in. If this is the case, work through the
menus so that the plug-in is installed.
__ 7. Log in with the Citrix user ID and password that you received from the instructor.
__ 8. You will now see a menu with an icon Remote Desktop Connection. Click this
icon. Log in with the Remote Desktop user name/password that your instructor
provided. You will now see the desktop of a virtual PC, on which VMWare Player or
VMWare Workstation is installed.
Note
If you want to minimize or close this virtual desktop and return to your local PC’s desktop,
use the _ or X icons that are located in the yellow bar at the top of the screen.
© Copyright IBM Corp. 2002, 2011 Exercise 1. Advanced Linux Installation 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Note
VMWare Player/Workstation will "grab" your mouse and keyboard, even when the virtual
PC is not using a graphical screen. In order to "release" your mouse and keyboard, so that
you can use them outside the VMWare application, press Ctrl+Alt.
If this is the first time that this Virtual Machine is started on this machine, you might see a
pop-up window This virtual machine might have been moved or copied. In this pop-up
menu select I copied it and click OK.
1-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
© Copyright IBM Corp. 2002, 2011 Exercise 1. Advanced Linux Installation 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
1-6 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 50. The installer will now retrieve installation information. This will take a minute or so.
__ 51. On the Software screen, select the Basic Server profile, select the Customize
Now radio button, then click Next. On the next screen, add the following selections:
Servers:
Print Server
System Administration Tools
Desktops:
General Purpose Desktop
KDE Desktop
X Window System
Development:
Development Tools
__ 52. The installation process now installs your selections. This might take anywhere from
one to 15 minutes, depending on the number of packages to install, the network
bandwidth available and the speed of the computer.
While installing, you can see what is going on in detail by switching to the third
virtual terminal with Ctrl+Alt+F3. Switch back with Alt+F7. Also, take a look at other
virtual screens (1 through 6).
__ 53. After the installation finishes, the system will reboot. On first boot, a Welcome
screen will appear, with additional configuration tasks. Answer the questions in the
following manner:
Accept the license agreement.
Do not register your system with RHN.
Create a user account (use your name).
Set the correct date and time.
Do not enable kdump.
__ 54. Your Red Hat Enterprise Linux installation is now finished. Continue with Section 2
to execute a Kickstart installation.
If you are installing SLES11 from SUSE network boot media:
__ 55. At the boot: prompt, press Enter.
__ 56. Since the boot media that you used does not contain the SLES11 repository of
installation packages, you will get a warning Activating manual setup program.
Click OK.
__ 57. Choose the language for the installation process and click Next.
__ 58. Choose the correct keyboard map and click OK.
© Copyright IBM Corp. 2002, 2011 Exercise 1. Advanced Linux Installation 1-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
1-8 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Note
The installation will proceed at this point. Monitor your screen for any messages that
require your assistance. You should see on the right side of your screen a list of tasks to be
completed. The task currently operating is noted with an arrow.
__ 77. SLES automatically reboots during the installation. This is normal and the
installation process will continue automatically. If any pop-up windows appear,
choose Continue.
__ 78. Enter the password for the root user. For convenience in class, use the password
ibmlnx. Click Next.
__ 79. Select a suitable host name, then click Next.
__ 80. Unless your instructor indicates otherwise, accept all defaults in the Network
configuration. Click Next.
__ 81. Perform the Internet connection test. Click Next.
__ 82. In the Novell Customer Center Configuration screen, select Configure Later. Click
Next.
__ 83. In the Installation Overview screen, accept all defaults. Click Next.
__ 84. Select Local as the User Authentication Method, then click Next.
__ 85. Add a user account for yourself, then click Next.
__ 86. When the Release Notes are displayed, click Next.
__ 87. The system will now detect all your hardware and configure it. This might take
several minutes, during which your screen might flicker and/or go blank for an
extended period of time. Be patient. Once done, accept the defaults.
__ 88. Click Finish to complete the installation.
© Copyright IBM Corp. 2002, 2011 Exercise 1. Advanced Linux Installation 1-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 89. Your SLES11 installation is now finished. Continue with Section 2 for an AutoYaST
installation.
Note
1-10 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 95. Start the AutoYaST configuration tool and import this file.
__ 96. Take a look at the AutoYaST configuration. Do you see the settings you made during
the installation?
__ 97. Exit AutoYaST.
__ 98. Upload the AutoYaST file under your own name to the instructor server, in the
directory /export/files. This directory is NFS-exported so that you can access it
during the subsequent install.
__ 99. Reboot your system, get into the BIOS boot menu and select your boot medium just
like you did before. At the boot: prompt, start an AutoYaST installation. Notify the
instructor once your installation has started successfully.
End of exercise
© Copyright IBM Corp. 2002, 2011 Exercise 1. Advanced Linux Installation 1-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
1-12 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
Note
Note: If the man -k or apropos commands do not work, then you need to run the
makewhatis command as user root. Normally, the makewhatis command is automatically
executed nightly, but because your system is freshly installed, this might not yet have
occurred.
2-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 13. info has a nice built-in tutorial. If you have spare time during this course, look at the
tutorial to see some of the advanced features of info.
End of exercise
2-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will modify the run level configuration of the
system.
Requirements
• This workbook
• A workstation with Fedora, RHEL, or SLES installed
© Copyright IBM Corp. 2002, 2011 Exercise 3. Startup and shutdown 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
• All exercises of this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
3-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
© Copyright IBM Corp. 2002, 2011 Exercise 3. Startup and shutdown 3-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
End of exercise
3-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will utilize various system administration tools
found on the distribution installed on your system.
Requirements
• This workbook
• A workstation with RHEL or SLES installed
© Copyright IBM Corp. 2002, 2011 Exercise 4. System administration tools 4-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
4-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 10. Navigate to the System configuration module and select the System Services
(Runlevel) sub-menu. Click the Expert Mode radio button in the top portion of the
GUI menu. In what run-level is the acpid service enabled? __________
__ 11. Enable the apache2 service to be enabled in run-level 5 only:
# chkconfig apache2 off
# chkconfig apache2 --level 5 on
__ 12. In a separate window, verify the apache2 service was enabled by using the
chkconfig command:
# chkconfig --list apache2
__ 13. Search the yast2 interface and find the configuration module that has the sub-menu
View System Log. Which configuration module is it? __________
__ 14. Exit the yast2 interface.
© Copyright IBM Corp. 2002, 2011 Exercise 4. System administration tools 4-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
End of exercise
4-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Preface
• This optional exercise deals with the installation of Webmin from an installation
source.
End of exercise
© Copyright IBM Corp. 2002, 2011 Exercise 4. System administration tools 4-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
4-6 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will be performing various package management
activities.
Requirements
• This workbook
• A workstation with Fedora, RHEL, or SLES installed
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
5-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
%description
This program prints the text "Hello, World!" on your screen. This is an excellent
way to start your day - some people even consider it better than getting a random
fortune cookie every morning!
%prep
%setup
%build
make
%install
make install DESTDIR=${RPM_BUILD_ROOT}
%files
%doc README
/usr/bin/hello
5-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 14. Start the RPM prep stage and watch the results.
Note: The directory /var/tmp/hello-1.2 has not been created yet.
__ 15. Start the RPM build stage and watch the results.
Note: The directory /var/tmp/hello-1.2 has not been created yet.
__ 16. Start the RPM install stage and watch the results.
__ 17. Create the binary RPM and watch the results.
__ 18. Create the source RPM and watch the results.
__ 19. Test first to see if there is a hello program installed. Since there is not, install your
brand new hello RPM file using the rpm command. Test it, uninstall it, and then test
it again.
End of exercise
5-6 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will be performing various activities using the X
Window system.
Requirements
• This workbook
• A workstation with RHEL or SLES installed
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
6-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty Note: Some of these x-applications might not exist on your distribution.
__ 10. In order to gain control of the situation, you need a program to manage your X
application windows, so let's start an X window manager. Go to VT-2 and start the
TWM X Window Manager. Change to VT-7, and now you can move and resize your
application windows.
__ 11. This is helpful but does not look like our normal X Windows environment. You can
now start the startkde or gnome-session program of your choice and watch how
the X Window environment changes.
__ 12. Now you have a full Windows environment. When you are done, you can shut down
each application that you started, but you should do that in reverse order (otherwise
known as backing out gracefully) or you can kill the X Server which will kill all
applications that are dependent upon it. Let's press Ctrl-Alt-Backspace. This
should take you back to VT-1 automatically. When you get there, check your
runlevel.
__ 13. Finally, let's get back to runlevel 5. This will force the session manager to ask you to
log back in.
__ 22. Now try to open another xterm from your partner's system, but this time use xauth
authentication.
Note: This only works if your system's host name has been set properly and can be
resolved through DNS.
End of exercise
6-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
6-6 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will create and modify Linux users and groups.
During this lab exercise, you will use the Linux distribution that you
have loaded onto your lab system. Please disregard any exercise
steps that reference a different Linux distribution.
Requirements
• This workbook
• A workstation with Fedora, RHEL, or SLES installed
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
7-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 15. Which users are specified in the last field of the /etc/group file?
End of exercise
7-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will create and modify Linux storage devices, both
physical and logical. During this lab exercise, you will use the Linux
distribution that you have loaded onto your lab system. Please
disregard any exercise steps that reference a different Linux
distribution.
Requirements
• This workbook
• A workstation with Fedora, RHEL, or SLES installed
© Copyright IBM Corp. 2002, 2011 Exercise 8. Block devices, RAID, and LVM 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
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
Note
In this exercise you are going to create and use various block devices. Block devices as
such are not really useful, though, until you create a file system in there. For this, you are
going to use the mke2fs command to create a file system, and the mount command to
mount the file systems. These commands are covered in-depth in the next unit.
8-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 10. Format the first of the four partitions with the mke2fs command. Create a
mountpoint /mnt/partition and mount this partition on this mountpoint.
__ 11. Run the df command to see how much space is available on these partitions.
__ 12. Copy some files onto these partitions and verify that they are indeed there.
__ 13. Reboot your system and then try to mount the partition again. Does this work?
__ 14. Unmount the partition you just mounted.
© Copyright IBM Corp. 2002, 2011 Exercise 8. Block devices, RAID, and LVM 8-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
RAID array. Set one or two disks in the array to faulty and watch the array recover
itself using the spare disk. Then, unmount the partition and stop the RAID array.
End of exercise
8-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will create and modify Linux file systems. During
this lab exercise, you will use the Linux distribution that you have
loaded onto your lab system. Please disregard any exercise steps that
reference a different Linux distribution.
Requirements
• This workbook
• A workstation with Fedora, RHEL, or SLES installed
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
9-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
End of exercise
9-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise you will be performing various kernel configuration
activities.
Requirements
• This workbook
• A workstation with RHEL or SLES installed
© Copyright IBM Corp. 2002, 2011 Exercise 10. Kernel configuration 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
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
End of exercise
10-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will be performing various memory management
activities.
Requirements
• This workbook
• A workstation with a supported distribution of Linux installed
© Copyright IBM Corp. 2002, 2011 Exercise 11. Memory management 11-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
11-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 6. top by default does not show the amount of swap space used by each processes.
To show this amount too, call up the Field Order screen with the f command, and
enable the swap space display.
__ 7. To sort processes in a different order use the M, P, or T command.
__ 8. Leave top running in this virtual console, switch to the next available one, likely
number 2, and log in as root.
© Copyright IBM Corp. 2002, 2011 Exercise 11. Memory management 11-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
11-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 23. First, find a file system where you have room for a large swapfile (at least 64MB
free). Locate a suitable directory on this file system.
__ 24. Create the large file to be used as swapfile.
__ 25. Convert this file into a swapfile.
__ 26. Activate it.
__ 27. Go to your top window and check whether the swap space has increased. Also,
view the /proc/swaps file. What do you think is the meaning of the Priority field,
and why is this different from the swap partition? Now try the usemem command
that failed last time.
__ 28. Add the swap file to your /etc/fstab file so that it is activated next time you
reboot.
__ 29. Reboot your system to make sure that you are working with the correct amount of
memory again.
End of exercise
© Copyright IBM Corp. 2002, 2011 Exercise 11. Memory management 11-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
11-6 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise you will be performing various Xen configuration and
management activities.
Requirements
• This workbook
• A workstation with RHEL6 or SLES11 installed.
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
Section 1: Create file system to store Xen disk images (RHE6, SLES11)
A file system needs to be created to hold the file based disk images for the Xen guests. The
following steps will create a 5Gb partition which will be formatted as ext3 and mounted on
/var/lib/xen/images. This is the default location for all guest disk images. The steps
assume the partition created is /dev/sda13.
# fdisk /dev/sda
Command: n
First Cylinder: <Enter> Last Cylinder: +5000M Command: w
# partprobe
# mke2fs -j /dev/sda13
# mount /dev/sda13 /var/lib/xen/images
# vi /etc/fstab
Add the following line to the end of the file:
/dev/sda13 /var/lib/xen/images ext3 defaults 1 2
Overview of tasks
This exercises consists of three parts. First, you will be installing the Xen packages and
configuring domain 0. Second, you will be installing a Xen guest domain using YaST.
Finally, you will be modifying the memory allocation of your Xen guest.
The instructions for installing the packages and creating the Xen guest domain are different
for SLES11 and RHEL6. Make sure you follow the exercises that correspond to your
distribution. The memory allocation exercise is the same on all three distributions.
12-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Note
These instructions are for installing the Xen packages in SLES11. If you are using RHEL6,
skip to the section entitled Installing Xen (RHEL6).
__ 16. On the Summary Screen, click OK to continue. You should see a dialog box pop-up
stating that the virtual machine has been created and installation has started. When
it disappears, you will return to the Virtualization Manager window. You should now
see a new virtual machine called sles11 running.
__ 17. Right-click the sles11 virtual machine, and select Open.
__ 18. Follow the normal installation prompts. Leave everything at their defaults, and start
the installation. The installation of the guest should take approximately 10-15
minutes. As with a normal installation, after the packages are installed, the virtual
machine will reboot. The virtual console window needs to be reopened when this
occurs.
Continue following the configuration steps of the installation program. Use the
options in the Installing Linux exercise as a guideline.
__ 19. Skip to the section entitled Changing memory allocation of a guest machine.
Note
The following instructions are for installing the Xen packages in RHEL6. If you are using
SLES11, skip to the section entitled Installing Xen (SLES11).
12-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 27. Click Apply, then Continue. If you see the Dependencies Added dialog box, select
Continue to install all dependent software. You might also see an Import Key dialog
box. If so, select Import Key.
__ 28. When the installation is complete, exit the application.
__ 29. Reboot the machine. Upon reboot, press a key to pause the GRUB bootloader, and
select the newly installed kernel. It is the one with the word xen in the version
information.
During boot, you will notice more informational messages displayed; they are all
prefixed with (XEN) and are configuring the paravirtualized kernel.
__ 30. At the login prompt, log in as root.
__ 31. Open a terminal window, and type xm list. You should see an entry for the Xen
Domain-0, which is the Xen hypervisor. Under the State column, you should see an
r; this indicates that the domain is in the running state.
__ 40. In the Connect to host network dialog box, leave all settings as their defaults, and
click Forward to continue.
__ 41. In the Allocate memory and CPU dialog box, verify the following settings:
VM Max Memory (MB): 512
VM Startup Memory (MB): 512
VCPUs: 1
__ 42. Click Forward to continue.
__ 43. At the Ready to begin installation screen, take a moment to verify your settings.
When ready, click Finish to continue.
The virtual machine will now be created, and a Virtual machine Console will start up.
In the console, you will see the Linux kernel messages, as well as the installation
program start.
__ 44. In the Virtual Machine console, select the correct install language and keyboard.
__ 45. Leave all other installation options (Partitioning, TCP/IP, Package Selection) at their
default values. For the root password, use ibmlnx.
The installation of the guest machine will take 10-15 minutes. When the installation
is complete, select Next to reboot the guest. It will shut down, and the console will
give you a message Guest Not Running. Click the Run button on the menu bar to
restart the guest.
12-6 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 55. Switch back to the Virtual Console and look at the output of the top command. Did
the allocated memory increase?
End of exercise
12-8 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
Introduction
In this exercise, you will be performing various activities related to
troubleshooting.
Requirements
• This workbook
• A workstation with RHEL or SLES installed
Exercise instructions
Preface
• All exercises in this chapter depend on the availability of specific equipment in
your classroom.
• The hints provided for locating documentation on particular web pages were
correct when this course was written. By nature, web pages tend to change over
time, so ask your instructor if you have trouble navigating the websites.
• A computer system with a connection to the World Wide Web and a web browser
is recommended but not required.
Section 2: Problem #1
__ 5. Log in to the system as root.
__ 6. Create the problem by issuing the following command: /root/prob/p1create. Note
the problem:
__ 7. Return the system to normal operation. How was the problem resolved?
__ 8. Have the instructor validate that the problem has been resolved.
Section 3: Problem #2
__ 9. Log in to the system as root.
__ 10. Create the problem by issuing the following command: /root/prob/p2create. Note
the problem:
__ 11. Return the system to normal operation. How was the problem resolved?
__ 12. Have the instructor validate that the problem has been resolved.
Section 4: Problem #3
__ 13. Log in to the system as root.
__ 14. Create the problem by issuing the following command: /root/prob/p3create. Note
the problem:
__ 15. Return the system to normal operation. How was the problem resolved?
13-2 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Exercises
EXempty __ 16. Have the instructor validate that the problem has been resolved.
Section 5: Problem #4
__ 17. Log in to the system as root.
__ 18. Create the problem by issuing the following command: /root/prob/p4create. Note
the problem:
__ 19. Return the system to normal operation. How was the problem resolved?
__ 20. 20. Have the instructor validate that the problem has been resolved.
Section 6: Problem #5
__ 21. Log in to the system as root.
__ 22. Create the problem by issuing the following command: /root/prob/p5create. Note
the problem:
__ 23. Return the system to normal operation. How was the problem resolved?
__ 24. Have the instructor validate that the problem has been resolved.
End of exercise
Exercise review/wrapup
This exercise introduced a number of problems onto the students’ system that required the
students to troubleshoot and resolve the issues.
13-4 Linux Jumpstart for UNIX © Copyright IBM Corp. 2002, 2011
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4.0.3
backpg
Back page