Top Banner
33

Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Jan 12, 2016

Download

Documents

Marybeth Ford
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.
Page 2: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Week Twelve Agenda• Announcements

Advise your proctor to verify that the faxed final exam was transmitted successfully

Grade submission is December 23 • Link of the week• Review week eleven lab assignment• Week eleven expected outcomes• Next lab assignment• Break-out problems• Upcoming deadlines• Lab assistance, questions, and comments

Page 3: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Link of the week• Domain name registration Web site

https://www.pairnic.com/services.html?gclid=COXiuLv6mI0CFSCTWAod81M57A

• Determine if a domain is currently in use.http://www.pair.com/

• What is a domain name?

• What is the function of the Domain Name System?

• BIND (Berkley Internet Name Domain)

• What is meant by top level domain?

Page 4: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Link of the weekTop Level Domain (TLD)

• gov – Government• edu – Educational• org – Organizations (nonprofit)• mil – Military• com – Commercial business• net – Network organizations• ca – Canada• th - Thailand

Page 5: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentSystem Initialization

The /etc/inittab runlevel field format:id:runlevels:action:process

/etc/inittab file 1:2345:respawn:/sbin/mingetty tty 1

/etc/profile file Basic setup for all users

$HOME/.profile User preferred environment

Use the ls –a command to display the .profile file under your $HOME directory.

Use the printenv or env commands to display environment variables.

Page 6: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignment

Metadata

Metadata is data about data. It may describe a single piece of data or multiple content items and hierarchical levels.

There are many different types of metadata.

Business Intelligence metadata

General IT metadata

IT metadata management products

File system metadata

Image metadata

Page 7: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentUser Initialization

The $HOME/.profile file in your home directory is a collection of shell commands that are executed whenever you login. The $HOME/.profile file is used to set the users environment variables and shell options. PATH – this a variable used to search for executables

- adding a directory to the PATH variablePATH=$PATH:.PATH=$PATH:$HOME/binexport PATH

-setting up promptsPS1=‘$PWD>’ (primary prompt)PS2=‘>’ (secondary prompt)

- setting up variablesTERM=vt100EDITOR=vi

- other settings – set –o viexport PGPATH=/opt/postgresql-7.2.1/bin

Page 8: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentDemonstrate

Command to display available shells on system cat /etc/shells

Command to display current shell being utilized echo $SHELL

Command display current file and directory default setting.

umask umask -S

Page 9: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentLinux runlevels:

0 - halt (Do NOT set initdefault to this)1 - Single user mode2 - Multiuser, without NFS (The same as 3, if you do not have networking)3 - Full multiuser mode4 - unused5 - X116 - reboot (Do NOT set initdefault to this)

The runlevel may contain multiple characters for different runlevels.

1:23:respawn:/sbin/mingetty tty1 2:23:respawn:/sbin/mingetty tty2

3:23:respawn:/sbin/mingetty tty3 4:23:respawn:/sbin/mingetty tty4

Page 10: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignment/etc/inittab actionsrespawn – The process will be restarted whenever it

terminates.wait – The process will be started once when the

specific runlevel is entered.once – The process will be executed once when the

specific runlevel is entered.boot – The process will be executed during system

initialization.initdefault – This entry specifies the runlevel which

should be entered after system boot.sysinit – The process will be executed during system

boot. It will be executed before any boot or bootwait entries.

Page 11: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignment/etc/inittab actionspowerwait – The process will be executed when the

power goes down.powerokwait – This process will be executed as soon as

init process is informed that the power has been restored.

powerfailnow – This process will be executed when the init process is informed that the battery of the external UPS power is failing.

ctraltdel – The process is executed when the init process receives the SIGINT signal. This means that someone on the system console has pressed the Ctrl-Alt-Del key combination.

Page 12: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignment

UNIX-like commands:

ps –s (view zombie processes)

ps –x (view only active processes)

ls –a (view “.” processes)

ps aux | grep crond (view crond executing)

nice (execute with modified scheduling priority)

ps ax | less (display STAT of processes)

umask (display umask .profile setting)

umask –S (displays umask symbolic values)

fg (Resume jobspec in the foreground, and make it the

current job)

bg (Resume the suspended job jobspec in the background, as if it had been started with &)

Page 13: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentUnix/Linux Processes

