1. Trang chủ
  2. » Công Nghệ Thông Tin

RH133 redhat enterprise linux system administration

178 792 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 178
Dung lượng 222,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

 Primary, extended and logical partitions  The default filesystem is ext3  Multiple partitions may be assembled into a larger virtual partitions: software RAID and LVM  Filesystems

Trang 1

Redhat Enterprise Linux System

Administration

Trang 2

Unit 1

 Installation

Trang 3

Hardware Overview

 Kernel Support

 Core support: CPU, Memory, Process

 Management , Interrupt/Exception Handling etc.

 Dynamically Loadable Kernel Modules

 Device Drivers

 Additional Functionality

 User Mode Access to kernel facilities

 System Calls and Signals

 Filesystem Device Nodes

 Network Interfaces

Trang 4

CPU and Memory

 Seven Supported Architectures: x86, Itanium2,

AMD64/EM64T, S/390, zSeries, iSeries, pSeries.

 CPU Support on x86

 Technical support for more than 2 physical CPUs only on

AS variant (may use Hyper-Threading)

 Up to 32 Physical CPUs with SMP or hugemem kernel.

 Memory support on x86

 Technical support for more than 16 GB on AS or WS

 Standard i686/athlon kernel: 4GB

 SMP i686/athlon kernel: 16GB

 Hugemem SMP kernel: 64GB

Trang 5

Preparing to Install

 Read the RELEASE-NOTES file on the first

CD or at http://www.redhat.com

 Check Hardware Compatibility

 Redhat Supported Hardware List

 Hardware compatible with Redhat Linux

 http://hardware.redhat.com/hcl

 XFree86 supported video cards.

 http://xorg.freedesktop.org

http://www.x.org/wiki

Trang 6

Multiboot systems

 Redhat Enterprise Linux and the GRUB boot

loader can co-exist with other operating systems, including the following:

 Windows NT/2000/XP/2003

 DOS, Windows 3.x/9x/ME

 NetBSD, FreeBSD and other open systems.

 Two major issues arise when implementing

multiboot systems:

 Partitioning and the boot process.

A boot loader such as System Commander or

NTLDR is already on the system and will launch

GRUB as a secondary boot loader.

Trang 7

Device Node Examples

 Block devices:

 hd[a-t] IDE devices

 sd[a-z]+ SCSI devices

 fd[0-7] Standard floppy drives

 md[0-31] software RAID metadisks

 loop[0-15] loopback devices

 ram[0-9] ramdisks

 Character Devices:

 tty[0-31] virtual consoles

 ttyS[0-9]+ Serial ports

 lp[0-3] Parallel Ports

 null infinite sink ( the bit bucket)

 zero infinite source of zeros

 [u]random sources of random information

 fb[0-31] framebuffer devices

 Symbolic Links:

/dev/cdrom - - > /dev/hd[a-t], /dev/sd[a-z]+

Trang 8

The RHEL Installer

 First Stage Installer Images

 diskboot.img – VFAT filesystem image for

bootable media larger than a floppy

You will need to use the dd command to move this image to you media For

instance:

dd <diskboot.img > /dev/sda

 Floppy installation is no longer supported

 boot.iso ISO9660 bootable CD image

 Booting form boot.iso is the same as passing the askmethod argument to the installer when booting from CD 1.

You can create a bootable CD using the cdrecord command For instance

cdrecord dev=/dec/hdc boot.iso

Trang 9

Installer Features

noprobe and Kickstart modes available

mediacheck tests media integrity

 Multiple Interfaces:

 Graphical

 Starts X server and a GUI installer

Can be started in lowers mode.

 Works with hard drive, CDROM, NFS Installation

 Graphical is the default

 Text

Menu-based terminal interface

Trang 10

RHEL Installation Overview

 Language, Keyboard and mouse selection

 Media selection if applicable

Trang 11

Partitioning Hard Drives

 Hard drives are divided into partitions

 Partitions normally contain file systems

 Primary, extended and logical partitions

 The default filesystem is ext3

 Multiple partitions may be assembled into a larger virtual partitions: software RAID and

