Lecture1.Course Content Schedule Grading Course References Introduction to Linux

Embed Size (px)

Citation preview

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    1/42

    LINUX SYSTEM AND

    NETWORK ADMINISTRATION

    RHCSA/RHCE

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    2/42

    Module I

    Course Content

    Lecture/Lab 1 – Introduction to UNIX 

    - UNIX Operating System Architecture – Linux Operating System – Users, Groups and Permissions

      - Examining PermissionsLecture/Lab 2 – Linux Installation – Hard Disk Partition Details – Linux File System  

    - ext2 / ext3 – Dual Boot Installation

    Lecture/Lab 3 – Desktop Familiarization

    - Text and GUI Mode  - Virtual Terminals- GNOME and KDE Desktop

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    3/42

    Module I

    Course Content

    Lecture/Lab 4 & 5 – UNIX Shell – UNIX Commands – Shell Commands  

    - File System Management - File Management and Viewing

    - Help, Job and Process Management 

    - Network Management- System Management- User Management

      - Printing and Programming- Document Preparation

    - MiscellaneousLecture/Lab 6 – System Initialization and Services

      - Boot Sequence, Runlevels & Daemon Processes – User Administration

      - User Creation/ Suspension & Deletion 

    - Group Administration

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    4/42

    Module ICourse Content

    Lecture/Lab 7

     –Network Configuration 

    - Configuration Utilities 

    - Multiple NICs – Task Schedulers

      - cron daemons – Disk quota management – Backup and Restore

    Lecture/Lab 8 – Adding and Removing Software Packages

    • RPM Package Management – Setting Printer – System Monitoring

    - File System Analysis

      - System Log Files & Analysis – System Troubleshooting 

    - Filesystem Corruption and Recovery 

    - Things to check: The X Window System 

    - Service, Networking & Booting 

    - The Rescue Environment 

    - Recovery Runlevels, Boot Floppies

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    5/42

    Module II

    Course Content

    Lecture/Lab 9 – DHCP

    - Server setup- Client setup

     – NIS- NIS Server setup

      - NIS Client setup 

    Lecture/Lab 10 – NFS

      - NFS Server & Client configuration - autofs implementation

     – Samba Server   - File & Print Service

     

    Lecture/Lab 11 – Basic Concept of DNS

      - Implementation of BIND 

    - forward & reverse lookup

      - DNS Directives

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    6/42

    Module II

    Course Content

    • Lecture/Lab 12 – Apache Web Server 

      - Basic Configuration 

    - Name based Virtual Hosting 

    - Restriction through htaccess  

    • Lecture/Lab 13 – Sendmail - Mail Server 

      - Configuring mail service - SMTP Server• POP3 / IMAP Server 

     • Lecture/Lab 14

     – Proxy Server - Squid

      - ACL for restricting access

    • Lecture/Lab 15 – Linux System as a Router 

      - Setup and configuration 

    - Static Routing – SELinux Configuration – Firewall Using IPTables

     

    - Filter and NAT rules

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    7/42

    Course Schedule

    Schedule

     

    The complete course, including Lectures andLabs, will be covered in 60 Hours.

    The total duration of the course will be 3.5 - 4months.

    Lectures : Every Tuesday, 17:00 – 18:30 P.M

    Labs : Thursday late, 18:30 – 20:00 P.M 

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    8/42

    Grading Guidelines

    Grading

     

    Two Exams: 40% + 40%

    Lab: 20%

    Minimum 80% attendance and minimum 60%marks are necessary to clear the course.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    9/42

    References

    Course References

    Online on the Web

    The Linux Documentation Project (LDP), http://www.tldp.org/ 

    Mirror: http://www.iitk.ac.in/LDP

    Red Hat Linux, O'Reilly

    The course slides swill be available at http://portal.feaa.uaic.ro/Master/SDBIS/an1/la/Lists/Anunuri/DispForm.aspx?ID=14&Source=http%3A%2F%2Fportal%2Efeaa%2Euaic%2Ero%2FMaster %2FSDBIS%2Fan1%2Fla%2FPages%2Fdefault

    %2Easpx

    http://portal.feaa.uaic.ro/Master/SDBIS/an1/la/Lists/Anunuri/DispForm.aspx?ID=14&Source=http%3A%2F%2Fportal%2Efeaa%2Euaic%2Ero%2FMaster%2FSDBIS%2Fan1%2Fla%2FPages%2Fdefault%2Easpxhttp://www.tldp.org/http://www.tldp.org/http://www.tldp.org/

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    10/42

    UNIX/LINUX OPERATING SYSTEM

    Introduction to Linux

    Introduction to Unix

    History of UNIX

    What is LINUX

    LINUX Distributions

    Unix OS StructureUnix File System

    Unix Directories, Files and Inodes

    Users, Groups and Permissions

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    11/42

    UNIX

    Introduction to Linux

    Unix is a multi-user, multi-taskingoperating system.

     You can have many users loggedinto a system simultaneously, eachrunning many programs.

    It's the kernel's job to keep eachprocess and user separate and toregula te access to systemhardware, including cpu, memory,disk and other I/O devices.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    12/42

    History of UNIX

    Introduction to Linux

    First Version was created in Bell Labs in1969.

    Some of the Bell Labs programmers who hadworked on this project, Ken Thompson,Dennis Ritchie, Rudd Canaday, and DougMcIlroy designed and implemented the first

    version of the Unix File System on a PDP-7along with a few utilities. It was given thename UNIX by Brian Kernighan.

    00:00:00 Hours, Jan 1, 1970 is time zero for

    UNIX. It is also called as epoch.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    13/42

    History of UNIX

    Introduction to Linux

    1973 Unix is re-written mostly inC, a new language developed by

    Dennis Ritchie.Being written in this high-levellanguage greatly decreased theeffort needed to port it to newmachines.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    14/42

    History of UNIX

    Introduction to Linux

    1977 There were about 500 Unix sitesworld-wide.

    1980 BSD 4.1 (Berkeley SoftwareDevelopment)

    1983 SunOS, BSD 4.2, System V

    1988 AT&T and Sun Microsystems jointly develop System V Release 4(SVR4). This later developed intoUnixWare and Solaris 2.

    1991 Linux was originated.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    15/42

    What is LINUX

    Introduction to Linux

    Linux is a free Unix-type operating systemoriginally created by Linus Torvalds with theassistance of developers around the world.

    It originated in 1991 as a personal project ofLinus Torvalds, a Finnish graduate student.

    The Kernel version 1.0 was released in 1994and today the most recent stable version is2.6.9

    Developed under the GNU General PublicLicense , the source code for Linux is freelyavailable to everyone.

    http://www.linux.org/info/gnu.html

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    16/42

    LINUX Distributions

    Introduction to Linux

    RedHat: http://www.redhat.com/ 

    Fedora: http://fedora.redhat.com/ 

    SuSE/Novell: http://www.suse.com/ 

    Debian: http://www.debian.org/ 

    Mandrake: http://www.mandrakesoft.com/ 

    Red Hat Enterprise Linux is a Enterprise targetedOperating System. It based on mature Open Sourcetechnology and available at a cost with one year

    Red Hat Network subscription for upgrade andsupport contract.

    http://www.mandrakesoft.com/http://www.mandrakesoft.com/http://www.mandrakesoft.com/http://www.debian.org/http://www.suse.com/http://www.suse.com/http://www.suse.com/http://fedora.redhat.com/http://fedora.redhat.com/http://fedora.redhat.com/http://www.redhat.com/http://www.redhat.com/http://www.redhat.com/

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    17/42

    UNIX Structure

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    18/42

    UNIX File System

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    19/42

    File System

    Introduction to Linux

    The Unix file system looks like aninverted tree structure.

     You start with the root directory,denoted by /, at the top and work downthrough sub-directories underneath it.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    20/42

    File System

    Introduction to Linux

    Each node is either a file or a directoryof files, where the latter can containother files and directories.

     You specify a file or directory by its pathname, either the full, or absolute, pathname or the one relative to a location.

    The full path name starts with the root, /,and follows the branches of the filesystem, each separated by /, until youreach the desired file, e.g.:

     /home/condron/source/xntp

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    21/42

    File System

    Introduction to Linux

    A relative path name specifies the path relative toanother, usually the current working directorythat you are at. Two special directories :

    . the current directory

    .. the parent of the current directory

    So if I'm at /home/frank and wish to specify thepath above in a relative fashion I could use:

    ../condron/source/xntp

    This indicates that I should first go up onedirectory level, then come down through thecondron directory, followed by the source

    directory and then to xntp.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    22/42

    Structure of Standard Directories

    in Unix/Linux

    Introduction to Linux

     / The ancestor of all directories on the system;all other directories are subdirectories of thisdirectory, either directly or through other

    subdirectories. /bin Essential tools and other programs (orbinaries).

     /dev Files representing the system's various

    hardware devices. For example, you use thefile `/dev/cdrom' to access the CD!ROM drive.

     /etc Miscellaneous system configuration files,startup files, etc.

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    23/42

    Structure of Standard Directories in

    Unix/Linux

    Introduction to Linux

     /home The home directories for all of thesystem's users.

     /lib Essential system library files used bytools in `/bin'.

     /proc Files that give information aboutcurrent system processes.

     /root The superuser's home directory,whose username is root. (In the past, thehome directory for the superuser wassimply `/'; later, `/root' was adopted for thispurpose to reduce clutter in `/'.)

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    24/42

    Structure of Standard Directories in Unix/Linux

    Introduction to Linux

     /sbin Essential system administratortools, or system binaries.

     /tmp Temporary files. /usr Subdirectories with files relatedto user tools and applications.

    I i i

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    25/42

    Directories, Files and InodesIntroduction to Linux

    Every directory and file is listed in its parent 

    directory.

    In the case of the root directory, that parent is itself.

    A directory is a file that contains a table listing the 

    files contained within it, giving file names to the 

    inode numbers in the list.

    The information about all the files and directories is 

    maintained in INODE TABLE

    An Inode (Index Nodes) is an entry in the table 

    containing information about a file (metadata) 

    including file permissions, UID, GID, size, time 

    stamp, pointers to files data blocks on the disk etc.

    I d i Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    26/42

    Users, Groups and Access Permissions

    Introduction to Linux

    In UNIX/LINUX, there is a concept of user andan associated group

    The system determines whether or not a user

    or group can access a file or program basedon the permissions assigned to them.

    Apart from all the users, there is a specialuser called Super User or the root which has

    permission to access any file and directory

    I t d ti t Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    27/42

    Access Permissions

    Introduction to Linux

    There are three permissions for any file, directoryor application program.

    The following lists the symbols used to denote

    each, along with a brief description:r — Indicates that a given category of user can

    read a file.

    w — Indicates that a given category of user canwrite to a file.

    x — Indicates that a given category of user canexecute the file.

    I t d ti t Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    28/42

    Access Permissions

    Introduction to Linux

    Each of the three permissions are assigned tothree defined categories of users.

    The categories are:

    owner — The owner of the file orapplication.

    group — The group that owns the file or  

    application. others — All users with access to the 

    system.

    I t d ti t Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    29/42

    Access Permissions

    Introduction to Linux

    One can easily view the permissions for a fileby invoking a long format listing using thecommand ls -l.

    For instance, if the user juan creates anexecutable file named test, the output of thecommand ls -l test would look like this: 

    -rwxrwxr-x 1 juan student 0 Sep 26 12:25 test 

    I t d ti t Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    30/42

    Access Permissions

    Introduction to Linux

    The permissions for this file are listed arelisted at the start of the line, starting with rwx.

    This first set of symbols define owner access.

    The next set of rwx symbols define groupaccess

    The last set of symbols defining accesspermitted for all other users.

    -rwxrwxr-x 1 juan student 0 Sep 26 12:25 test

    I t d ti t Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    31/42

    Access Permissions

    Introduction to Linux

    This listing indicates that the file is readable,writable, and executable by the user whoowns the file (user juan) as well as the groupowning the file (which is a group namedstudent).

    The file is also world-readable and world-executable, but not world-writable.

    -rwxrwxr-x 1 juan student 0 Sep 26 12:25 test

    I t d ti t Li

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    32/42

    Listing the Content of a DirectoryIntroduction to Linux

    ls is used to list the contents of a directory.

    If the command ls is written with parameter –lthen the command lists contents of theworking directory with details. Example: 

    $ ls –l

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    33/42

    Moving in DirectoriesIntroduction to Linux

    cd try_itChanges the directory to try_itpwd

    Prints present working directory (e.g. /home/smith/try_it)cd .. Move to superior directorypwd : Prints /home/smithcd /home The absolute path

    pwd : Prints /homecd The system is returned to the user homedirectorypwd : Print /home/smith

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    34/42

    Make DirectoryIntroduction to Linux

    The command mkdir my_dir

    makes new directory my_dir (the path isgiven relative) as a subdirectory of thecurrent directory.

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    35/42

    Remove DirectoryIntroduction to Linux

    The command rmdir your_dir

    removes directory your_dir if it is empty.

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    36/42

    Copy FileIntroduction to Linux

    The command cp file_1 file_2

    copies file_1 to file_2. The both files must be inthe same working directory. If they are invarious directories, the path must be given.

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    37/42

    Rename and/or Move the FileIntroduction to Linux

    The command mv file_1 file_2

    moves file_1 to file_2

    The both files must be in the same workingdirectory.

    If they are in different directories, the path mustbe given.

    The file_1 is removed from the disk.

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    38/42

    Remove FileIntroduction to Linux

    The command rm file_a

    removes the file_a from the system

    If you use wildcard. For example

    rm h*c

    you will remove all files beginning with h andending with c  which are in working directory.

    If you writerm *

    you will erase all files from your workingdirectory.

    Introduction to Linux

    http://localhost/var/www/apps/conversion/tmp/scratch_2/?slideindex=0

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    39/42

    Access Permission of File/Directory

    Introduction to Linux

    The ownership of the file or directory can bechanged using the command

    chown

    The group of the file or directory can be changedusing the commandchgrp

    The permissions of the file can be changed usingchmod command

    chmod -R ###

    -R is optional and when used with directories willtraverse all the sub-directories of the targetdirectory changing ALL the permissions to ###. 

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    40/42

    Access Permission of File/Directory

    Introduction to Linux

    The #'s can be:0 = Nothing1 = Execute

    2 = Write3 = Execute & Write (2 + 1)4 = Read5 = Execute & Read (4 + 1)6 = Read & Write (4 + 2)

    7 = Execute & Read & Write (4 + 2 + 1)

    RWX

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    41/42

    Assignment (1)Introduction to Linux

    1. Login as guest (password is guest123)

    2. Find the present Directory

    3. Write the / directory structure

    4. Write a few commands available in /bin and /sbin directory

    5. Find the guest directory

    6. Write the permissions of guest directory7. Create a new Directory test in guest directory

    8. Write the permissions of test directory

    9. Copy the file /etc/resolv.conf in test directory

    10. Rename the test directory to testing

    11. Delete the testing directory

    12. Change the permissions of guest directory to 77513. Change the permissions of /tmp directory to 700

    14. Login as root user (password is root123)

    15. Change the permissions of guest directory to 700

    16. The location of kernel files in Unix File System is /boot and by looking at

    the kernel file, write the kernel version you are using in your system.

    Introduction to Linux

  • 8/18/2019 Lecture1.Course Content Schedule Grading Course References Introduction to Linux

    42/42

    Assignment (2)Introduction to Linux

    1. Login as guest

    2. Change directory to /

    3. List the contents of /home directory

    4. Find the group to which guest belongs

    5. Create a file syslinus in the home area of guest (hint: use touch command)

    6. Find the permissions of the file syslinus

    7. Find the inode number of file syslinus (hint: ls –li)8. Copy the file syslinus to syslinus1

    9. Find the inode number of file syslinus1 (hint: ls –li)

    10. Move the file syslinus to syslinus2

    11. Find the inode number of file syslinus2 (hint: ls –li)

    12. Move syslinus2 to syslinus

    13. Login as root14. Create a new user guest1 with same group as guest (hint: use GUI tool

    Applications!System Settings! Users and Groups)[More on this later in the

    course]

    15. Create a new user guest2 with a different group than the group of guest (hint: use

    GUI tool Applications!System Settings! Users and Groups)

    16. Find, what permissions should the file syslinus have, so that both guest1 and guest2