Академический Документы
Профессиональный Документы
Культура Документы
Content
Linux History Distributions Linux and Unix Installation System Initialization File system Management Booting Linux Graphical Desktops Command Line
Linux-Administration
Day 1-1
Linux Administration
Unit 1: History
Linux Is Not UniX
Developed by Linus Torvalds 8/25/1991 Based on Minix, a Unix clone
Linux-Administration
Linux router Linux DHCP server Linux Linux print server Application for UNIX clients server Linux-Administration
Linux firewall
Linux DataBase
Day 1-2
Linux Administration
Linux Arduino 5
Day 1-3
Linux Administration
Linux-Administration
www.Kernel.org
Linux was originally written for Intel processors but now supports over 30 processors!
Linux-Administration
Day 1-4
Linux Administration
X11
A powerful networked graphical environment
Developed at MIT, freely distributable X.org - complete implementation of X based on the X11R7.6 standard
Day 1-5
Linux Administration
Hardware Utilization
Linux runs without problems on older computers Linux works well on high-performance modern hardware Linux can run on many embedded systems!
https://openwrt.org http://arduino.org
Linux-Administration
11
Security
Linux supports many security features UNIX security to control access resources Pluggable Authentication Modules (PAMs) Kerberos Firewall protection for the Internet IPsec Hardened shared libraries Downloaded software can be verified for authenticity
IPsec = IP security Linux-Administration 12
Day 1-6
Linux Administration
Low Cost
Linux & most Linux software are free Commercial software for Linux is low cost (or free) Often no need to purchase new hardware Software updates are also free (or low cost) Support by distributors and other organizations available at reasonable cost Enterprise Linux provides the reliability and support of commercial UNIX at a reasonable price
FREE as in FREEDOM!
Linux-Administration 13
Linux-Administration
14
Day 1-7
Linux Administration
Linux-Administration
15
Linux Distrubution
Linux kernel
Debian
Red Hat
SUSE
Day 1-8
Linux Administration
Linux-Administration
17
Red Hat
Red Hat
Worlds leading open source application platform Started as a consumer distribution in NC After 10 years it decided to focus on the enterprise
Fedora (fedoraproject.org)
Updates every 6 months Unsupported, community based
Linux-Administration
18
Day 1-9
Linux Administration
Linux-Administration
19
Provisioning Module
Bare-metal installation, configuration management, & multi-state
Linux-Administration
20
Day 1-10
Linux Administration
Source
CD, DVD, USB drive Network: FTP, NFS, HTTP Kickstart file simplifies similar installs
Linux-Administration 21
Linux-Administration
22
Day 1-11
Linux Administration
Running Commands
Commands have the following syntax:
command options arguments
Arguments data needed by the command (filenames) Multiple commands can be separated by ;
Linux-Administration
24
Day 1-12
Linux Administration
Getting Help
Two important commands: man & info command help Others (x = command): whatis x - short descriptions of command which x displays command location locate x finds a file Program help (F1)
Hands-on Lab 1a
Exploring Linux
Boot from Fedora CD or DVD Login as fedora Select Applications, System Tools, Terminal or start a terminal window by pressing CTRL-ALT-F2)
From command line type: w (or uptime; who) to find who is logged in & server uptime From command line type: dmesg | more to read kernel log
Linux-Administration 26
Day 1-13
Linux Administration
Hands-on Lab1b
From command line type: free to find out about memory utilization From command line type: df h to find out about free disk space on mounted devices From command line type: mount to find out about available mounted devices From command line type: ps ax to display running processes
Linux-Administration 27
Hands-on Lab1c
From command line type: more /etc/inittab to read operating system defaults From command line type: more /etc/fstab to read file system defaults Try the man command for any of the previous commands, or even help to get more detail on the previous commands! Try the GUI tool from Applications, System Tools, System Monitor and look at the different tabs.
Linux-Administration 28
Day 1-14
Linux Administration
Linux Installation
Linux-Administration
29
Day 1-15
Linux Administration
Linux-Administration
31
Bus Support
System & Hot swappable Plug & Play USB Firewire (IEE1394) Older Buses: EIDE, SCSI, PCMCIA, ISA
Linux-Administration
32
Day 1-16
Linux Administration
Laptops, Mobile
Tricky installations Custom bus, Video and/or Sound chipsets Older laptops may be difficult to install Boot from CD, floppy or network URL: www.linux-laptop.net
Linux-Administration
33
Configuring RAID
RAID levels supported
Level 0: striping w/o parity Level 1: disk mirroring Level 5: striping with parity
Linux-Administration
34
Day 1-17
Linux Administration
Linux-Administration
35
Day 1-18
Linux Administration
Linux-Administration
37
Linux-Administration
38
Day 1-19
Linux Administration
Package Selection
GUI: X, KDE, GNOME Servers Tools Programming Multimedia Applications
Linux-Administration
39
System Initialization
BIOS
Boot
Kernel
init
services
Login
Linux-Administration
40
Day 1-20
Linux Administration
BIOS Initialization
Power On Self Test recognizes hardware, CPU, memory, bootable config from CMOS. bootable devices: CD ROM Floppy Hard Drive Network USB devices
Linux-Administration 41
Linux-Administration
42
Day 1-21
Linux Administration
Kernel Initialization
Kernel loads based on parameters passed All logging goes to /var/log/dmesg Detects hardware Loads initrd (if necessary) Mounts root Loads /lib/2.6.x/modules Passes control to /sbin/init
Linux-Administration
43
init Initialization
Init loads scripts from /etc/rc.d init.rc is the master script Based on parameter or /etc/inittab default, it will execute scripts in rc.x All boot scripts live in init.d, can be configured via chkconfig Last script is rc.local
Linux-Administration 44
Day 1-22
Linux Administration
Run levels
Depending on the server usage or situation you may want to start at:
Text (Console) login Graphical login Maintenance mode
Daemon Processes
Run unattended Do not write to console Write via logging facility, usually to /var/log/messages Can be started via service command
service sendmail start service sendmail stop
Linux-Administration 46
Day 1-23
Linux Administration
Linux-Administration
47
Linux-Administration
48
Day 1-24
Linux Administration
Linux-Administration
49
Virtual Consoles
Linux starts with 6 default virtual consoles Alt-F1 to Alt-F6 (or CTRL <- ->) Can have up to 63 consoles
Linux-Administration
50
Day 1-25
Linux Administration
To halt:
shutdown s to halt halt or init 0
Linux-Administration
51
Controlling Services
service servicename function Function: start / stop / restart / status kill PID nice level process GUI: System Tools, System Monitor
Linux-Administration
52
Day 1-26
Linux Administration
Configuring Services
chkconfig servicename function
Function add del list Try: chkconfig list | sort
Linux-Administration
54
Day 1-27
Linux Administration
Hands-on Lab 2
Exploring Linux Boot from Red Hat CD or USB From command line type: dmesg | more to read kernel log From command line type: runlevel to find current run level From command line type: less /etc/inittab to read system defaults
Linux-Administration 55
Linux-Administration
56
Day 1-28
Linux Administration
GUI Components
X Server X Client X Tools GUI Tools Calendar Calculator File Manager
Linux-Administration 57
X Server Overview
Client application Xlib Client (window manager) Xlib
Client application
Linux-Administration
58
Day 1-29
Linux Administration
X Principles
X is considered inappropriate on a server GUI tools can be very useful and convenient An X server manages a physical display Controls who can use the display Controls who can receive events from a display Communicates using the X11 protocol Implements device drivers for drawing and handling mouse and keyboard events
Linux-Administration
59
Linux X Servers
XFree86 implements X11R6
Comes with Slackware and other flavors of Linux Also available for other operating systems XFree86 actually has a separate X server for each display controller type
Day 1-30
Linux Administration
Screen
Linux-Administration
61
Configuring X
Various tools are available for configuring X
xf86config comes with XFree86 but is difficult to use xf86cfg is available on some distributions Red Hat uses redhat-config-xfree86
Linux-Administration
62
Day 1-31
Linux Administration
Network Configuration
Linux-Administration
63
Linux-Administration
64
Day 1-32
Linux Administration
Network Interfaces
lo or dummy 127.0.0.1 eth0, tr0 are aliases to real kernel modules, defined in /etc/modules Network devices can be configured with: system-config-network
Linux-Administration
65
Linux-Administration
66
Day 1-33
Linux Administration
Linux-Administration
67
Multiple NICs
Each card will have its own configuration file Can be enabled/disabled at boot time
Linux-Administration
68
Day 1-34
Linux Administration
Linux-Administration
69
Which contain the IP or DHCP setting, netmask & if device should start at boot
Linux-Administration 70
Day 1-35
Linux Administration
Configuration Utilities
ifup, ifdown system-config-network ifconfig arp nslookup, dig hostname netstat
Linux-Administration 71
DHCP/BOOTP
Dynamic Host Control Program is the newer version of the Boot Protocol A client requests from a server an IP address at boot time If granted, the server provides a lease for the IP address, the netmask, & can provide name server & gateway info
Linux-Administration 72
Day 1-36
Linux Administration
Network Scripts
Allowing User Control of Network Interfaces The ifup & ifdown interface scripts are the only scripts that the user should use to bring up & take down network interfaces
Linux-Administration
73
Linux-Administration
74
Day 1-37
Linux Administration
IP Forwarding
There are kernel variables you can alter to change the way the kernel behaves while its running To configure a Linux computer as a router between networks, you may want to activate IP forwarding with the following command:
# echo 1 >> /proc/sys/net/ipv4/ip_forward
Linux-Administration
75
Generic ipv4
/proc/sys/net/ipv4/icmp_echo_ignore_all /proc/sys/net/ipv4/ip_default_ttl
Linux-Administration
76
Day 1-38
Linux Administration
Name Resolution
Berkley Internet Name Domain (bind) from www.isc.org Server name: named uses /etc/named.conf 4 modes: master, slave, caching-only, forwarding-only
Linux-Administration 77
/etc/hosts.conf
order hosts, bind
/etc/nsswitch.conf
Linux-Administration
78
Day 1-39
Linux Administration
Linux-Administration
79
Summary
Linux History Distributions Linux and Unix Installation System Initialization File system Management Booting Linux Graphical Desktops Command Line
Linux-Administration
80
Day 1-40