1 / 58

Agenda

Agenda. Administrative Issues Link of the Week This Week’s Expected Outcomes Points of interest Moving around in UNIX Break-Out Problems Upcoming Deadlines Hands-on Information Lab Assistance, Questions, and Answers. Announcements

vanna
Download Presentation

Agenda

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agenda Administrative Issues Link of the Week This Week’s Expected Outcomes Points of interest Moving around in UNIX Break-Out Problems Upcoming Deadlines Hands-on Information Lab Assistance, Questions, and Answers

  2. Announcements Students are encouraged to email their Power Point presentations to me at least one hour prior to the class presentation session. This allows me the opportunity to open your Power Point file and verify that it is usable. Announcements

  3. HTML Tutorial http://www.w3schools.com Purchase CGI scripts http://www.cgiscript.net "How to Create Your Own Home Page" Home Page http://www.intergalact.com/hp/part3/part3.html CGI Programming FAQ by Nick Kews http://www.webthing.com/tutorials/cgifaq.html Introduction to CGI Scripts http://linux.die.net/man/3/cgi Link of the week

  4. What does CGI stand for? Common in the sense that there are many programming languages that scripts can be written in and interact with different types of systems. The user isn’t limited to just one way. Gateway in strengths that lie in not only what it can do itself, but with it’s potential access it offers to other systems (databases/graphic generators). Interface that provides a well-defined way to call up its features. The interface between the CGI script and the Web server is fixed. Link of the week

  5. CGI Scripts CGI is the standard for interfacing with external applications and information servers. The information servers can be HTTP or Web servers. The CGI scripts provide a more dynamic avenue for information servers to pursue rather than as a HTML file server. Link of the week

  6. PROCESS STATE CODES (man ps command) D uninterruptible sleep (usually IO) R runable (on run queue) S sleeping T traced or stopped Z a defunct ("zombie") process For BSD formats and when the “STAT" keyword is used, additional letters may be displayed: W has no resident pages < high-priority process N low-priority task L has pages locked into memory (for real-time and custom IO) Use the ps -aux | less command to display the above mentioned codes listed under the STAT column heading. Link of the week

  7. PROCESS STATE CODES (man ps command) Use the ps -aux | less command to display the above mentioned codes listed under the STAT column heading. Link of the week

  8. PROCESS STATE Code USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 1424 488 ? S Oct19 0:24 init root 2 0.0 0.0 0 0 ? SW Oct19 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SW Oct19 0:00 [migration/1] root 4 0.0 0.0 0 0 ? SW Oct19 0:00 [migration/2] root 5 0.0 0.0 0 0 ? SW Oct19 0:00 [migration/3] root 6 0.0 0.0 0 0 ? SW Oct19 0:00 [keventd] root 7 0.0 0.0 0 0 ? SWN Oct19 0:00 [ksoftirqd/0] root 8 0.0 0.0 0 0 ? SWN Oct19 0:00 [ksoftirqd/1] root 9 0.0 0.0 0 0 ? SWN Oct19 0:00 [ksoftirqd/2] root 10 0.0 0.0 0 0 ? SWN Oct19 0:00 [ksoftirqd/3] VSZ – virtual memory usage of the entire process. RSS – non-swapped physical memory that a task has used. Link of the week

  9. PROCESS STATE Code /export/home/dandrear>psux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND dandrear 9170 0.0 0.0 1580 584 pts/0 S 10:53 0:00 -ksh dandrear 9407 0.0 0.1 5820 2232 pts/0 R 12:03 0:00 psux Link of the week

  10. PROCESS STATE Code /export/home/dandrear>ps –aux | less USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 26 0.0 0.0 0 0 ? S 2011 4:19 [kswapd0] root 27 0.0 0.0 0 0 ? SN 2011 0:00 [ksmd] root 28 0.0 0.0 0 0 ? S 2011 0:00 [aio/0] root 401 0.0 0.0 2428 8 ? S<s 2011 0:00 /sbin/udevd -d root 612 0.0 0.0 0 0 ? S 2011 0:00 [vmmemctl] dandrear 20749 0.0 0.0 4812 1036 pts/0 R+ 20:23 0:00 ps -aux dandrear 20750 0.0 0.0 4448 784 pts/0 S+ 20:23 0:00 less Link of the week

  11. What information are we covering? Upon successful completion of this module, the student will be able to: Manipulate user accounts. Describe the structure and use of Web servers. Create and run CGI scripts. Evaluate a current Web technology project. Review PATA, SATA, and SCSI disks technology Purpose of partitions This Week’s Expected Outcomes

  12. What function does the lost+found directory provide? Fsch is a utility that checks and repairs files. Fsch, tries to locate fragments of files that are not referenced anywhere in the filesystem. In particular, fsck might find data that looks like a complete file, but does not have a name anywhere on the system or an inode with a corresponding file name. This data is considered garbage because it is still occupying disk space, and is not accessible by normal means. When fsch is executed to repair a filesystem, it turns almost deleted files back into files. The file with the missing name and location use to exist in the filesystem, but the information is no longer available. UNIX Operating System

  13. What function does the lost+found directory provide? During execution, fsck deposits the file in the lost+found directory. The file was once lost and now it has been found. UNIX Operating System

  14. What function does the lost+found directory provide? Usually, there is one directory in every disk partition. Disk errors or incorrect system shutdowns cause files to become lost. This is the directory they can be found in. UNIX Operating System

  15. One-Way Encryption (Message Digest 5) 1. MD5 encrypted password (option secret 0) 2. MD5 encryption text string (option secret 5) The optional 0 keyword enables MD5 encryption on a clear text password; the 5 keyword enters an MD5 encryption string and saves it as the user MD5-encrypted secret. MD5 encryption is a strong encryption method which is not retrievable; thus, you cannot use MD5 encryption with protocols that require clear text passwords, such as CHAP UNIX Operating System

  16. One-Way Encryption (Message Digest 5) MD5 encryption is a one way hash encryption algorithm and cannot be decrypted (except by brute force). MD5 encryption can be compromised using brute force on it. Rainbow tables use a mathematic algorithm so its easier and faster than a common brute force.And yes, there are tables which can crack MD5. If a password is bigger than 15 characters, it takes a hacker more time to create the conditions necessary to compromise the password. So, if your password is bigger than 15 characters your level of security is considered safe. UNIX Operating System

  17. Super Block Attributes Contains information about each mounted file system. The super-block is the first block of each ext2FS/ext3FS partition. It contains important data about the file system, such as its size, free space, etc. (it is similar to the method used by FAT partitions). A partition with a damaged super-block cannot be mounted. Fortunately, ext2FS/ext3FS keeps several super-block backup copies scattered over the partition. Most of the information stored in the super-block is considered static. Static information can be critical in recovering data. UNIX Operating System

  18. UNIX Operating System

  19. Linux Virtual File System (VFS) The purpose of a VFS is to allow client applications to access different types of file systems in a uniform way. Manages kernel file abstractions in one format for all file systems. Receive system call requests from user level (e.g. write, open, stat, link). Interacts with a specific file system based on the mount point traversal Receive requests from other parts of the kernel, mostly from memory management. UNIX Operating System

  20. File Manager Is a program that provides a user interface to work with the file system. They are very useful for speeding up interaction with files. The most common operations on files are create, open, edit, print, rename, move, and copy UNIX Operating System

  21. LDAP (Lightweight Directory Access Protocol ): A set of protocols for accessing information directories. LDAP is considered the simplified version of the X-500 standard. Unlike the X-500 standard, LDAP supports TCP/IP for Internet access. UNIX Operating System

  22. LDAP Characteristics • Relatively Static Data - the data is rarely modified. How often do you change your telephone number? • Extremely Fast Read Operations - the directory is tuned for high read performance because the data in the directory is frequently read and rarely written or updated. • Distributed - the data is located on a number of systems on the network for redundancy, performance, and scalability. • Hierarchical -This ensures there is an authoritative source of the data in the directory system. UNIX Operating System

  23. Apache Web Server Apache Web server is free and distributed as source files by the Apache Software Foundation. Apache is generally recognized as the world's most popular Web server (HTTP server). Originally designed for UNIX servers, the Apache Web server has been ported to Windows and other network operating systems. The name "Apache" derives from the word "patchy" that the Apache developers used to describe early versions of their software. apache 31748 27504 0 Mar23 ? 00:00:03 /usr/sbin/httpd UNIX Operating System

  24. Describe the structure and use of Web servers. Early Web sites consisted of HTML pages that could only provide data that was written into the HTML page itself. This was sufficient for that time frame. Currently, Web sites provide dynamic data into an HTML page with the use of CGI scripts. It is a mechanism for a Web server to be able to interact with an external program. These external programs are CGI scripts. UNIX Operating System

  25. Describe the structure and use of Web servers. CGI scripts can be written in any programming languages. Perl is the common choice because of its feature richness. The web is composed of clients and servers. CGI is used on the server to provide additional services and functionality to the client. UNIX Operating System

  26. The Apache HTTP server must be instructed to locate the CGI scripts. Two more pieces of information are needed. 1) A program in that directory to be used as a CGI script. 2) A link in an HTML page to your CGI script. The CGI script itself simply produces output to stdout. The HTTP server captures that output and sends it to the Web browser. The format of the output must be in a form that the Web browser can understand (HTML). The CGI script creates the HTML page every time it is run. The data provided to the HTML page can change with each execution of the script. The Web browser reports data dynamically to the user. UNIX Operating System

  27. URL that points to the CGI script. http://cs.franklin.edu/~dandrear/itec400/CGI/sysInfo.cgi Apache Web Server A user can test from a Web browser on the same machine using the host name “localhost.” http://localhost will try to find a Web server on the same machine as the Web browser. UNIX Operating System

  28. Hard Disks Hard disks are among the most important components in your system. There are three hard disks interfaces on most computers 1. Parallel Advanced Technology Attachment (PATA) 2. Serial Advanced Technology Attachment (SATA) 3. Small Computer System Interface (SCSI). UNIX Operating System

  29. Configuring PATA Disks PATA disks were once the dominate player in the x86 PC world. Since 2005, PATA still exists, but in the shadows of years past. PATA disks are still available. UNIX Operating System

  30. Configuring PATA Disks PATA is a parallel interface, which means that several bits of data are transferred over the cable at one time. PATA cables are thick/wide, because they support 40 to 80 lines, depending on the variety of PATA. The PAPA ribbon cable contains three connectors. One connector connects to the motherboard, and the other two connect to disk devices. PATA disks are connected as masters or as slaves. This is typically done with jumpers on the physical disks themselves. The master devices are located at the ends of the cable, and the slave device resided on the middle connector. UNIX Operating System

  31. UNIX Operating System

  32. Disk performance Disks should be connected o separate controllers rather than configured as slave and master on the same single controller, because each PATA controller has a limited throughput that may be exceeded by two drives. Today, most motherboards have at least two controllers, so putting each drive on its own controller is more efficient. PATA transfer rate is 128-1064 Mbps UNIX Operating System

  33. SATA disks SATA disks are newer than PATA disks. The SATA disks connect to the motherboards or controllers on a one-to-one basis. SATA disks do not use jumpers. SATA is a serial bus, which transfers one bit of data at a time and is faster that PATA data transfers. The size of a SATA cable is much smaller than a PATA cable. Modern firmware detects the presence of SATA disks just as it did for PATA disks. The firmware may provide boot up options. This could be true if the motherboard does not provide SATA support but you use a separate SATA controller card. It is possible to boot from a SATA disk in such cases if your controller card supports this option or you might have to used the PATA boot disk. UNIX Operating System

  34. Configuring SATA Disks In most cases, Linux SATA drivers treat SATA disks as if they were SCSI. Some older drivers treat SATA disks like PATA disks, so you need to use PATA names on some occasions. UNIX Operating System

  35. SATA performance SATA transfer rate 1.5 – 6.0Gbps UNIX Operating System

  36. Configuring SCSI disks SCSI disks are available in a variety of flavors. SCSI cables come in different sizes and operate at different speeds. Traditionally, SCSI has been a parallel bus, like PATA although the latest variant is a serial bus like SATA. Although, SCSI is considered a superior bus compared to PATA, it cost difference has risen dramatically in the past few years, which has affected their sales. UNIX Operating System

  37. Configuring SCSI Disks SCSI supports as many as 8 to 16 devices per bus, depending on the variant release. In practice, the number of devices you can attach to a SCSI bus is more restricted because of cable length limits, which vary from one SCSI variant to another. Each device has it’s own ID number, To set the ID, consult the associated documentation. UNIX Operating System

  38. Configuring SCSI Disks The SCSI bus is logically just one dimension. That means that every device on the bus falls along a single line. The bus is straight for all practical purposes. Each end of the SCSI bus must be terminated. This is performed by including a special resistor pack that prevents signals from bouncing back and forth along the SCSI chain. Termination is a hardware requirement, it doesn’t apply to SATA or USB disk devices, even though they use Linux SCSI drivers. UNIX Operating System

  39. Why Partition Your Disk? • Multiple OS Support – keep different Oss separate. • File system Choice – use different file system. Different file system speeds might be a factor. • Disk Space Management –allows a user to save certain sets of files into a fixed space. It restricts users to storing in one or two partitions, without causing problems in other partitions. UNIX Operating System

  40. Why Partition Your Disk? • Disk Error Protection - file systems do experience errors. • Security – a partition that contains critical information can be mounted read-only. This provides an additional layer of security above the normal file and directory permissions. UNIX Operating System

  41. Why Partition Your Disk? • Backup – many Linux systems backup utilities work better on whole disks. Keeping partitions small is more advantageous for backing up, than you could with large partitions. UNIX Operating System

  42. Partitioning a Disk Traditionally, Linux used the fdisk utility for disk partitioning. The full definition of the utility name is fixed disk, which is the same name used by DOS and Windows to basically accomplish the same task. UNIX Operating System

  43. Understanding Partitioning Systems Partitions are predefined by data structures that are written to specific areas of the hard disk. Today, there are several competing systems to re-define partition use. On the x86 and x86-64 hardware, up to 2010 had been the Master Boot Record (MBR) partitioning system, where the data in the first sector of the disk is known as the MBR. This configuration is limited to partitions and partition placement of 2 tebibytes (TiB; is 2 40th bytes), when using sector size of 512 bytes. UNIX Operating System

  44. Understanding Partitioning Systems The original x86 hardware partitioning scheme allowed for four partitions. As hard disks increased in size, it became apparent that more partitions were needed, so the original scheme was extended in such a way to retain backward compatibility. One of the main limitations with using the original MBR method is the usage of 32 bits for storing logical block addresses and size information. UNIX Operating System

  45. MBR New Scheme UNIX Operating System

  46. Understanding Partitioning Systems The new scheme utilizes three partition types; • Primary partitions, which are the same as the original partition types. • Extended partitions, which are a special type of primary partition that servers as a placeholder for the logical partitions • Logical partitions, which resides within an extended partition UNIX Operating System

  47. Understanding Partitioning Systems One successor to the MBR method is the GUID (Globally Unique Identifiers) Partition Table (GPT) partitioning system, which offers higher limits and certain other advantages. GPT is the preferred partitioning system for disks larger than 2TiB. As of 2010, most operating systems support GPT. GPT allocates 64 bits for logical block addresses and allows a maximum size of 2 64th -1 sectors. GPT does not use the layout of primary, extended, and logical distinction of MBR. UNIX Operating System

  48. UNIX Operating System

  49. Role of the mount point Once the disk partitions have been created, the operating system must have some way to access the data on the partition. In Windows systems this is done by assigning a drive letter ( C: or D:). Linux does not use a drive letter, but instead uses a unified directory tree. Each partition is mounted at a mount point in that tree. A mount point is a directory that is used as a way to access the filesystem on the partition, and mounting the filesystem is the process of linking the filesystem to the mount point. UNIX Operating System

More Related