150 likes | 421 Views
Introduction to System Administration. Job of system administration. accounting, monitoring ... run out of system resource. hardware failure/incompatible. filesystem ...
E N D
Slide 1:Computer System Administration Instructor: J.T. Yang (jjyang@csie.nctu.edu.tw)
Slide 2:Introduction to System Administration Job of system administration
accounting, monitoring
resource management & planning
software & hardware installation
programming, negotiation, consulting
super user
su, su root -c CMD, and sudo
communication with users
write, wall, /etc/motd, pre-login message in /etc/issue 1. su philosophy....
2.1. su philosophy....
2.
Slide 3:Introduction to System Administration (c.1) system adminstration tools
AIX(SMIT, VSM)
IRIX(Cadmin facility)
HP/UX(SAM)
Solaris(admintool)
Linux
xadmin in Linux-FT distribuiton
control-panel in Yggdrasil dist.
Caldera Network Desktop. (RedHat dist.)
3rd-party commercial product
Slide 4:UNIX Concept-- Files ownership and modes
owner, group, other
read, write, execute
setuid, setgid, sticky, file locking
chown, chgrp, chmod
Advance problems
umask
setgid attribute on directories
sticky attribute on directories
setuid attribute on files
setgid attribute on files
Slide 5:UNIX Concept -- Files (c.1) Type and attributes of files
inode -- store attribute and location of all files
regular file, directory, links, socket, named pipe, char/block device
(ls -F) * / @ = |
(ls -l) - d l s p c b
‘file’ commands
tell file formats in files, such as OBJ, EXE, text file, nroff, ...
/etc/magic
Slide 6:UNIX Concept-- Process interactive process
job control of shells&, ^Z, jobs, %n, fg, %?str, bg, kill, ~^Z, ~~^Z, ~~~^Z, ...
batch process
daemon process
Process attributes
PID, PPID, Nice number
RUID, EUID, RGID, EGID
setuid( getuid() )
Slide 7:UNIX Concept-- Processes (c.1) Life cycle of process
fork, exec, vfork.
‘ps’ commands
ps -ux, ps -aux, ps -auxwwe
ps -elf
kill commands
SIGTERM, SIGHUP
SIGUSR1, SIGUSR2
renice commands
Slide 8:UNIX Concept -- Devices (c.1) block and character devices
major, minor
disk naming convention
p55. Fig 2-5
common device names
P55, Table 2-6
floopy, tape driver, cdrom
tty, /dev/null, /dev/zero
/dev/MAKEDEV
find device information
sysinfo, dmesg, ioscan(hp), lscfg(AIX), ...
Slide 9:UNIX FAQ for users deleting a special file?
refer to UNIX FAQ at course home page
Slide 10:Essential commands man, man -k
sort, uniq, wc
grep, awk, egrep
regular expression
find
type, name, perm, mtime, print
ok, exec
head, tail, sed
xargs, tar, zip, gzip,GNU bin utilities
shell programming
sh, csh, perl
Slide 11:Chapter. 2Startup and Shutdown UNIX boot process
boot process for PC
boot single user
password protection
boot multiuser
System V Run Level (p.90, p111)
0: shutdown, S: single user
2,3 : multiuser
6: rebooting
boot message
Slide 12:Startup and Shutdown (c.1) Initialization process and startup scripts
preliminaries
preparing filesystem
fsck, mount /, mount local disk,
saving crash dump, start paging,
security related activity, check quota
starting server and local subsystem
networking
house keeping
allow users to login
Slide 13:Startup and Shutdown (c.2) Initialization files
SunOS 4.1.x
/etc/rc.boot
/etc/rc.single
/etc/rc
/etc/rc.local
System V
/etc/rcN for V3, /sbin/rcN for V4
/etc/init.d and /etc/rcN.d
Startup: level 0 --> level 2
Shutdown: level 6
Slide 14:Startup and Shutdown (c.3) Shutdown and reboot
(BSD)sync; sync; sync; shutdown -h -t 5 now “shutdown now....”
(SysV) shutdown -g n -I level -y
0, 1, S, 5, 6 (power off, admin, single user, monitor, reboot to initdefault)
reboot, halt
Abort shutdown, Fake shutdown
Power failure shutdown
Slide 15:Startup and Shutdown (c.4) Trouble shoot for system crash
Don’t Panic...
run out of system resource
hardware failure/incompatible
filesystem failure
system integration error