LVM

 Filesystems are accessed via a mount

point, which is a designed directory in the

Trang 12

Software RAID

 Redundant Array of Inexpensive Disks

 Multiple partitions on different disks combined into one RAID device

 Fault tolerance, larger disk size, performance

 Install-time RAID levels:

 RAID 0: Striping (no redundancy)

 RAID 1: Mirroring

 RAID 5: Striping with distributed parity

Trang 13

Configuring File Systems

 Must select mount points, partition sizes, and file system types in the installer

 Can set up manually or automatically

 There are many layouts which may be

used

 / mast include /etc, /lib, /bin, /sbin, /dev

 Swap space is typically 2x physical RAM

 Typical mount points: /boot, /home, /usr, /var, /tmp, /usr/local, /opt

Trang 15

LVM: Logical Volume Manager

 Manages storage on one or more

partitions as virtual partitions, or logical volumes

 Real partitions are physical volumes and are assigned to a volume group (a virtual disk)

 Disk space in the volume group is divided into extends which are assigned to a logical volume

 Easy to resize logical volumes

 Add a physical volume to the volume group

and assign the new extents to the logical

Trang 16

 “Trusted Devices” can bypass the firewall

 Can allow access to arbitrary services

Trang 17

Security Enhanced Linux

 Access control determines what actions

processes can perform on what objects

 Discretionary Access Control (Traditional Linux)

 Users control permissions on objects

 Mandatory Access Control (SELinux)

 System policy restricts permission which can be granted.

Trang 18

SELinux Installation Options

Trang 21

noprobe Mode and Driver Disks

 Method for supporting hardware newer than the install program

 Used at install time for less common

hardware

 Prompt for Driver Disk

 When run in noprobe mode

 When started with: linux dd

 When no PCI devices are detected.

Trang 22

Post-Install Configuration

 Setup Agent (firstboot)

 Configure X window System if necessary

 Set date and time

 Register with Redhat Network and get updated RPMs

 Install additional RPMs or Redhat

Documentation from CDROM

 Setup users

 system-config-* configuration tools

Trang 23

Unit 2

 System Initialization and Services

Trang 24

Boot Sequence Overview

Trang 25

BIOS initialization

 Peripheral detected

 Boot device selected

 First sector of boot device read and executed

Trang 26

Boot Loader Components

 Boot Loader

 1 st Stage – small, resides in MBR or boot sector

 2 nd Stage – loaded from boot partition

 Minimum Specifications for Linux:

 Label, kernel location, OS root filesystem and Location of the initial ramdisk (initrd)

 Minimum specification for other OS:

 Boot device, label

Trang 27

GRUB and grub.conf

 GRUB – The Grand Unified Bootloader

 Command-line interface available at boot prompt

 Boot from ext2/ext3, ReiserFS, JFS, FAT, minix, or FFS filesystems

 Support MD5 password protection

 /boot/grub/grub.conf

 Changes to grub.conf take effect immediately

 If MBR on /dev/had is corrupted, reinstall the first stage bootloader with:

/sbin/grub-install /dev/hda

Trang 28

Starting the Boot Process: GRUB

 Image selection

 Select with space followed by up/down arrows

on the boot splash screen

 Argument passing

 Change an exiting stanza in menu editing

mode

 Issue boot commands interactively on the

GRUB command line

Trang 29

init Initialization

 init reads its config: /etc/inittab

 Initial run level

 System initialization scripts

 Run level specific script directories

 Trap certain key sequences

 Define UPS power fall/restore scripts

 Spawn gettys on virtual consoles

 Initialize X in run level 5

Trang 30

Kernel Initialization

 Kernel boot time functions

 Device detection

 Device driver initialization

 Mounts root filesystem read only

 Loads initial process (init)

Trang 31

 Important tasks include:

 Activate udev and selinux

 Sets kernel parameters in /etc/sysctl.conf

 Sets the system clock

 Loads keymaps

 Enables swap partitions

 Sets hostname

 Root filesystem check and remount

 Active RAID and LVM devices

 Enable disk quotas

