Monday 24 February 2014

SUSE Linux Enterprise Server 10 Advanced Administration

SUSE Linux Enterprise Server 10 Advanced Administration

Contents
Course Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2
Audience  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2
Certification and Prerequisites. . . . . . . . . . . . . . . . . . . . . . . Intro-3
SUSE Linux Enterprise Server 10
Support and Maintenance  . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-6
Novell Customer Center  . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-7
SUSE Linux Enterprise Server 10 Online Resources  . . . . . Intro-8
Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-9
Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-10
Exercise Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-11
SECTION 1 Manage Virtualization with Xen
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Objective 1 Understand the Concept of Virtualization . . . . . . . . . . . . . . . . 1-3
Objective 2 Understand How Xen Works. . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Understand Virtualization Methods . . . . . . . . . . . . . . . . . . . . .   1-5
Understand the Xen Architecture  . . . . . . . . . . . . . . . . . . . . . .   1-7
Objective 3 Install Xen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Exercise
1-1 Install Xen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Objective 4 Manage Xen Domains with YaST . . . . . . . . . . . . . . . . . . . . . .1-13
Exercise
1-2 Install a Guest Domain  . . . . . . . . . . . . . . . . . . . . 1-19
Objective 5 Manage Xen Domains at the Command Line . . . . . . . . . . . . .1-20
Understand a Domain Configuration File  . . . . . . . . . . . . . . .   1-20
Use the xm Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1-22
Exercise 1-3 Change Memory Allocation of a Guest Domain. 1-25
Automate Domain Startup and Shutdown . . . . . . . . . . . . . . .   1-26
Exercise 1-4 Automate Domain Startup. . . . . . . . . . . . . . . . . . 1-27
Objective 6 Understand Xen Networking . . . . . . . . . . . . . . . . . . . . . . . . . .1-28
Understand the Basic Networking Concept . . . . . . . . . . . . . .   1-28
Understand Bridging  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1-29
Understand the Network Interfaces in domain0  . . . . . . . . . .   1-30
Exercise 1-5 Check the Network Configuration. . . . . . . . . . . . 1-34
Objective 7 Migrate a Guest Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-35
Use Domain Save and Restore . . . . . . . . . . . . . . . . . . . . . . . .   1-35
Use Migration and Live Migration  . . . . . . . . . . . . . . . . . . . .   1-36
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-37
SECTION 2 Configure a Web Application Server
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Objective 1 Setup a Basic Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
The Basic Functionality of a Web Server  . . . . . . . . . . . . . . . .   2-2
Install a Basic Apache Web Server  . . . . . . . . . . . . . . . . . . . . .   2-3
Exercise 2-1 Install Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Exercise 2-2 Test the Apache Installation  . . . . . . . . . . . . . . . . . 2-7
Understand the Structure and the Basic Elements of the 
Apache Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . .   2-8
Understand the Default Apache Configuration . . . . . . . . . . .   2-10
Objective 2 Configure Virtual Hosts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-12
Exercise
2-3 Configure a Virtual Host . . . . . . . . . . . . . . . . . . . 2-16
Objective 3 Limit Access to the Web Server  . . . . . . . . . . . . . . . . . . . . . . .2-17
Exercise
2-4 Configure User Authentication . . . . . . . . . . . . . . 2-21
Objective 4 Configure Apache with OpenSSL . . . . . . . . . . . . . . . . . . . . . .2-22
Exercise
2-5 Configure SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Objective 5 Install PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-31
Understand how PHP Works . . . . . . . . . . . . . . . . . . . . . . . . .   2-31
Install PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2-32
Test the PHP Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2-33
Exercise 2-6 Install PHP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35
Objective 6 Describe Tomcat  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-36
Objective 7 Install and Configure Tomcat  . . . . . . . . . . . . . . . . . . . . . . . . .2-38
Install the Tomcat Packages  . . . . . . . . . . . . . . . . . . . . . . . . .   2-38
Exercise 2-7 Install Tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Understand the File System Structure . . . . . . . . . . . . . . . . . .   2-40
Edit the server.xml File  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2-41
Exercise 2-8 Use a Configuration Template. . . . . . . . . . . . . . . 2-48
Objective 8 Install Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-49
Exercise
2-9 Install an Example Application . . . . . . . . . . . . . . 2-51
Objective 9 Use Tomcat‘s Administration Tools . . . . . . . . . . . . . . . . . . . .2-52
Use the Manager to Control Web Applications . . . . . . . . . . .   2-52
Use the Admin Interface to Adjust the Server Configuration   2-55
Limit Access to the Administration Tools . . . . . . . . . . . . . . .   2-57
Exercise 2-10 Enable the Manager and Admin Tools . . . . . . . 2-58
Objective 10 Use Port 80 to Access Tomcat . . . . . . . . . . . . . . . . . . . . . . . . .2-59
Exercise
2-11 Configure rinetd to Forward Port 80 to 
Port 8080. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-61
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-62
SECTION 3 Configure and Use Samba
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Objective 1 Understand Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Objective 2 Configure a Simple File Server . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Install Samba  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3-4
Exercise 3-1 Install Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Understand Samba‘s Configuration File  . . . . . . . . . . . . . . . . .   3-6
Objective 3 Configure User Authentication  . . . . . . . . . . . . . . . . . . . . . . . .3-10
Exercise
3-2 Configure a Share for the User Geeko  . . . . . . . . 3-16
Objective 4 Use Samba‘s Client Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17
Use nmblookup  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3-17
Use smbclient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3-18
Exercise 3-3 Access the Share of the User Geeko with
smbclient. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Exercise
3-4 Mount Geeko's Share. . . . . . . . . . . . . . . . . . . . . . 3-23
Objective 5 Use Samba as a Domain Controller . . . . . . . . . . . . . . . . . . . . .3-24
Understand a Domain Controller . . . . . . . . . . . . . . . . . . . . . .   3-24
Configure /etc/samba/smb.conf . . . . . . . . . . . . . . . . . . . . . . .   3-25
Objective 6 Integrate Samba in a Windows Domain  . . . . . . . . . . . . . . . . .3-28
Objective 7 Configure Samba as Print Server. . . . . . . . . . . . . . . . . . . . . . .3-30
Preprocess on the Samba Server  . . . . . . . . . . . . . . . . . . . . . .   3-31
Share One Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3-31
Preprocess on the Windows Client  . . . . . . . . . . . . . . . . . . . .   3-34
Exercise 3-5 Configure Samba as a Print Server . . . . . . . . . . . 3-36
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37
SECTION 4 Enable Fundamental Network Services
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Objective 1 Enable the Extended Internet Daemon (xinetd). . . . . . . . . . . . 4-2
What xinetd Is  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4-2
Configure xinetd with YaST  . . . . . . . . . . . . . . . . . . . . . . . . . .   4-3
Manage xinetd Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4-4
Exercise 4-1 Configure the Internet Daemon (xinetd) . . . . . . . 4-15
Objective 2 Enable an FTP Server  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-16
The Role of an FTP Server  . . . . . . . . . . . . . . . . . . . . . . . . . .   4-16
How FTP Works  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4-17
Advantages of PureFTPd Server  . . . . . . . . . . . . . . . . . . . . . .   4-18
Install and Run PureFTPd Server  . . . . . . . . . . . . . . . . . . . . .   4-19
Configure PureFTPd Server . . . . . . . . . . . . . . . . . . . . . . . . . .   4-21
Manage PureFTPd Logs  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4-26
Exercise 4-2 Configure Anonymous PureFTPd Access. . . . . . 4-27
Objective 3 Configure Time on SUSE Linux Enterprise Server 10 . . . . . .4-28
Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4-28
Synchronize Time with netdate and hwclock  . . . . . . . . . . . .   4-32
The Network Time Protocol (NTP) . . . . . . . . . . . . . . . . . . . .   4-35
Synchronize Time with NTP . . . . . . . . . . . . . . . . . . . . . . . . .   4-40
Exercise 4-3 Configure ntpd. . . . . . . . . . . . . . . . . . . . . . . . . . . 4-49
Objective 4 Configure NFS (Network File System) . . . . . . . . . . . . . . . . . .4-50
Exercise
4-4 Set Up and Manage Network File System (NFS) 4-65
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-66
SECTION 5 Create Shell Scripts
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Objective 1 Understand the Course Project. . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Exercise
5-1 Prepare your Environment. . . . . . . . . . . . . . . . . . . 5-6
Objective 2 Use Basic Script Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Exercise
5-2 Create a Basic Shell Script  . . . . . . . . . . . . . . . . . 5-12
Objective 3 Understand Variables and Command Substitution . . . . . . . . .5-13
Exercise
5-3 Use Variables and Command Substitution . . . . . 5-16
Objective 4 Use Control Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-17
Create Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-17
Exercise 5-4 Use an if Control Structure . . . . . . . . . . . . . . . . . 5-21
Create Loops  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-22
Exercise 5-5 Use a while Loop. . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Objective 5 Use Arithmetic Operators  . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27
Exercise
5-6 Use Arithmetic Operators . . . . . . . . . . . . . . . . . . 5-30
Objective 6 Read User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-31
Exercise
5-7 Read User Input. . . . . . . . . . . . . . . . . . . . . . . . . . 5-34
Objective 7 Use Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-35
Exercise
5-8 Use Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-38
Objective 8 Finalize the Course Project  . . . . . . . . . . . . . . . . . . . . . . . . . . .5-39
View Request Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-40
Delete Requests  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-41
Exercise 5-9 Add more Commands . . . . . . . . . . . . . . . . . . . . . 5-44
Objective 9 Use Advanced Scripting Techniques . . . . . . . . . . . . . . . . . . . .5-45
Use Shell Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-45
Exercise 5-10 Use Shell Functions. . . . . . . . . . . . . . . . . . . . . . 5-48
Read Options with getopts . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-49
Objective 10 Learn About Useful Commands in Shell Scripts. . . . . . . . . . .5-51
Use the cat Command  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-51
Use the cut Command  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-51
Use the date Command  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-53
Use the grep and egrep Commands . . . . . . . . . . . . . . . . . . . .   5-54
Use the sed Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-54
Use the test Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-59
Use the tr Command  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5-61
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-63
SECTION 6 Compile Software from Source
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Objective 1 Understand the Basics of C Programming. . . . . . . . . . . . . . . . 6-3
The Difference Between Source Code and an Executable  . . .   6-3
The Structure of a Simple C Program  . . . . . . . . . . . . . . . . . . .   6-5
Compile a Simple C Program  . . . . . . . . . . . . . . . . . . . . . . . . .   6-7
Exercise 6-1 Compile a Simple C Program . . . . . . . . . . . . . . . . 6-9
Objective 2 Understand the Concept of Shared Libraries . . . . . . . . . . . . . .6-10
Objective 3 Understand the GNU Build Tool Chain. . . . . . . . . . . . . . . . . .6-13
Use configure to Prepare the Build Process . . . . . . . . . . . . . .   6-13
Use make to Compile the Source Code . . . . . . . . . . . . . . . . .   6-14
Use make install to Install the Compiled Program  . . . . . . . .   6-15
Install the Required Packages for a Build Environment  . . . .   6-16
Objective 4 Perform a Standard Build Process . . . . . . . . . . . . . . . . . . . . . .6-17
Exercise
6-2 Compile Software from a Source Package . . . . . 6-22
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-23
SECTION 7 Perform a Health Check and Performance Tuning
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Objective 1 Find Performance Bottlenecks. . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Analyze Processes and Processor Utilization  . . . . . . . . . . . . .   7-4
Analyze Memory Utilization and Performance . . . . . . . . . . . .   7-6
Analyze Storage Performance . . . . . . . . . . . . . . . . . . . . . . . .   7-10
Analyze Network Utilization and Performance . . . . . . . . . . .   7-14
Exercise 7-1 Analyze System Performance . . . . . . . . . . . . . . . 7-18
Objective 2 Reduce System and Memory Load . . . . . . . . . . . . . . . . . . . . .7-19
Analyze CPU-Intensive Applications  . . . . . . . . . . . . . . . . . .   7-19
Run Only Required Software . . . . . . . . . . . . . . . . . . . . . . . . .   7-20
Keep Your Software Up to Date  . . . . . . . . . . . . . . . . . . . . . .   7-22
Optimize Swap Partitions  . . . . . . . . . . . . . . . . . . . . . . . . . . .   7-22
Change Hardware Components . . . . . . . . . . . . . . . . . . . . . . .   7-23
Exercise 7-2 Reduce Resource Utilization . . . . . . . . . . . . . . . . 7-26
Objective 3 Optimize the Storage System. . . . . . . . . . . . . . . . . . . . . . . . . .7-27
Configure IDE Drives with hdparm . . . . . . . . . . . . . . . . . . . .   7-27
Tune Kernel Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7-29
Tune File System Access . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7-32
Change Hardware Components . . . . . . . . . . . . . . . . . . . . . . .   7-35
Exercise 7-3 Tune an IDE Hard Drive with hdparm . . . . . . . . 7-36
Objective 4 Tune the Network Performance . . . . . . . . . . . . . . . . . . . . . . . .7-37
Change Kernel Network Parameters  . . . . . . . . . . . . . . . . . . .   7-37
Change Your Network Environment . . . . . . . . . . . . . . . . . . .   7-39
Objective 5 Use Powertweak. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-41
Exercise
7-4 Use Powertweak  . . . . . . . . . . . . . . . . . . . . . . . . . 7-45
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-46
SECTION 8 Manage Hardware
Objectives  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Objective 1 Describe the Differences between Devices and Interfaces  . . . 8-3
Objective 2 Describe how Device Drivers Work  . . . . . . . . . . . . . . . . . . . . 8-4
Objective 3 Describe how Device Drivers Are Loaded  . . . . . . . . . . . . . . . 8-6
Objective 4 Manage Kernel Modules Manually . . . . . . . . . . . . . . . . . . . . . 8-7
Kernel Module Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8-7
Manage Modules from the Command Line . . . . . . . . . . . . . . .   8-8
modprobe Configuration File (/etc/modprobe.conf)  . . . . . . .   8-10
Exercise 8-1 Manage the Linux Kernel Modules. . . . . . . . . . . 8-12
Objective 5 Describe the sysfs File System  . . . . . . . . . . . . . . . . . . . . . . . .8-13
Objective 6 Describe how udev Works . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-16
Understand the Purpose of udev  . . . . . . . . . . . . . . . . . . . . . .   8-16
Understand how udev Works . . . . . . . . . . . . . . . . . . . . . . . . .   8-17
Understand Persistent Interface Names . . . . . . . . . . . . . . . . .   8-18
Exercise 8-2 Add a device symlink with udev . . . . . . . . . . . . . 8-21
Objective 7 Use the hwup Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-22
From Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8-23
From sysfs  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8-25
Exercise 8-3 Explore Hardware Initialization  . . . . . . . . . . . . . 8-27
Objective 8 Obtain Hardware Configuration Information from YaST . . . .8-28
Exercise
8-4 Obtain Hardware Configuration Information . . . 8-29
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-30
SECTION 9 Prepare for the Novell CLP 10 Practicum
Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Objective 1 Install a Xen Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Objective 2 Configure a Web Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Objective 3 Configure a Samba File Server  . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Objective 4 Automate System Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6


CLICK ME to download

No comments:

Post a Comment