• No results found

3116_workbook.pdf

N/A
N/A
Protected

Academic year: 2021

Share "3116_workbook.pdf"

Copied!
108
0
0

Loading.... (view fulltext now)

Full text

(1)SUSE Linux Enterprise Server 11 SP2 Administration Workbook 3116. Novell Training Services. www.novell.com. A U T H O R I Z E D C O U R S E WA R E. Part # 100-005293-001-REV A Version 1 Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(2) Legal Notices Novell, Inc., makes no representations or warranties with respect to the contents or use of this documentation, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc., reserves the right to revise this publication and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. Further, Novell, Inc., makes no representations or warranties with respect to any software, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc., reserves the right to make changes to any and all parts of Novell software, at any time, without any obligation to notify any person or entity of such changes. Any products or technical information provided under this Agreement may be subject to U.S. export controls and the trade laws of other countries. You agree to comply with all export control regulations and to obtain any required licenses or classification to export, re-export or import deliverables. You agree not to export or re-export to entities on the current U.S. export exclusion lists or to any embargoed or terrorist countries as specified in the U.S. export laws. You agree to not use deliverables for prohibited nuclear, missile, or chemical biological weaponry end uses. See the Novell International Trade Services Web page (http:/ /www.novell.com/info/exports/) for more information on exporting Novell software. Novell assumes no responsibility for your failure to obtain any necessary export approvals. Copyright © 2008 Novell, Inc. All rights reserved. No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express written consent of the publisher.. Novell, Inc., has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed on the Novell Legal Patents Web page (http://www.novell.com/ company/legal/patents/) and one or more additional patents or pending patent applications in the U.S. and in other countries. Novell, Inc. 1800 South Novell Place Provo, UT 84606 U.S.A. www.novell.com Online Documentation: To access the latest online documentation for this and other Novell products, see the Novell Documentation Web page (http:// www.novell.com/documentation).. Novell Trademarks For Novell trademarks, see the Novell Trademark and Service Mark list (http:// www.novell.com/company/legal/trademarks/tmlist.html).. Third-Party Materials All third-party trademarks are the property of their respective owners.. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(3) Contents SUSELni uxEnterpsi eServer1 SP2Adminstratoi n/Workbo k1. SECTION 1 Exercise 1-1. SECTION 2 Exercise 2-1 Exercise 2-2. SECTION 3 Exercise 3-1. SECTION 4 Exercise 4-1. Exercise 4-2. Exercise 4-3. Exercise 4-4. Version 1. Introduction. 7. Check the Media in Your Student Kit. 7. Check Hardware and Software Requirements. 8. Course Scenario. 8. Set Up Your Practice Environment. 9. Set Up da-host. 10. Set Up da1. 15. Set Up da2. 15. Review the Exercise Conventions. 16. Install SUSE Linux Enterprise Server 11 SP2. 17. Install SUSE Linux Enterprise Server 11 SP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18. Manage System Initialization Manage the Boot Loader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage Runlevels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: View and Change the Current Runlevel . . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Activate the atd Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part III: Set a Runlevel at Boot Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part IV: Enable rsyncd with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Administer Linux Processes and Services. 23 24 27 27 28 29 30. 31. Manage Linux Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Part I: Move Processes to the Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Part II: Modify Process Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34. Administer the Linux File System Configure Partitions on your Hard Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Create Partitions and File Systems with YaST . . . . . . . . . . . . . . . . . . . . . . Part II: Partition Manually with fdisk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part III: Manage File Systems from the Command Line . . . . . . . . . . . . . . . . . . . . Manage File Systems from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Run e2fsck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Customize the File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Create LVM Physical Volumes, a Volume Group, and Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Resize an LVM Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set Up and Configure Disk Quotas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 37 38 38 40 42 44 44 44 48 48 50 51. 3. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(4) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. SECTION 5 Exercise 5-1. SECTION 6 Exercise 6-1 Exercise 6-2 Exercise 6-3. SECTION 7 Exercise 7-1 Exercise 7-2 Exercise 7-3. Exercise 7-4. SECTION 8 Exercise 8-1 Exercise 8-2. SECTION 9 Exercise 9-1. SECTION 10 Exercise 10-1 Exercise 10-2. Exercise 10-3 Exercise 10-4 Exercise 10-5. Exercise 10-6. 4. Configure the Network Manually. 53. Configure the Network Connection Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Note the Current Network Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Delete the Current Network Setup with YaST . . . . . . . . . . . . . . . . . . . . . . Part III: Configure the Network Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part IV: Save the Network Connection to an Interface Configuration File . . . . . .. Manage Hardware. 54 54 54 55 55. 57. Manage Linux Kernel Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Obtain Hardware Configuration Information in YaST . . . . . . . . . . . . . . . . . . . . . . 59 Modify udev Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60. Configure Remote Access. 63. Practice Using OpenSSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Perform Public Key Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use Remote Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Remotely Access a Text-Based Version of YaST . . . . . . . . . . . . . . . . . . . . Part II: Remotely Access the GUI Version of YaST . . . . . . . . . . . . . . . . . . . . . . . Part III: Configure Remote Administration with YaST . . . . . . . . . . . . . . . . . . . . . Part IV: Access Your da1 Server Remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use Nomad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Monitor SUSE Linux Enterprise Server 11. 64 66 68 68 68 69 69 71. 73. Gather Information on your SLES 11 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage System Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Modify the syslog-ng Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Configure logrotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Administer Linux Processes and Services. 74 76 76 78. 81. Schedule Jobs with cron and at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Part I: Schedule Jobs with at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Part II: Schedule Jobs with cron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83. Manage Backup and Recovery. 85. Back Up System Files with YaST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Backup Files with tar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Create a Full Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Create an Incremental Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Work with Snapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Drive Images with dd (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Back Up a Home Directory with rsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part I: Perform a Local Backup with rsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part II: Perform a Remote Backup with rsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure a cron Job for Data Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 86 87 87 87 89 91 93 93 93 95. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(5) SECTION 11 Exercise 11-1 Exercise 11-2 Exercise 11-3 Exercise 11-4. Exercise 11-5. Version 1. Administer User Access and Security. 97. Configure PAM Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Configure sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Configure the Password Security Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Use ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Part I: Configure the ACL of a Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Part II: Configure a Default ACL for a Directory . . . . . . . . . . . . . . . . . . . . . . . . 105 Part III: Delete an ACL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Configure SuSEfirewall2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 5. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(6) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 6. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(7) Introduction. Introduction. This workbook is designed to help you practice the skills associated with SUSE Linux Enterprise Server 11 Administration (Course 3116) objectives. These skills, along with those taught in SUSE Linux Enterprise Server 11 Fundamentals (Course 3115), prepare you to take the Novell Certified Linux Administrator 11 (Novell CLA 11) certification test. Before starting the exercises in this workbook, you need do the following: . “Check the Media in Your Student Kit” on page 7. . “Check Hardware and Software Requirements” on page 8. . “Course Scenario” on page 8. . “Set Up Your Practice Environment” on page 9. . “Review the Exercise Conventions” on page 16. Check the Media in Your Student Kit Your kit for Course 3116 contains the following media: . 3116 Course Manual. Printed course manual that contains instructional and reference content.. . 3116 Workbook. Printed workbook that contains step-by-step instructions for setting up and completing the 3116 course exercises.. . Course 3116– SUSE Linux Enterprise Server 11 SP2 Administration Course DVD. This DVD contains the course manual in PDF format, this workbook in PDF format, and a readme file. In addition, there are several directories with the following content:  . . Version 1. exercises. This directory contains files used for course exercises. setup. This directory contains files you need to set up your practice environment. VMs. This directory contains Virtual Machines used in the course.. . SUSE Linux Enterprise Server 11 SP2 Product DVD. . SUSE Linux Enterprise Desktop 11 SP2 Product DVD. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 7. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(8) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Check Hardware and Software Requirements The following table lists the minimum hardware and software requirements for this course: Table Intro-1. Course 3116 Hardware and Software Requirements Setup. Minimum Requirements. Hardware. You need a host computer that meets the following requirements: Pentium. 4 - 2.8Ghz CPU (or faster; use of x86_64 hardware is recommended). Monitor. and Graphics Card capable of displaying 1280x1024 (or higher) resolution. 4. GB (or more) RAM. 60. GB (or more) hard disk drive. DVD. drive. Make sure that the host computer is actually utilizing the full 4 GB of RAM. If not, exercises can run extremely slow or even stall a process. Software. To complete the setup of the host computer, you need the following software, software installation files, and DVD: SUSE. Linux Enterprise Server 11 SP2. You use this software to install da-host. VMware Adobe. Player 4.x.x or 5.x.x. Reader 9.x. SUSE. Linux Enterprise Server 11 SP2 Administration Course DVD The Course DVD contains software and files needed for setup and exercises.. Course Scenario The exercises in this course center around the fictional Digital Airlines Company that has offices at various airports around the globe. The Digital Airlines management has made the decision to migrate several back-end services to Linux servers running SUSE Linux Enterprise Server 11 SP2. Your task is to set up a lab environment with SUSE Linux Enterprise Server 11 SP2 and to familiarize yourself with it.. 8. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(9) Introduction. You need to learn how to do the following to be able to adminster SLES 11 SP2 in Digital Airlines IT environment: . Install SUSE Linux Enterprise Server 11 SP2. . Manage system initialization. . Administer Linux processes and services. . Administer storage. . Configure the network. . Manage hardware. . Configure remote access. . Monitor a SUSE Linux Enterprise Server 11 SP2 system. . Automate tasks. . Manage backup and recovery. . Administer user access and security. Set Up Your Practice Environment To perform the exercises in this workbook, you need a physical machine (da-host, 172.17.8.1/16) that has SUSE Linux Enterprise Server 11 SP2 installed. You also need a VMware virtual machine (da1, 172.17.8.101/16) which will be installed with SUSE Linux Enterprise Server 11 SP2 in Exercise 1 of Section 1. An empty (uninstalled) VMware virtual machine is provided on the DVD for this purpose, but you can as well just use VMware player to create the needed disk files. The Course 3116 DVD contains an additional SLES 11 SP2 VMware virtual machine (da2, 172.17.8.102/16) that uses BtrFS for the / file system for use in the snapper exercise in Section 10. The following explains how to set up your computer to do the exercises. You have to do the following:. Version 1. . “Set Up da-host” on page 10. . “Set Up da1” on page 15. . “Set Up da2” on page 15. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 9. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(10) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Set Up da-host da-host is the machine where you work most of the time during the exercises. This machine will host the da1 VMware virtual machine that you install in Section 1 of the course. To install da-host, you can use one of the following methods: . “Install da-host Using AutoYaST” on page 10. . “Install da-host Manually” on page 11. After that, you have to do the following task: . “Install VMware Player” on page 14. Install da-host Using AutoYaST. On the course CD in the setup directory, you can find an AutoYaST XML file for the installation of da-host, called 3116-da-host.xml. Depending on your host’s hardware, copy the file to another storage device: Table Intro-2. Copies of da-host.xml Available Hardware. Storage Location for da-host.xml. 2 CD/DVD drives. No copy needed. Floppy disk drive. Copy to floppy disk. USB port. Copy to USB stick or USB hard drive. NFS and DHCP server in your network. Copy into the exported directory on your NFS server. To install da-host using AutoYaST, do the following: 1.. Be sure there are no data on the server that you still need, because all existing data on the hard disk will be erased.. 2.. Boot the server from the SUSE Linux Enterprise Server 11 SP2 Product DVD. If your hardware supports it, use the x86_64 DVD, otherwise the DVD for the i586 architecture.. 3.. When the installation screen appears, highlight the Installation option by using the arrow keys. You have 20 seconds to highlight the option before GRUB boots from the hard drive.. 10. 4.. Set the display resolution by pressing F2; then select the display resolution matching your monitor; it should not be less than 1024x768.. 5.. Insert the media containing the file 3116-da-host.xml.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(11) Introduction. 6.. In the Boot Options field, type the following (depending on the media containing the 3116-da-host.xml file): . 3116-da-host.xml on the course DVD: autoyast=dvd:///setup/3116-da-host.xml. . 3116-da-host.xml on a floppy disk: autoyast=floppy:///3116-da-host.xml. . instmode=cd. 3116-da-host.xml on a USB device: autoyast=usb:///3116-da-host.xml. . instmode=cd. instmode=cd. 3116-da-host.xml on an NFS server: autoyast=nfs://IP-address/path_to_file/3116-dahost.xml netsetup=dhcp. Then press Enter. The kernel loads and the SUSE Linux Enterprise Server 11 SP2 installation begins. YaST accesses the file 3116-da-host.xml and installs SLES 11 SP2 according to the configuration contained in that file. 7.. (Conditional) If the installation stops at some early point, reset the computer, restart the installation and try one of the other installation options, like Installation—ACPI Disabled.. Install da-host Manually. To install da-host manually, do the following: 1.. Boot your Workstation with the SUSE Linux Enterprise Server 11 SP2 DVD. Wait while the machine boots.. 2.. When the GRUB installation screen appears, highlight the Installation option by using the arrow keys. You have 20 seconds to highlight the option before GRUB boots from the hard drive.. Version 1. 3.. Set the display resolution by pressing F2, then select the display resolution that matches your monitor. It should not be less than 1024x768.. 4.. In the Welcome dialog, do the following: a.. Make sure that the correct keyboard layout is selected in the Keyboard Layout menu. If not, select Keyboard Layout and choose your layout.. b.. Select I Agree to the License Terms, then click Next.. 5.. In the Media Check, click Next.. 6.. From the Installation Mode dialog, make sure that New Installation is selected, then click Next.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 11. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(12) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 7.. Configure your time zone information by doing the following: a.. From the Clock and Time Zone dialog, select your time zone, then click Change.. b.. Set the Current Time and Current Date to match your current time and date; then select Accept. Time is set according to the 24-hour clock format. The date format is dd/ mm/yyyy.. c.. Click Next.. 8.. In the Server Base Scenario dialog, ensure that Physical Machine is selected, then click Next.. 9.. From the Installation Settings dialog, do the following: a.. Check the suggested partitioning under the Partitioning heading. If it does not list partition 1 (/dev/sda1) for swap and partition 2 (/dev/sda2) for / (root), do the following: i.. Select Partitioning. The Preparing Hard Disk dialog appears.. ii.. Select your hard disk (the first hard disk entry), then click Next.. iii.. Click Use entire hard disk.. iv.. Make sure none of the Proposal setup settings are selected, then select Next. You are returned to the Installation Settings overview dialog.. b.. To install software that is not included in the default selection, do the following: i.. Select Software from the Installation Settings dialog.. ii.. Select the following Patterns: File Server Mail and News Server Web and LAMP Server DHCP and DNS Server Directory Server (LDAP) C/C++ Compiler and Tools Select Accept.. iii.. When prompted to accept software licenses, click Accept.. iv.. When prompted to review the automatic changes, click Continue. You are returned to the Installation Settings overview dialog.. c.. Click Install.. d.. When prompted to confirm the installation, click Install. Wait while the initial installation is performed. After the initial installation is complete, SLES 11 SP2 restarts.. 12. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(13) Introduction. 10.. In the Password for the System Administrator “root” dialog, as password type novell, then click Next. Confirm the warning by clicking Yes.. 11.. In the Hostname and Domain Name dialog type the following information: . Hostname: da-host. . Domain Name: digitalairlines.com. . Change Hostname via DHCP: Deselect. . Assign Hostname to Loopback IP: Deselect. Click Next to continue. 12.. In the Network Configuration dialog, configure your network settings by doing the following: a.. From the Network Configuration dialog, beneath the Firewall entry, click on disable next to Firewall is enabled. The line will change to Firewall is disabled.. b.. From the Network Configuration dialog, select Network Interfaces > Hostname/DNS tab. In the Name Server 1 field, enter 172.17.8.1 and make sure that digitalairlines.com appears in the Domain Search field, then click OK. Click Next to continue.. 13.. From the Test Internet Connection dialog, select No, Skip This Test, then click Next.. 14.. In the Installation Overview dialog, make sure that Use Following Configuration is selected. Under CA Management, make sure that the Server Name is dahost.digitalairlines.com and the E-Mail is [email protected]. If not, select CA Management > Edit Default Settings and correct the Server Name to da-host.digitalairlines.com and E-Mail to [email protected]. Click Next to return to the Installation Overview dialog. Click Next to continue.. 15.. In the User Authentication dialog, make sure Local (/etc/passwd) is selected, then click Next.. 16.. In the New Local User dialog, enter the following, then click Next . User’s Full Name: Geeko Novell. . Username: geeko. . Password: novell. . Confirm Password: novell. Confirm the warning by clicking Yes. 17.. Version 1. In the Release Notes dialog, click Next.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 13. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(14) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 18.. In the Hardware Configuration dialog, make sure that the values for Resolution and Monitor are correct for your hardware, then click Next.. 19.. In the Installation Completed dialog, click Finish. The installation is completed and the SLES 11 login screen appears.. 20.. Remove the SUSE Linux Enterprise Server 11 SP2 DVD from your DVD drive.. Install VMware Player. To install VMware Player on da-host, do the following: 1.. Download the VMware Player for Linux software (for i386 or x86_64, depending on the architecture of SLES 11 SP2 installed on da-host) from www.vmware.com (http://www.vmware.com/go/downloadplayer/) and copy it to the /tmp/ directory.. 2.. Log in to the graphical desktop as root (password: novell).. 3.. Open a terminal and install VMware Player by entering bash /path/to/VMware-Player-4.x.x-x.arch.bundle Follow the prompts to install VMware Player.. 4.. Create a /vmware directory and make it writable for regular users: mkdir -m 1777 /vmware. 5.. Unpack the da1-3116.zip and da2-3116.zip archives from the setup directory on the Student DVD: cd /vmware unzip /path/to/da1-3116.zip chown -R geeko: /vmware/3116-da1 unzip /path/to/da1-3117.zip chown -R geeko: /vmware/3117-da1. 6.. On da-host, create the /etc/sysconfig/network/ifcfg-vmnet1 file with the following content: BOOTPROTO='static' STARTMODE='auto' USERCONTROL='no' IPADDR='172.17.8.1/16'. 7.. To make sure the settings in the file take effect, reboot your computer.. 8.. After the reboot, log in as geeko and open a terminal window.. 9.. In the terminal window, enter ip a s dev vmnet1. You should see an output similar to the following:. 14. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(15) Introduction. da-host:~ # ip a s dev vmnet1 6: vmnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:50:56:c0:00:01 brd ff:ff:ff:ff:ff:ff inet 192.168.172.1/24 brd 192.168.172.255 scope global vmnet1 inet 172.17.8.1/16 brd 172.17.255.255 scope global vmnet1 inet6 fe80::250:56ff:fec0:1/64 scope link valid_lft forever preferred_lft forever. The other address you see in the output above (192.168.172.1/24) is the address VMware Player assigns to the interface. It is not relevant, as da1 uses a fixed IP address (172.17.8.101/16) and does not rely on IP addresses being distributed by VMware Player via DHCP.. Set Up da1 da1 is a SUSE Linux Enterprise Server 11 SP2. This virtual machine is installed in Exercise 1 of Section 1 and then used in some of the subsequent exercises. As the machine will be installed as par of an exercise, there is no setup required at this point beyond the copying of the files described under “Install VMware Player” on page 14.. Set Up da2 da2 is a SUSE Linux Enterprise Server 11 SP2 with BtrFS used as the / (root) file system. This virtual machine is used in Section 10 (but you could also use it as a replacement for da1 in other Sections if you, for some reason, did not install da1 in Section 1). To set up the machine, do the following: 1.. As user Geeko, open the main menu, click More Applications and select System > VMware Player.. 2.. In the End User License Agreement dialog, click Accept.. 3.. (Optional) If you are prompted to download available updates, click Cancel.. 4.. Click Open an existing Virtual Machine.. 5.. Navigate to the /vmware/3116-da2 directory and select 3116-da2.vmx, then click Open.. 6.. Select da2 in the left pane and click Play virtual machine. When prompted whether you moved or copied the VM, click I copied it. The virtual machine starts.. 7.. Version 1. To change the keyboard layout within the virtual machine from US English to another one, do the following: a.. Log in as user geeko (password novell).. b.. Start YaST (root password: novell) and select System > Language.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 15. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(16) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 8.. c.. Set Primary Language to your language and select Adapt Keyboard Layout to your language and click OK.. d.. Close the YaST Control Center. Open a terminal window and ping da-host with the following command: ping da-host.digitalairlines.com You should see echo replies.. 9.. Shut down da2 until you need it.. Review the Exercise Conventions When working through an exercise, you will see conventions that indicate information you need to supply that is specific to your server. The following describes the most common conventions: . italicized/bolded text: This is a reference to a variable that is unique to your situation, such as the hostname of your server. For example, if the hostname of your server is da1, and you see the following, hostname.digitalairlines.com then you would enter da1.digitalairlines.com. . 172.17.8.xx: This is the IP address that is assigned to your SUSE Linux Enterprise system. For example, if your IP address is 172.17.8.101, and you see the following: 172.17.8.xx then you would enter 172.17.8.101. . Select: The word select is used in exercise steps to indicate a variety of actions including clicking a button on the interface and selecting a menu item.. . Enter and Type: The words enter and type have distinct meanings. The word enter means to type text in a field or at a command line and press the Enter key when necessary. The word type means to type text without pressing the Enter key. If you are directed to type a value, make sure you do not also press the Enter key or you might activate a process that you are not ready to start.. 16. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(17) Install SUSE Linux Enterprise Server 11 SP2. SECTION 1. Install SUSE Linux Enterprise Server 11 SP2. In this section of the workbook, you learn how to do the following: . “Install SUSE Linux Enterprise Server 11 SP2” on page 18 In this exercise, you install SUSE Linux Enterprise Server 11 SP2.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 17. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(18) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Exercise 1-1. Install SUSE Linux Enterprise Server 11 SP2 In this exercise, you install a SUSE Linux Enterprise Server 11 SP2 system. Use the following specifications as a guideline for the installation: . Create the following partitions:  . 1 GB swap partition. 6 GB for / (You should leave unpartitioned space on the hard disk to add partitions in later exercises).. . Use default software patterns, but add the C/C++ Compiler and Tools pattern.. . root password: novell NOTE: This password is not appropriate for a production environment.. . Use a static IP address: . IP address: 172.17.8.101. . Network mask: 255.255.0.0. . Hostname: da1. . Domain name: digitalairlines.com. . Name server: 172.17.8.1. . Default gateway: none. . Use local authentication. Create a geeko user account with a password of novell.. . Skip the online update.. To install SLES 11 SP2, do the following: 1.. Insert your SLES 11 SP2 installation DVD into your host workstation’s DVD drive.. 2.. As user Geeko, open the main menu, click More Applications and select System > VMware Player.. 3.. In the End User License Agreement dialog, click Accept.. 4.. (Optional) If you are prompted to download available updates, click Cancel.. 5.. Click Open a Virtual Machine.. 6.. Navigate to the /vmware/3116-da1 directory and select 3116-da1.vmx, then click Open.. 7.. Select da1 in the left pane and click Play virtual machine. The virtual machine starts.. 8.. When the GRUB installation screen appears, select Installation with the arrow keys and then press Enter. Wait while Linux is loaded and the YaST Installation module starts.. 18. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(19) Install SUSE Linux Enterprise Server 11 SP2. 9.. In the Welcome dialog, select your language and your keyboard layout from the Language and Keyboard Layour drop-down menus NOTE: Although you can select any available language, the exercises in this manual are written for English US.. 10.. In the same dialog, select I Agree to the License Terms, then click Next.. 11.. In the Media Check screen, click Next. Wait while the system hardware is probed.. 12.. In the Installation Mode dialog, select New Installation, then click Next.. 13.. In the Clock and Time Zone dialog, select your time zone and deselect Hardware Clock Set To UTC. Click Next to continue.. 14.. In the Server Base Scenario screen, select Physical Machine, then click Next. The Installation Settings proposal dialog appears.. 15.. Change the partitioning settings by selecting Partitioning.. 16.. In the Prepare Hard Disk dialog, select Custom Partitioning (for experts), then click Next.. 17.. Create a swap partition by doing the following:. 18.. a.. Under System View, select Hard Disks > sda.. b.. Select Add.. c.. Select Primary Partition, then click Next.. d.. Select Custom Size, then enter a size of 1 GB.. e.. Click Next.. f.. From the File System drop-down list, select Swap.. g.. Add the swap partition by clicking Finish.. Create the root partition by doing the following: a.. Select Add.. b.. Select Primary Partition, then click Next.. c.. Select Custom Size; then enter a size of 6 GB.. d.. Click Next.. e.. Configure the following options:. f.. . Select Ext3 from the File System drop-down list.. . Select / from the Mount Point drop-down list.. Add the root partition by clicking Finish. In the Expert Partitioner, you should now see two partitions, one for swap with 1 GB and one for / with 6 GB.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 19. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(20) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 19.. Confirm the partitioning setup and return to the Installation Settings by clicking Accept.. 20.. In the Installation Settings Overview, select Software.. 21.. Under Patterns, scroll down as needed and select C/C++ Compiler and Tools. Click OK to return to the Installation Settings dialog. If prompted to accept license agreements for packages to be installed, select Accept.. 22.. In the Installation Settings dialog, click Install.. 23.. In the confirmation dialog, click Install. Wait while the disk is partitioned and the packages are installed. This may take up to 30 minutes to complete, depending on the hardware. The system will reboot after the software installation.. 24.. In the Password for the System Administrator “root” screen, enter novell in the password fields. Click Next to continue. Confirm the password warning by clicking Yes.. 25.. In the Hostname and Domain Name dialog, enter da1 in the Hostname field and digitalairlines.com in the Domain Name field. Deselect Change Hostname via DHCP. Deselect Assign Hostname to Loopback IP. Click Next to continue.. 26.. In the Network Configuration screen under Firewall, click disable next to Firewall is enabled. The entry will change to Firewall is disabled.. 27.. Select Network Interfaces.. 28.. In the Network Settings dialog, select the first detected network card, then click Edit.. 29.. In the Network Card Setup dialog, do the following: . Select Statically Assigned IP Address.. . In the IP Address field, enter 172.17.8.101.. . In the Subnet Mask field, enter 255.255.0.0.. . In the Hostname field, enter da1.digitalairlines.com.. Click Next to return to the Network Settings dialog. 30.. Select the Hostname/DNS tab. Your hostname and domain name should already be filled. If not, enter a Hostname of da1 and the Domain Name digitalairlines.com.. 20. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(21) Install SUSE Linux Enterprise Server 11 SP2. As Name Server 1, enter 172.17.8.1 NOTE: Because this virtual machine runs in host-only mode, it is isolated from the rest of your network. In a production environment, you would configure a gateway router address. 31.. Return to the Network Configuration dialog by selecting OK.. 32.. Continue with the installation by clicking Next.. 33.. In the Test Internet Connection dialog, select No, Skip This Test, then click Next.. 34.. In the Network Services Configuration, make sure that the values under CA Management are correct. If there are incorrect values, correct them by clicking on CA Management > Edit Default Settings. Correct entries as needed and return to the Network Services Configuration dialog by clicking Next twice. Click Next to continue.. 35.. In the User Authentication Method screen, select Local (/etc/passwd), then click Next.. 36.. In the New Local User screen, add a user named geeko by entering the following: . User’s Full Name: Geeko. . User Login: geeko. . Password: novell. 37.. Create the user by clicking Next.. 38.. Confirm the password warning by clicking Yes.. 39.. In the Release Notes screen, review the release notes, then click Next.. 40.. In the Hardware Configuration dialog, review the settings suggested under Graphics Cards and correct them as needed, then click Next.. 41.. Complete the installation process by clicking Finish. Wait while an AutoYaST profile is created and the graphical login is loaded. Log in as geeko (password novell).. 42.. (Conditional) If your da-host machine has an Internet connection, you can install VMware Tools in your SLES 11 virtual machine by doing the following: a.. In your VMware window, select Virtural Machine > Removable Devices > CD/DVD > Disconnect.. b.. In your VMware window, select Virtual Machine > Install VMware Tools > Download and Install > Install.. c.. When prompted for the root user’s password, enter novell. A File Browser window opens displaying the files on the VMware Tools .tgz file.. d.. Version 1. Double-click the .tgz file.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 21. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(22) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. In the File Roller window that opens up, select Extract and then select a directory for the vmware-tools-distrib directory, such as geeko’s home directory. The files will be extracted to the location you specify. e.. Open a terminal window by right-clicking on the desktop and selecting Open in Terminal. In that terminal, change to the root account by entering su - and the password novell when prompted.. f.. Change into the vmware-tools-contrib directory by entering cd /home/geeko/vmware-tools-distrib. g.. At the shell prompt, enter ./vmware-install.pl.. h.. Accept the suggested default values by pressing Enter. Several modules will be compiled.. i.. When prompted to configure your screen resolution, enter the appropriate menu option for 1024x768.. j.. In your VMware window, select Virtual Machine > Removable Devices > CD/DVD > Connect to /dev/sr0.. k.. When prompted for the root user’s password, enter novell and click Authenticate.. l.. Close the File Browser window.. m.. Reboot the system by entering init 6 at the shell prompt.. (End of Exercise). 22. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(23) Manage System Initialization. SECTION 2. Manage System Initialization. In this section of the workbook, you learn how to do the following: . “Manage the Boot Loader” on page 24 In this exercise, you practice booting into a shell and modifying /boot/grub/ menu.lst.. . “Manage Runlevels” on page 27 In this exercise, you practice configuring runlevels.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 23. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(24) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Exercise 2-1. Manage the Boot Loader In this exercise, you practice booting into a shell and modifying /boot/grub/ menu.lst. You enter init=/bin/bash at the boot prompt and modify /boot/grub/menu.lst to require a password before kernel parameters can be modified. You then test the new GRUB configuration. NOTE: This exercise will not work with SUSE Linux Enterprise Server 11 SP2 running on physical hardware with a USB keyboard. USB drivers are usually loaded late in the init process. If your machine is equipped with a USB keyboard, you have to add the modules to the initial RAM disk for this exercise to work. To do this with a USB keyboard, complete the following steps first: Find out which USB modules are loaded by entering lsmod in a terminal window. Then start the YaST Control Center, and select System > /etc/sysconfig Editor. Expand System > Kernel. In INITRD_MODULES, add the appropriate modules (such as usbhid, uhdi_hcd, and/or ehci_hcd). Close the dialogs. In a terminal window (as root), enter mkinitrd.. Complete the following: 1.. If your da1 virtual server is suspended, resume it. If it is turned off, turn it on and continue with Step 6.. 2.. If necessary, log in to da1 as geeko (password of novell).. 3.. Right-click on the desktop, then select Open in Terminal.. 4.. In the terminal window, enter su - followed by a password of novell.. 5.. Reboot the system by entering init 6 at the shell prompt.. 6.. When the GRUB boot menu is displayed, press Space to stop the timer.. 7.. In the Boot Options field, replace the vga=0xxxx option with init=/bin/bash amd press Enter. After a few moments, the bash prompt is displayed:. 8.. Enter mount to find out if the root (/) partition is mounted writable. If not, remount the root partition read-writable by entering mount -o remount,rw,sync /. 9.. 24. At the shell prompt, enter vi /boot/grub/menu.lst.. 10.. Press Ins.. 11.. Position the cursor at the beginning of the line starting with “gfxmenu”.. 12.. Comment out the line by inserting a pound sign (#) in front of the line starting with “gfxmenu”.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(25) Manage System Initialization. 13.. To avoid having the password displayed in clear-text in the configuration file, create an MD5-Hash encrypted password by doing the following within vi: a.. Add a new, blank line after the “gfxmenu” line you just commented out.. b.. Press Esc.. c.. Enter :r! crypt.. echo. -e. “secret\nsecret”. |. grub-md5-. This runs an external command from within the vi editor. The echo command sends the secret and secret text strings to the standard input of the grub-md5-crypt command. The grub-md5-crypt command uses these strings as input for its Password: and Retype Password: prompts. It then encrypts the password. The output from grub-md5-crypt command is inserted into the file, including the encrypted password: # Modified by YaST2. Last modification on Wed Sep 26 10:10:28 CEST 2012 default 0 timeout 8 ##YaST - generic_mbr #gfxmenu (hd0,1)/boot/message stty: standard input: Invalid argument Password: Retype password: stty: standard input: Invalid argument $1$Ihe5r0$4H7xQDaVkzAmL93O7145w0 ##YaST - activate ###Don't change this comment - YaST2 identifier: Original name: linux### title SUSE Linux Enterprise Server 11 SP2 - 3.0.13-0.27 root (hd0,1) kernel /boot/vmlinuz-3.0.13-0.27-pae root=/dev/sda2 resume=/dev/sda1 splash=silent showopts vga=0x317 initrd /boot/initrd-3.0.13-0.27-pae ... d.. Arrow up to the first line that reads stty: standard input: Invalid argument.. e.. Type dd to delete the line.. f.. Repeat this process to delete the following lines: Password: Retype Password: stty: standard input: Invalid argument. g.. Press Ins.. h.. At the beginning of the line with the encrypted password, enter password --md5. An example is shown below:. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 25. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(26) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. # Modified by YaST2. Last modification on Wed Sep 26 10:10:28 CEST 2012 default 0 timeout 8 ##YaST - generic_mbr #gfxmenu (hd0,1)/boot/message password --md5 $1$Ihe5r0$4H7xQDaVkzAmL93O7145w0 ##YaST - activate ###Don't change this comment - YaST2 identifier: Original name: linux### title SUSE Linux Enterprise Server 11 SP2 - 3.0.13-0.27 .... Your hash value will be different than that shown above. i. 14.. Save the file by pressing Esc and then entering :wq.. Reset the computer by entering reboot at the shell prompt. You will notice that the start screen looks different now, because you turned off the graphical menu.. 15.. If you want to edit the kernel command line, press p and then enter a password of secret.. 16.. Select the SUSE Linux Enterprise Server 11 SP2 menu option and press Enter. Wait while the system boots.. 17.. Undo the changes in /boot/grub/menu.lst: a.. Log in as geeko with a password of novell.. b.. Open a terminal window and su - to root using a password of novell.. c.. At the shell prompt, enter vi /boot/grub/menu.lst.. d.. Press Ins.. e.. Put a comment sign (#) at the beginning of the line beginning with “password”.. f.. Remove the comment sign in front of the line starting with “gfxmenu”.. g.. Save the file and close vi by pressing Esc and entering :wq.. h.. At the shell prompt, enter exit twice.. (End of Exercise). 26. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(27) Manage System Initialization. Exercise 2-2. Manage Runlevels In this exercise, you practice configuring runlevels. This exercise has four parts. In the first part, you use the runlevel command to determine the current runlevel. You also use the init command to change to runlevel 3 and then back to 5. In the second part, you activate the at service atd. In the third part, you reboot your computer and boot into runlevel 3 instead of the default runlevel 5. You then log in and switch to back to runlevel 5. In the fourth part, you activate the rsyncd daemon using the YaST runlevel editor. Complete the following: . “Part I: View and Change the Current Runlevel” on page 27. . “Part II: Activate the atd Service” on page 28. . “Part III: Set a Runlevel at Boot Time” on page 29. . “Part IV: Enable rsyncd with YaST” on page 30. Part I: View and Change the Current Runlevel To view and change the current runlevel, do the following: 1.. If necessary, log in to your da1 server as geeko with a password of novell.. 2.. Open a terminal window and su - to root using a password of novell.. 3.. Check the previous and current runlevels by entering runlevel at the shell prompt. List the runlevels in the table below:. Table 2-1. Runlevels Previous. Current. Notice that the previous runlevel is listed as N, which means that there was no previous runlevel set. 4.. Change to runlevel 3 by entering init 3 in the terminal window. The graphical environment is terminated and you are left at a terminal login prompt.. 5.. Log in as root with a password of novell.. 6.. Check the previous and current runlevel by entering runlevel. List the runlevels in the table below:. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 27. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(28) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Table 2-2. Runlevels Previous. 7.. Current. Switch to runlevel 5 by entering init 5. The GUI login screen appears.. 8.. Log in as geeko with a password of novell.. Part II: Activate the atd Service To activate the atd service, do the following: 1.. Open a terminal window.. 2.. At the shell prompt, su - to root with a password of novell.. 3.. View the current runlevel configuration for atd by entering chkconfig atd -l at the shell prompt. Notice that configuration is off for all runlevels.. 4.. Install the service to its predefined runlevels by entering insserv -d atd. 5.. Check the modified runlevel configuration for atd by entering chkconfig atd -l again. Notice that the default configuration for atd sets runlevels 2, 3, and 5 to on.. 6.. Change to the /etc/rc.d/rc3.d directory by entering cd /etc/rc.d/rc3.d at the shell prompt.. 7.. List the atd files in the directory by entering ls -l *atd at the shell prompt. Notice that there are two atd links—one is used to start the atd service and one is used to kill it:. 8.. Start the at service by entering rcatd start at the shell prompt.. 9.. Verify that the service is running by entering rcatd status at the shell prompt.. 10.. Switch to virtual terminal 1 by pressing Ctrl+Alt+F1 or by entering chvt 1. NOTE: If pressing Ctrl+Alt+F1 changes da-host to the first virtual terminal, change back to the graphical interface by pressing Ctrl+Alt+F7. Then activate the VMware window, press Ctrl+Alt+Space and, while keeping Ctrl+Alt pressed, release Space and press F1.. 11.. 28. Press Ctrl+c or Enter to bring up the shell prompt.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(29) Manage System Initialization. 12.. You should be still be logged in as root. Verify this by entering whoami at the shell prompt.. 13.. Switch to runlevel 1 by entering init 1 at the shell prompt.. 14.. When prompted, enter a root password of novell.. 15.. Determine if the atd service is running by entering rcatd status at the shell prompt. The service is listed as unused because it is not configured to start at runlevel 1.. 16.. Switch back to your previous runlevel (5) by entering init 5 at the shell prompt. The GUI login screen appears.. 17.. Log in as geeko with a password of novell.. 18.. Open a terminal session and enter su - to switch to root using a password of novell.. 19.. Determine if the atd service is running by entering rcatd status at the shell prompt. The service is listed as running because it is configured to start at runlevel 5.. 20.. From the command line, remove the atd service from system startup runlevels by entering chkconfig atd off.. 21.. View the current runlevel configuration for at by entering chkconfig atd l at the shell prompt. Notice that the service is off for all runlevels.. 22.. Determine if the atd service is running by entering rcatd status at the shell prompt. The service is listed as running because changing the runlevel configuration with chkconfig does not affect the status of the respective service. You would need to stop it manually or reboot the system to stop the atd service.. 23.. Re-enable the service to start at the default runlevels by entering chkconfig atd on at the shell prompt.. Part III: Set a Runlevel at Boot Time To set a runlevel at boot time, do the following:. Version 1. 1.. Reboot by entering init 6 at the shell prompt.. 2.. When the GRUB boot menu is displayed, press Space to stop the timer.. 3.. In the Boot Options field, add the number 3 at the end of the line.. 4.. Press Enter to boot the Linux system to runlevel 3.. 5.. When the login prompt appears, log in as root with a password of novell.. 6.. Display the current runlevel by entering runlevel at the shell prompt.. 7.. Switch to runlevel 5 by entering init 5 at the shell prompt.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 29. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(30) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 8.. Log in as geeko with a password of novell.. 9.. Switch back to the virtual terminal by pressing Ctrl+Alt+F1. NOTE: If pressing Ctrl+Alt+F1 changes da-host to the first virtual terminal, change back to the graphical interface by pressing Ctrl+Alt+F7. Then activate the VMware window, press Ctrl+Alt+Space and, while keeping Ctrl+Alt pressed, release Space and press F1.. 10.. Press Ctrl+c.. 11.. Log out as root by entering exit or by pressing Ctrl+d.. 12.. Switch back to the graphical user interface by pressing Ctrl+Alt+F7.. Part IV: Enable rsyncd with YaST To enable rsyncd with YaST, do the following: 1.. In the graphical desktop, select Computer > YaST.. 2.. Enter a password of novell. The YaST Control Center appears.. 3.. Select System > System Services (Runlevel). The System Services (Runlevel): Services dialog appears.. 4.. Switch to a more detailed view (with additional options) by selecting Expert Mode.. 5.. Scroll to and select rsyncd.. 6.. Below the list, configure this service to start at runlevels 3 and 5 by selecting 3 and 5.. 7.. From the Set/Reset drop-down list, select Enable the Service.. 8.. Start the rsyncd service by selecting Start Now from the Start/Stop/Refresh drop-down list. A status message appears indicating that the service started successfully.. 9. 10.. Close the status message by selecting OK. Stop the rsyncd service by selecting Stop Now from the Start/Stop/Refresh drop-down list. A status message appears indicating that the service stopped successfully.. 11.. Close the status message by selecting OK.. 12.. Save the changes by selecting OK > Yes.. 13.. Close the YaST Control Center.. (End of Exercise). 30. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(31) Administer Linux Processes and Services. SECTION 3. Administer Linux Processes and Services. In this section of the workbook, you learn how to do the following: . “Manage Linux Processes” on page 32 In this exercise, you start and stop processes and change their priorities.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 31. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(32) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Exercise 3-1. Manage Linux Processes In this exercise, you start and stop processes and change their priorities. In the first part of the exercise, you start and suspend gcalctool, move it to the background and foreground, and then stop it. In the second part, you start gcalctool and set the priority of the running program to a nice value of -5. Then you start xeyes with a nice value of 10. Complete the following: . “Part I: Move Processes to the Background” on page 32. . “Part II: Modify Process Priorities” on page 34. Part I: Move Processes to the Background To move processes to the background, do the following: 1.. If necessary, log in to your da1 virtual workstation as geeko with a password of novell.. 2.. Open a terminal window and su - to root using a password of novell.. 3.. At the command line, display the processes that are currently owned by geeko by entering ps -lU geeko (with a lowercase L). 4.. Display the processes that are currently owned by root by entering ps -lU root (with a lowercase L). 5.. Start the GNOME Calculator program by entering gcalctool at the shell prompt. Notice that the terminal is not available to receive new commands because no command line is displayed. This is because the calculator program is running in the foreground.. 6.. Arrange the calculator window and the terminal window so that you can see them both; then select the terminal window to activate it.. 7.. Suspend the calculator program by pressing Ctrl+z.. 8.. Try using the calculator tool to calculate several numbers. Because its process was suspended, the calculator does not respond.. 9.. View the job in the background by entering jobs You should see that the gcalctool job is stopped.. 10.. View the gcalctool process running from the current terminal by entering ps -l (with a lower case L) The process shows a status of T, which indicates that it is being traced or stopped.. 32. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(33) Administer Linux Processes and Services. 11.. Resume the calculator program running in the background by entering bg 1 Notice that the calculator program is running again. Because it’s running in the background, you can now use the terminal window to enter other commands.. 12.. Verify that the job status is running by entering jobs You should see that the gcalctool job is now running.. 13.. View the gcalctool branch in the process tree by entering pstree -p | grep gcalctool Notice that the gcalctool process is listed at the end of the tree.. 14.. Close the calculator program.. 15.. Start the calculator in the background by entering nohup gcalctool & NOTE: The nohup command runs a command such that it ignores any hangup kill signals sent to it.. 16.. Close the terminal window. The calculator program remains running.. 17.. Open a new terminal window.. 18.. Start the top program by entering top. 19.. View only the processes started by root by typing u, then entering root.. 20.. Check for the calculator program (gcalctool) listed in top.. 21.. (Conditional) If you cannot find the gcalctool program, try maximizing the terminal window. You can also activate the Calculator window and use it to calculate several numbers. This should cause the gcalctool process to be moved near the top of the output in top. You can also enter F in top and select PID as the sort column. If needed, you can also reverse the sort order by pressing R.. 22.. Record the PID of the gcalctool process:. 23.. Exit top by typing q.. 24.. View information about the gcalctool process by entering ps PID_of_gcalctool_process. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 33. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(34) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 25.. Switch to your root user account using the su - command and a password of novell.. 26.. Stop the calculator program and check the status by entering the following commands: kill PID_of_gcalctool_process ps aux | grep gcalctool. 27.. Start the xeyes program in the background by entering xeyes&. 28.. Kill the xeyes program by entering killall xeyes. Part II: Modify Process Priorities To modify process priorities, do the following: 1.. Switch back to your geeko user by entering exit at the shell prompt.. 2.. Start the gcalctool program in the background by entering gcalctool &. 3.. Record the PID for gcalctool (displayed in the terminal window):. 4.. View the running process by entering ps lf Notice that the nice value (NI) is currently at 0.. 5.. Increase the priority of the process to a nice value of -5 by entering renice -5 -p PID_of_gcalctool_process Notice that a regular user cannot change the nice value to a value below 0, only 0-20.. 6.. Switch to root (su -) with a password of novell.. 7.. Try setting the nice value to -5 again by entering renice -5 -p PID_of_gcalctool_process. 8.. Check that the setting is effective by entering ps lf (lower case L) Notice that the process is not displayed, because ps lf only displays processes started by the current user. The calculator program was started by geeko (not root).. 9.. View all processes by entering ps alf. 34. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(35) Administer Linux Processes and Services. The gcalctool process is now displayed. 10.. Change the nice value for the gcalctools process to a higher priority by entering renice -10 -p PID_of_gcalctools_process. 11.. Verify that the gcalctools process nice value is set to -10 by entering ps alf (with a lower case L). 12.. Exit the shell running as root by entering exit You should now be user geeko again.. 13.. Start the xeyes program in the background with the nice value of +10 by entering nice xeyes&. 14.. Verify that the xeyes process nice value is set to +10 by entering ps lf (with a lower case L). 15.. Kill the gcalctools and xeyes processes by entering the following commands: kill PID_of_gcalctools_process killall xeyes. 16.. Close your terminal window.. (End of Exercise). Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 35. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(36) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 36. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(37) Administer the Linux File System. SECTION 4. Administer the Linux File System. In this section of the workbook, you learn how to do the following: . “Configure Partitions on your Hard Drive” on page 38 In this exercise, you practice creating partitions and file systems with YaST and fdisk. You also use command line tools to create file systems.. . “Manage File Systems from the Command Line” on page 44 In this exercise, you practice managing file systems from the command line.. . “Create Logical Volumes” on page 48 In this exercise, you learn how to administer LVM with YaST.. . “Set Up and Configure Disk Quotas” on page 51 In this exercise, you learn how to administer quotas.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 37. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(38) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. Exercise 4-1. Configure Partitions on your Hard Drive In this exercise, you practice creating partitions and file systems using YaST and fdisk. You also use command line tools to create file systems. In the first part of this exercise, you use YaST to create the following partitions and file systems: . An extended partition using the remaining disk space.. . One logical partition with a size of 500 MB, an ext3 file system, and a mount point of /apps.. . One logical partition with a size of 1 GB, a BtrFS file system, and a mount point of /srv.. In the second part of this exercise, you use fdisk to create the following partitions: . One logical partition of the partition type Win95/FAT32 with a size of 500 MB.. . One logical partition of the partition type Linux with a size of 500 MB.. In the third part of this exercise, you create file systems on the partitions you created in the second part using the applicable options for mkfs: . Create a FAT32 file system on /dev/sda7.. . Create an ext2 file system on /dev/sda8.. To do this, you need to complete the following tasks: . “Part I: Create Partitions and File Systems with YaST” on page 38. . “Part II: Partition Manually with fdisk” on page 40. . “Part III: Manage File Systems from the Command Line” on page 42. Part I: Create Partitions and File Systems with YaST To create partitions and file systems with YaST, do the following: 1.. If your da1 virtual machine is not running, start or resume it.. 2.. If necessary, log into da1 as geeko with a password of novell.. 3.. Open a terminal window and use the su - command to switch to your root account using a password of novell.. 4.. At the shell prompt, enter yast2 disk. A warning message appears.. 5.. Continue by clicking Yes. After a few moments, the Expert Partitioner dialog appears.. 6.. 38. Create an extended partition with YaST by doing the following: a.. From the System View, expand Hard Disks.. b.. Highlight sda, then click Add.. c.. For the New Partition Type, select Extended Partition; then click Next.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(39) Administer the Linux File System. d.. Make sure Maximum Size is selected; then click Finish. You are returned to the Expert Partitioner dialog, with the extended partition listed as a new entry for your hard disk.. 7.. Create a new ext3 partition with YaST: a.. Click Add. The Add Partition on /dev/sda dialog is displayed.. b.. Verify that Custom Size under New Partition Size isselected.. c.. In the Size field, enter 500 MB, then click Next. The Add Partition on /dev/sda dialog now offers Formatting Options and Moutning Options.. d.. Set the File system type to Ext3.. e.. Under Mounting Options, select Mount Partition.. f.. For the Mount Point, enter /apps.. g.. Create the partition definition by clicking Finish. You are returned to the Expert Partitioner dialog where the new partition is added to the list. The asterisk (*) after the mount point indicates the file system is not currently mounted.. 8.. Create a partition for the /srv directory: a.. With the sda disk selected, click Add.. b.. With Custom Size selected, enter 1 GB in the Size field, then click Next.. c.. In the File System drop-down list, select BtrFS.. d.. (Conditional) If a dialog informs you that the btrfsprogs package needs to be installed, make sure the SLES 11 SP2 installation media is available and click Install.. e.. Under Mounting Options, select Mount partition.. f.. For the Mount Point, enter /srv.. g.. Click the Subvolume Handling button. The Subvolume Handling dialog appears.. h. i.. In the New Subvolume field enter @/www and click Add new. In the New Subvolume field enter @/ftp and click Add new. Click OK to close the Subvolume Handling dialog.. j.. Add the /srv partition by clicking Finish. You are returned to the Expert Partitioner dialog where the new partition is added to the list.. 9.. Add the new partitions to the hard drive by clicking Next. A Summary dialog shows a summary of the changes.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 39. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(40) SUSE Linux Enterprise Server 11 SP2 Administration / Workbook. 10.. Select Finish. This commits the changes to disk and closes the Expert Partitioner dialog.. 11.. In the terminal window where you are logged in as root, verify that the new partitions have been mounted by entering mount. You should see the following lines: /dev/sda5 on /apps type ext3 (rw,acl,user_xattr) /dev/sda6 on /srv type btrfs (rw). 12.. The previous contents of the /srv directory are no longer visible as it is currently used as the mount point for the /dev/sda6 partition. To copy the existing contents of the directory to the new partition, do the following: a.. Unmount /dev/sda6 by entering umount /srv. b.. Mount the partition /dev/sda6 under /mnt by entering mount /dev/sda6 /mnt. c.. Move the content of /srv/www to /mnt/www by entering: mv /srv/www/* /mnt/www (The www and ftp directories you see under /mnt are the subvolumes you created with YaST in Step 8 on page 39). d.. Remove the /srv/www and /srv/ftp directories by entering rmdir /srv/www /srv/ftp. e.. Umount /mnt and mount /dev/sda6 again, using the entries in /etc/ fstab umount /mnt mount -a. f.. Verify that the files you moved are available again under /srv/www by entering ls. 13.. /srv/www. Verify that the appropriate entry was added to the /etc/fstab for the new partitions by entering: cat /etc/fstab. Part II: Partition Manually with fdisk To partition manually from the command line with fdisk, do the following: 1.. In the terminal window where you are logged in as root, start the utility fdisk to modify the first hard disk on your server by entering fdisk /dev/sda. 2.. 40. View the current partition table in fdisk by entering p.. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. Version 1. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