Trang 32

System V run levels

 Run level defines which services to start

 Each run level has a corresponding directory

Trang 33

Daemon Processes

 A daemon process is a program that is run

in the background, providing some sytem service

 Two types of daemons:

 Standalone

 Transient – Controlled by the “Super-daemon”

xinetd

Trang 35

 Run after the run level specific scripts

 Common place for custom modification

 In most cases it is recommended that you create a System V init script in

 /etc/rc.d/init.d unless the service you are starting is so trivial it doesn’t warrant it Existing scripts can be used as a starting point

Trang 36

Virtual Consoles

 Multiple independent VT100-like terminals

 Defined in /etc/inittab

 Accessed with Ctrl-Alt-F_key from an X session

 /dev/ttyn: virtual console n

 /dev/tty0: the current virtual console

 Default RedHat Enterprise Linux Configuration

 12 consoles defined

 Consoles 1-6 accept logins

 X server starts on the first available console, usually 7.

Trang 37

Controlling Services

 Utilities to control default service startup

and X interface

consoles

works well and is usable with scripts and Kickstart

installations

 Utilities to control services manually

chkconfig: immediately starts and stop

Trang 39

System Reboot

 Rebooting rarely fixes problem in Linux

 If you feel a reboot is necessary try bringing

the system down to runlevel 1 and the back up

to runlevel 3 or 5 This is much faster than a reboot.

 Rebooting the system:

 shutdown –r now

 reboot

 init 6

Trang 40

Unit 3

 Kernel Services and Configuration

Trang 41

Kernel Modules

 Modular kernel components

 Components that need not be resident in the kernel for all configurations and hardware

 Peripheral device drivers

Trang 42

Kernel Module Configuration

 Module examination: /sbin/modinfo

 Parameters, license

 Module Configuration: /etc/modprobe.conf

 Aliases, parameters, actions

 Module Dependencies: modules.dep,

depmod

 Manual control: insmod, rmmod

Trang 43

The /proc filesystem

 /proc is a vital filesystem containing

information about the running kernel

 Contens of “files” under /proc may be

viewed using cat

 Example

 cat /proc/interrupts

 Provides information on system hardware, networking settings and activity, memory

Trang 44

The /proc filesystem, cont’d

 /proc subdirectories

 The /proc/sys subdirectory allows administrators to modify certain parameters of a running kernel

Trang 45

/proc/sys configuration with sysctl

 /proc/sys modifications are temporary and not saved at system shutdown

 The sysctl command manages such

settings in a static and centralized fashion:

 /etc/sysctl.conf

 sysctl is called at boot time by rc.sysinit

and uses setting sin /etc/sysctl.conf

Trang 46

General Hardware Resources

 dmesg and /var/log/dmesg

Trang 47

System Bus Support

Trang 48

Hotswappable Bus Support

 USB and IEEE 1394 Buses

 /sbin/hotplug, (/etc/hotplug/)

 Information in /proc/bus subdirectories

 /sbin/lsusb and /sbin/usbmodules utilities

 USB devices in /dev/usb

 PCMCIA Bus

 /sbin/cardmgr, (/etc/pcmcia/)

 Information in /proc/bus/pccard

 /sbin/cardctl utility

Trang 49

System Monitoring and Process Control

 top, gnome-system-monitor  display

snapshot of processes

 ymstat – reports virtual memory stats

 iostat – lists information on resource

usage, including I/O statistics

 free – summary of system memory usage

 renice – change priority of a process

 kill – send system signal to a process

Trang 50

Unit 4

 Filesystem Management

Trang 51

System Initialization: Device

Recognition

 Master Boot Record (MBR) contains:

 Executable code to load operating system

 Space for partition table information,

including:

 Partition id and type

 Starting cylinder for partition

 Number of cylinder for partition

Trang 52

Disk Partitioning

 An extended partition points to additional partition descriptors

 Total maximum number of partitions