Linux defines a unit of work as a task or process.UNIXdefines a unit of work as a process.

Each process is identified by a unique PID.Each process is started from a previous process using the fork and exec

command. The init process is created by the kernel using a non-traditional procedure

called hand-crafted or spontaneous.

Background processes run with a relatively low priority, require little or no input, and generate a minimum of output. Background process is unlike with a foreground process, the shell does not have to wait for a background process to end before it can run more processes. Background jobs are run at a lower priority compared to foreground jobs.

Foreground process is one that can show the user an interface, through which the user can interact with the program. The user must wait for one

foreground process to complete before running another one.

Daemon processes offer services like web pages serving, email transferring, time synchronization, and similar. They usually consume little CPU and memory, and run quietly without user interaction. They mainly communicate with other computer programs, or with other computers via network.

Page 14: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentNon-Inherited Process Attributes

File locks

Resource utilization of a child process are set to zero

Pending signals

inode is a data structure on the traditional UNIX file system.

Each file has an inode and is identified by an inode number (often referred to as an "i-number" or "inode") in the file system where it resides.

On many file system types the number of inodes available is fixed when the filesystem is created, giving a maximum number of files the file system can hold. Typically when a file system is created about 1% of it is devoted to inodes.

Page 15: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentcron is the periodic event scheduler of your system. The following examples give you

an idea of its usefulness and necessity.• regular daily backups• periodic mail checking • polling a device for input • sending regular reports• sends user email every time a cron function is performed

cron file locations/etc/crontab/etc/cron.deny /etc/cron.allow

Typical directory configuration/etc/cron.d/hourly /etc/cron.d/daily /etc/cron.d/weekly /etc/cron.d/monthly

The crond executes every minute.

Page 16: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignment Disable email

0 * * * * echo “Email Sent” 2>&1 /dev/console

• Demonstrate the crontab entries and /var/mail/dandrear file• Who can use the crontab commands (create, list, edit or remove)?

• Each line of CRONTAB has the following structure:<Minute> <Hour> <Day> <Month> <Day of Week> <Command line>There are a total of 6 fields in the crontab file

# This is a comment. * * * * * c:\tools\CheckForNewFiles.exe

• The “*” character represent all values for a particular position in the crontab record.

• A single integer matches the exact value of the position.

• A comma separated list of integers, like 1,2,3 will match one of the listed values. This is typical for different run levels.

Page 17: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentcrontab format:

* * * * * command to be executed

crontab values:Field Valueminute 00-59hour 00-23 (military time)day 1-31month 1-12weekday 0-6 (0=Sunday)

Example records:30 5 11 12 * “Welcome to Franklin University”

30 * * * * “Unix Administration”

Page 18: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignmentcrontab restrictions

If your name appears in the cron.allow file. If that files doesn’t exist, you can use crontab.

If your name does not appear in the cron.deny file. If cron.deny exists and is empty, all users can use crontab.

If neither file exists, only the root user can use crontab.

Personalized crontab files are normally allowed for system users.

crontab command without options

Read standard input

Exit using “Control C” so that the existing crontab is unmodified.

Exit using “Control D” will cause the current users’ crontab to be replaced with no information.

Page 19: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Review week eleven lab assignment

Demonstrate the following:

Create a crontab entry

Make the command a simple shell function.

Monitor the /var/mail/dandrear file using the tail command

(tail –f /var/mail/dandrear)

Page 20: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Week ten, eleven, and twelve expected outcomes

• Upon successful completion of this module, the student will be able to:

Manipulate user accounts. Describe how cron is used to invoke repetitive processes. Manipulate process structure including:

a. fork and exec, b. Initialization process, c. Background/foreground, d. PS tool.

Explain basic UNIX security issues. Describe disk and file system structure. Use backup and restore archival operations on a system. Establish network services. Investigate the structure of the LDAP directory using LDAP commands.

Page 21: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next lab assignment• Copy-on-Write

It is an optimization strategy for multiple users can give the same pointer for a resource. The primary advantage is that if a caller never

makes any modifications, no private copy is needed.

Use:

Virtual memory operating systems pages in memory that might be modified by either the process or its copy are marked copy-on-write.

Page 22: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next lab assignment• Network Services