(41) Administer the Linux File System. Notice that there are five partitions defined on sda: Command (m for help): p Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c59c0 Device Boot /dev/sda1 /dev/sda2 * /dev/sda3 /dev/sda5 /dev/sda6. Start 2048 2105344 14684160 14686208 15730688. End 2105343 14684159 20971519 15728639 17831935. Blocks 1051648 6289408 3143680 521216 1050624. Id 82 83 f 83 83. System Linux s Linux W95 Ex Linux Linux. Command (m for help): 3.. Create a new 500MB Win95 FAT32 logical partition in the extended partition you created earlier by doing the following: a.. Create a new partition by entering n.. b.. Enter l (lower case L) for logical.. c.. Accept the default first cylinder by pressing Enter.. d.. Indicate the partition size by entering +500M.. e.. Change the partition type to Win95 FAT32 by entering t (for type).. f.. Enter 7 to select the partition you just created.. g.. When prompted for a Hex code, enter b for W95/FAT32.. h.. Verify the new partition configuration by entering p. Notice that the /dev/sda7 partition has been added to the partition table.. 4.. Create another logical partitions with a partition type of Linux (the default) by doing the following: a.. Create a new partition by entering n.. b.. Enter l (lower case L) to create a logical partition.. c.. Accept the default first cylinder by pressing Enter.. d.. Specify a partition size of 1 GB by entering +500M.. e.. Verify the new partition configuration by entering p. Notice that the /dev/sda8 partition has been added to the partition table.. 5.. Write the new partition table to your hard drive and exit fdisk by entering w.. 6.. View the current partition table used by the kernel by entering cat /proc/partitions Notice that the 2 new partitions you just created aren’t listed.. Version 1. Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES.. 41. Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED..

References

Related documents

Applications of Fourier transform ion cyclotron resonance (FT-ICR) and orbitrap based high resolution mass spectrometry in metabolomics and lipidomics. LC–MS-based holistic metabolic

Mon Integrated Care (Center City) Tues Traditional MH (N Knox) Wed* (July-Mar) Traditional MH (N Knox) Wed* (Apr-July) Psychosoc Rehab (5 th St) Thurs Integrated Care

In throughput mode tests, the controller is evaluated for how many packets it can process in a second. Cbench can also be used to test the controller for throughput performance

There are infinitely many principles of justice (conclusion). 24 “These, Socrates, said Parmenides, are a few, and only a few of the difficulties in which we are involved if

In this study it is aimed to investigate the total lipid and the fatty acid composition of pearl mullet which is the only fish species occurring in Lake Van and

Variations in the concentration of elements in plant samples of the tunnel #504 on the sampling profi le Analysis of the results suggests that the point with the highest

multirate-aware routing protocol: During the process of path discovery, the quality of wireless links is estimated to suggest optimal transmission rates, which are then used