supported by the kernel:

 63 for IDE drives

 15 for SCSI drives

 Why partition drives?

 Containment, performance, quotas, recovery

Trang 53

 Partprobe – reinitializes the kernel’s in

memory version of the partition table

Trang 54

Managing Data: Filesystem creation

Trang 55

Journaling for ext2 filesystems: ext3

 ext3 is essentially an ext3 filesystem that uses a journal for file transaction

automatically

 ext3 filesystems can be created natively or easily converted from ext2

 Ext3 has three journaling modes:

 Ordered – the default, journals only meta-data

 Journaled – Journals data as well as meta-data

 Writeback – Journals updates are not

Trang 56

Managing data: mount

 mount [options] [device] [mount_point]

 device (or filesystem label) points to the filesystem to mount

 mount_point is the directory under which the files on the filesystem will be located

Trang 57

Managing Data: mount options

 -t vfstype (vfat, ext2, ext3, iso9660, etc.)

 Not normally needed

 -o options

 Default options for the ext2/ext3 filesystem:

 rw, suid, dev, exec, auto, nouse, and async

Trang 58

Managing Data: Unmounting

Filesystems

 A filesystem “in use” may not be

unmounted

Use fuser to check and/or kill processes

 Use the remount option to change a

mounted filesystem’s options

“automatically”

 mount –o remount,ro /data

Trang 59

Managing Data: Filesystem Labels

 Alternate way to refer to devices

 Device independent

 e2lable <special_dev_file>

 mount [options] LABEL=fslabel mount_point

Trang 60

Managing Data: mount, by example

 Sample filesystem requirements met using options:

 Disabling execute access

 Mounting a filesystem image

 Mounting a pc-compatible filesytem.

 Disabling access time updates.

 Setting up a mount alias

Trang 61

Managing Data: Connecting Network Resources

 Mounting NFS resources

 Requires hostname or address of server

 Requires name of exported directory

 Mounting SMB resources

 Requires hostname and address of server

 Requires share name

 May require username and password

Trang 62

Managing Data: /etc/fstab

 Configuring of the filesystem hierarchy

 Used by mount, fsck, and other programs

 Maintains the hierarchy between system reboots

 May use filesystem volume labels in the device field

Trang 63

Managing Data: The auto-Mounter

 System administrator specifies mount

points to be controlled by the automounter daemon process

 The automounter monitors access to these directories and mount the filesystem on

request

 Filesystems automatically unmounted after

a specified interval of inactivity

 Enable /etc/auto.net to “browse” all NFS

Trang 64

ext2/ext3 Filesystem Attributes

 ext2 and ext3 support attributes that

affect the manipulation of the file data

 lsattr display file attributes

 chattr changes file attributes

 Some attributes are not currently supported by the Linux kernel.

Trang 65

Virtual Memory

 Swap space is supplement to system RAM

 Basic setup involves:

 Create swap partition or file

 Write special signature using mkswap

 Add appropriate entries to /etc/fstab

 Activate swap space with swapon -a

Trang 66

Filesystem Maintenance

 Maintaining consistency with fsck

 Filesystems checked at boot up

 sulogin session started if errors are sever

Trang 67

 Verify with fdisk –l and cat /proc/partitions

 Create filesystems for new partitions, or

 Write signature to new swap partitions

 Optionally create disk label

Create any needed mount points

Trang 68

Unit 5

 Network Configuration

Trang 69

Device Recognition

 All drivers for network interface cards are built as module

 Networking scripts reference logical

interface names, eg:

 eth0

 /etc/modprobe.conf maps logical names to specific module name

 Example:

Trang 72

ifconfig

 Used to configure and set IP address on network interfaces

 Not Usually called directly, but by other scripts

 Also used to view properties of active and inactive network interfaces

Trang 73

 if (up | down) interface

 Start and Stop network interfaces

 Take care of details specific to interface

 Changing/adding/deleting routes

 Obtains addresses as needed

 BOOTP, DHCP

Ngày đăng: 18/10/2014, 16:24

TỪ KHÓA LIÊN QUAN