A variety of services available across a networkNFSRemote login Utilize a Web browser

All network services rely on the ability to convert a host or domain name to an IP address.

DNS are complex. The number of host names and IP addresses in the Internet is very large.

DNS Local contains actual translations for the machines in its local network

DNS Global contains more information about translations.

A single translation could involve several DNS before resolving the IP address.

Page 23: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next Lab Assignment• UNIX/Linux file system is contained under the

root directory denoted by a slash “/”.• Users don’t have to worry about the physical

locations of files.• The system administrator must be familiar

with mounting and un-mounting storage space (/mnt).

• NIS+ (Network Information Service) is a directory service.

Page 24: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next Lab Assignment• What is the functionality of Network File System (NFS).• Security on UNIX systems

Files, directories, PATH variable, password authenication, uucp commands

One-way function

Super BlockContains information about each mounted file system.The actual data structure in Linux is called struct

vfsmount.Information held is mount flags, mount time, device name, pointer to super block and device block size.The Linux 2.0 kernel keeps a static array of such

structures to store up to 64 mounted file systems.

Page 25: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next Lab AssignmentFile manager

It is a software which provides a user interface to assist in the organisation of files. It helps users with their daily work in managing their files on a hard drive or other storage device. With terabyte hard disks becoming prevalent, file managers represent an essential tool in managing file systems.

Every file manager provides basic operations such as to create, open, view, edit, search, rename, move copy, and delete files. However, file managers typically come supplied with sophisticated functionality including network connectivity, directory synchronizing, archive handling, advanced searching, shortcuts, file/folder comparisons, checksums, plugins, and more, making them an incredibly powerful tool.

Page 26: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next Lab AssignmentLinux Virtual File System

-Manages kernel level abstractions in one format for all file systems

-Receives system calls requests from user level (e.g. write, and open)

-Interacts with a specific file system based on mount point transversals.

-Receives requests from other parts of the kernel mostly from memory

management.

Page 27: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next Lab Assignment

Super Block File Manager

ext3 File System

Linux Virtual File SystemKernel

Page 28: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next Lab Assignment

usr bin tmp dev

tty03nulldate wc ksh

dandrearjones

.profile bin

foo

Directory tree

/

Page 29: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next lab assignmentUNIX base root file system tree structure

/bin (commands)/dev (devices)/etc (system configuration/executables)/sbin (boot commands)/usr/sbin (administrative commands)/home (users home directories)/lib (shared libraries)/mnt (temporary mount directory)/opt (optional software)/proc (processes)/stand (boot-related files)/var (spooling)

Page 30: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Next lab assignmentlost+found directory

fsck is generally able to repair most system damage and the frequency

with which you will find anything at all in your lost+found directories has

slowed significantly

If you have a system crash and the Linux file system checker (fsck)

recovers corrupt files they are placed here.

Display lost+found directory

Page 31: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Break-out problems1. How often are the following 2 commands execute?

# This is a comment. * * * * * c:\tools\CheckForNewFiles.exe

2. Define: File System Super block3. Define: Domain Name Server4. Define: Domain name4. Define: RFC6. What application is BIND associated 7. What is the “lost+found” directory used for?8. What is the Linux Virtual File System9. What is One-Way Encryption or One-Way Function10. What is copy-on-write?11. What is the function of the PATH variable in the .profile?12. What is the function of the umask variable?

Page 32: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Upcoming deadlines• Knoppix File System Exercise, 11-1 is due 3/29/09.• Programming Assignment 2, 12-1 is due 4/15/09.• Archives Assignment, 12-2 is due 4/15/09.• Public Domain/Open Source Lab Assignment 13-1.

In-class presentations will be 4/6 and 4/13.• Programming Assignment 3, 14-1 is due 4/18.• Final Exam, 15-1 will be administered 4/13 – 4/18.• Final Exam Outline is posted on the Bulletin Board.

This outline will be considered a “living” document. I will add additional information to it up to one week prior to the exam. All additional information posted after the initial posting will be highlighted/indicated.

Page 33: Week Twelve Agenda Announcements Advise your proctor to verify that the faxed final exam was transmitted successfully Grade submission is December 23.

Lab assistance

• Questions• Comments• Concerns

• I will be available after this Franklin Live session to discuss any problems and/or concerns regarding lab assignments.