Red Hat System Administrator I
Total Page:16
File Type:pdf, Size:1020Kb
RED HAT SYSTEM ADMINISTRATOR I Written by Arthur Berezin 054-2266463 [email protected] Red Hat System Administrator I Written by Arthur Berezin 054-2266463 [email protected] Unit One GNOME DESKTOP Gnome gedit Written by Arthur Berezin 054-2266463 [email protected] GNOME ● GNOME is default graphical environment ● Lets you use your mouse and keyboard ● Includes integrated apps ● Nautilus File Manager ● Gedit Text Editor ● and many more... Written by Arthur Berezin 054-2266463 [email protected] GNOME ● Panel ● Applet ● Work Space Written by Arthur Berezin 054-2266463 [email protected] GNOME Switch workspace with keyboard ctrl + alt + [ Left Arrow | Right Arrow] or ● Switch Work Space Written by Arthur Berezin 054-2266463 [email protected] GNOME ● Linux is knows for it's Command Line ● Why graphical Environment ? ● Some things are easier ● Useful to understand differences ● Support users as Sysadmin ● The command line is very important Written by Arthur Berezin 054-2266463 [email protected] Password ● Regular User Requirements: ● Must have 6 chars ● Must not be based on dictionary word ● Must be complex (Chars, Caps, Nums) ● User root may set any password ● To himself ● Any other user Written by Arthur Berezin 054-2266463 [email protected] Password ● Change Password Using GUI ● Or # passwd in Bash Written by Arthur Berezin 054-2266463 [email protected] Text Configuration Files ● Linux basic design principle ● Easier for humans ● Simple editor can fix problems ● Most programs use text configuration files Written by Arthur Berezin 054-2266463 [email protected] gedit ● Graphical tool for editing text files ● Command Line Editors: ● vi ● vim ● nano Written by Arthur Berezin 054-2266463 [email protected] Unit Two MANAGE FILES Nautilus Remote Storage Written by Arthur Berezin 054-2266463 [email protected] Nautilus ● Gnome file manager ● Explore file-system ● View file properties ● Manipulate files – Copy, Delete, Move,Cut, Paste.. ● Applications > System Tools > File Broser Written by Arthur Berezin 054-2266463 [email protected] Nautilus ● Default view: Spatial mode ● Open folders in new windows ● May be changed to Browser Mode – System > Preferences > File Managment ● Behavior > Always Open In Browser Windows Written by Arthur Berezin 054-2266463 [email protected] Written by Arthur Berezin 054-2266463 [email protected] Nautilus ● Allows access to remote systems ● FTP ● Windows Shares ● SSH (remote login) ● NFS (Network File-system) Written by Arthur Berezin 054-2266463 [email protected] Nautilus ● Nautilus tips: ● List View [ View > List | CTRL + 2 ] ● Hidden Files – Name begins with (.) period – View > Show Hidden Files ● Drag and Drop – Same Partition: Move – Different Partition: Copy ● Command Line: ls(List), mv(Move),cp(Copy), mkdir Written by Arthur Berezin 054-2266463 [email protected] Nautilus ● Nfs shares withWritten autofs by Arthur Berezin in /net/host 054-2266463 [email protected] Unit Three GETTING HELP Local Documentation On-Line Red Hat Documentation Getting most from Support Written by Arthur Berezin 054-2266463 [email protected] Local Documentation ● Man pages ● Most commonly used ● Documenting commands and configuration files ● Decided into chapters ● GNU Info ● Hypertext books ● Gnome help system ● For desktop environment ● Hypertext books Written by Arthur Berezin 054-2266463 [email protected] Gnome Help Browser Written by Arthur Berezin 054-2266463 [email protected] GNU Info ● To access open GNOME help browser ● Go to > GNU Info Pages ● Search info:[node name] – For example info:GRUB Written by Arthur Berezin 054-2266463 [email protected] Man pages ● On GNOME help Brewser ● Search man:man-page ● Same items on different pages can appear ● Specify chapter ● Man:passwd(5) ● Command Line: man, info ● More documentation in /usr/share/doc Written by Arthur Berezin 054-2266463 [email protected] On-Line Red Hat Documentation ● Documentation ● Http://access.redhat.com/docs – Release notes – Installation Guide – Migration Planing Guide – Deployment Guide – ● Customer Portal ● Bunch of info ● Knowledge-base Written by Arthur Berezin 054-2266463 [email protected] Getting most from Support ● Define the problem, how to reproduce? ● Do your homework ● Documentation ● k.bases ● Background info ● Software versions ● Diagnostics Info ● Sosreprot collects logs and conf. files Written by Arthur Berezin 054-2266463 [email protected] Unit Four LOCAL SERVICES The root User System Clock Print Queue Print Jobs Written by Arthur Berezin 054-2266463 [email protected] Role of user: root ● User root is the superuser ● Has all power over the system ● Has power to override normal privileges ● install, remove, software, Manage configuration ● Most devices controlled by root ● Exeption: USB Written by Arthur Berezin 054-2266463 [email protected] Role of user: root ● “With Great Power Comes Great Responsibility” Stan Lee ● Unlimited power to damage the system ● We will use normal user, and gain power when needed ● Command: su substitute user ● Command: sudo execute command as another user Written by Arthur Berezin 054-2266463 [email protected] System Clock ● Network Time Protocol (NTP) ● Time synchronization Protocol ● Makes the seconds shorter if it rushes ● Reduces time differences between systems ● Recomended to have at least three NTP servers Written by Arthur Berezin 054-2266463 [email protected] System Clock Written by Arthur Berezin 054-2266463 [email protected] Printers ● Common Unix Priniting System (CUPS) ● Locally or network ● Supports IPP, LPD(Linux Printer Daemon) and Microsoft Shared Printers Written by Arthur Berezin 054-2266463 [email protected] Printers ● Each printer has one or more queues ● Print job is sent to a queue ● System Administrator sets a printer ● System > Administration > Printing ● Web interface TCP port 631 ● Http://localhost:631 ● Http://localhost:631/help ● Man: man system-config-printer(1) Written by Arthur Berezin 054-2266463 [email protected] Unit Five BASH Bash Syntax Using Bash Launching graphical commands as root Written by Arthur Berezin 054-2266463 [email protected] Introduction to Bash ● Shell Command Line Interface ● Bash – Red Hat Default Shell ● Bash – “bourne again shell” ● Improved version of old unix bourne shell(sh) ● Looks like windows cmd.exe Written by Arthur Berezin 054-2266463 [email protected] Using Command Line ● Application > system tools > Terminal ● right click on the desktop > Open Terminal ● Prompt line ● Current user ● Short hostname ● Directory ● $ for normal user ● # for superuser Written by Arthur Berezin 054-2266463 [email protected] Using Command Line ● Command line usually have three basic parts ● Command ● Options – One dash for short (-a) or two for full option name (--all) ● Arguments ● # df -h /home ● --help for syntax Written by Arthur Berezin 054-2266463 [email protected] Using Command Line ● Conventions ● [ ] is optional ● ... is N times ● | choose any of the options ● <> variable Data – <FILENAME> for example ● Man is your friend, man bash Written by Arthur Berezin 054-2266463 [email protected] Using Bash ● #passwd ● # id ● # su [ - ] username ● -c for single command (similar to Run As.) ● # exit Written by Arthur Berezin 054-2266463 [email protected] Useful Features ● Tab Completion ● Allows quickly complete commands ● History ● !<> Written by Arthur Berezin 054-2266463 [email protected] Launching Graphical Tools from bash ● Command & ● CTRL + c Cancel ● CTRL + z Background ● # jobs – running commands ● # fg - bring to front ground Written by Arthur Berezin 054-2266463 [email protected] Unit Six MANAGE STORAGE I PC Storage Model Determine Disk Usage Manage Virtual Guests Create a New File System Written by Arthur Berezin 054-2266463 [email protected] Partitions ● Hard disks are split into partitions (IBM) ● Each partitions has a file system ● Each partitions can be used for a different purpose ● Example: home partition, system partition Written by Arthur Berezin 054-2266463 [email protected] Master Boot Record ● RHEL(Red Hat Enterprise Linux) and Windows use Master Boor Record partitioning system ● This backs to IBM PC (early 80's) Written by Arthur Berezin 054-2266463 [email protected] Master Boot Record ● MBR is the first Sector of the Hard Disk (512 bytes) – First 446 is part of the Boot Loader – Last 64 is the Partition Table Written by Arthur Berezin 054-2266463 [email protected] Partition Table ● Has room for 4 primary partitions ● Contains info on each partition – first sector – Last sector – Code that indicates information type(fs, lvm..) ● If more needed one is used as extended partition ● Divided into logical partitions Written by Arthur Berezin 054-2266463 [email protected] Written by Arthur Berezin 054-2266463 [email protected] Disk Utility ● Graphical utility to easily manage disk partitions ● List available devices, Disk Partitions, Info ● Allows to re-partition the disk ● Application > System Tools > Disk Utility Written by Arthur Berezin 054-2266463 [email protected] Disk Utility ● Allows to create new partitions ● Partitions must be formated ● Standard system uses EXT4 filesystem ● To use filesystem we need to mount it Mount -t <filesystem type> <device> <Mount Point> ● Mount point – empty directory ● When mounted the filesystem can be view as content of the directory ● This is called “Mounting file-system on mount-point” Written by Arthur Berezin 054-2266463 [email protected] /etc/fstab ● Text file lists all mounted partitions on boot ● Can be edited