summer training based presentation

Upload: meenusharma06

Post on 07-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Summer Training Based Presentation

    1/46

    SUMMER TRAINING BASED

    PRESENTATION

    onLINUX ADMINISTRATION

    WITH SCRIPTING

    Presented By:

    Meenu Sharma

  • 8/3/2019 Summer Training Based Presentation

    2/46

    ABOUT THE COMPANY

    HP Education Services is the most reputed name in

    High End Technical Education. It is the largest Unix

    training company worldwide. It has been in theeducation business for over 28 years. It is present in

    more than 400 HP education centers and partner

    locations. They have trained professionals of the top

    most companies of the world. They do induction

    batches training for many companies

  • 8/3/2019 Summer Training Based Presentation

    3/46

    OVERVIEW

    1. Introduction to linux

    2. History of linux

    3. The linux system

    4. The linux kernel

    5. The linux shell

    6. Linux principles

    7. Advantages8. Users of linux

    9. Linux installation

    10. Partitions

    11. Linux boot process

    12. Linux run levels

    13. Directory Structure

    14. Editors

    15. Package management

    16. Lvm

    17. RAID

    18. Servers

    19. Shell Scripting

    20. Review21. Project

  • 8/3/2019 Summer Training Based Presentation

    4/46

    INTRODUCTION TO LINUX

    Over the last year, weve seen Linux go from being focused on smalland medium business to being used very deep in the enterprise, saysPaul Cormier, executive vice president of engineering at Red Hat, a leadingLinux platform provider.

    Every Linux kernel can offer the following features:-

    Hardware support (RAM up to 4GB, 10 IDE controllers, 16 NICs, USB)

    Networking connectivity (IPX/SPX, TCP/IP, X.25, )

    Security (Local & Remote)

    Network servers (F/P, HTTP, SMTP, IMAP, POP3, DHCP, DNS, FTP, )

    Software packaging (RPM)

    Easy Installation & Administration

  • 8/3/2019 Summer Training Based Presentation

    5/46

    HISTORY OF LINUX

    In 1969

    Four programmer Ken Thompson, Dennis Ritchie, Rudd Canady& Doug McElroy made a program in Bell labs which does nothave any name in year 1969.

    In 1972

    A programmer Dennis Ritchie started converting this program inC language.

    In 1973

    Unix in C language.

    In 1980Berkeley Software Development (a part of research program ofBerkeley University) launches open BSD (a small programwritten in a single floppy).

  • 8/3/2019 Summer Training Based Presentation

    6/46

    History Of Linux Contd.. In 1984

    UNIX open source

    In 1991

    Linus Benedict Torvalds, Btech II year Computer

    Science, 23 years old student of University ofHelensiki (Finland) made Kernel (25th August1991).

    In 1994RedHat Company (collection of Linux Sets) cameinto existence.

  • 8/3/2019 Summer Training Based Presentation

    7/46

    LINUS & LINUX

    Below is one of his posts in comp.os.minix,dating from

    1991:

    From:[email protected] (Linus Benedict

    Torvalds)

    Newsgroups: comp.os.minix

    Subject: Gcc-1.40 and a posix-question

    Message-ID: [email protected]

    Date: 3Jul 91 10:00:50 GMT

    Hello netlanders,

    Due to a project Im working on (in minix), Im

    interested in the posix standard definition. Could

    somebody please point me to a (preferably) machine

    readable format of the latest posix rules? Ftp-sites would

    be nice.

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
  • 8/3/2019 Summer Training Based Presentation

    8/46

    THE LINUX SYSTEM

    APPLICATION SOFTWARE

    WINDOWSMANAGEMENT

    SOFTWARE

    GNU

    SYSTEM

    UTILITIES

    LINUX KERNEL

    COMPUTER HARDWARE

  • 8/3/2019 Summer Training Based Presentation

    9/46

    THE LINUX KERNEL

    The kernel is primarily responsible for four main functions:

    1. System memory management

    2. Software program management

    3. Hardware management4. Filesystem management

    UTILITIESUSER

    SHELL

    KERNEL

    HARDWARE

  • 8/3/2019 Summer Training Based Presentation

    10/46

    THE SHELL

    The GNU/linux shell is a special interactive utility.

    Core of the shell is command prompt.

    The shell contains a set of internal commands that we

    use to control things.

    The shell passes the program name off to the kernel

    to start it.

    Besides the internal commands, the shell also allowsyou to enter the name of a program at the command

    prompt.

  • 8/3/2019 Summer Training Based Presentation

    11/46

    LINUX SHELLS

    SHELL DESCRIPTION

    ash A simple, lightweight shell that runs in low memory environment but has

    full compatibility with the bash shell

    korn A programming shell compatible with the bourne shell but supporting

    advanced programming features like associative arrays & floating point

    arithmetic

    tcsh A shell that incorporates elements from the C programming language into

    shell scripts

    zsh An advanced shell that incorporates features from bash, tcsh, & korn,

    providing advanced programming features, shared history files & themed

    prompts

  • 8/3/2019 Summer Training Based Presentation

    12/46

    LINUX PRINCIPLES

    1. Everything is a file.

    2. Small, single purpose programmers.

    3.Ability to Chain programmers together toperform complex tasks.

    4. Avoid captive user interfaces.

    5. Configuration data stored in text.

  • 8/3/2019 Summer Training Based Presentation

    13/46

    ADVANTAGES OF LINUX

    1. Virus proof 6. User friendly GUI

    2. Multi-user 7. Advanced OS3. Crash proof 8. Multi-tasking

    4. Multi-desktop 9. Economical

    5. Secured 10. Powerful networking

  • 8/3/2019 Summer Training Based Presentation

    14/46

    USERS OF LINUX

    Private sector

  • 8/3/2019 Summer Training Based Presentation

    15/46

    Users Of Linux Contd

    Public Sector

  • 8/3/2019 Summer Training Based Presentation

    16/46

    ANY QUERIES??

  • 8/3/2019 Summer Training Based Presentation

    17/46

    LINUX INSTALLATION

    Choosing computer hardware

    Choosing the Installation Type- Partition less Installation (to the current version ofWindows, slow)

    - Kick start Installation (on a different partition, fast)

    Beginning the Installation

    Linux uses ext2 & ext3 file system.

    Boot loader of linux GRUB (Grant Unified BootLoader) new & LILO (Linux Loader) old.

  • 8/3/2019 Summer Training Based Presentation

    18/46

    PARTITIONS

    Partitions created at the time of installation

    Partition name File system Used for Minimum size

    / Ext3 Linux file system 6000MB or 6GB

    /boot Ext3 Linux booting files

    & kernels

    75 or 100 MB

    /home Ext3 Linux users entry Depended upon

    root

    /swap swap Uses as virtual

    RAM

    Double of RAM

  • 8/3/2019 Summer Training Based Presentation

    19/46

    LINUX BOOT PROCESS

    bootstrap

    searchesvmlinuz

    mapping

    grub.conf

    sysmap

  • 8/3/2019 Summer Training Based Presentation

    20/46

    LINUX RUNLEVELS

    0 /etc/rc.d/rc0.d Halt

    1 /etc/rc.d/rc1.d Single-user mode

    2 /etc/rc.d/rc2.d Not used(user-definable)

    3 /etc/rc.d/rc3.d Full multiuser mode(no GUI interface)

    4 /etc/rc.d/rc4.d Not used(user-definable)

    5 /etc/rc.d/rc5.d Full multiuser mode(with GUI interface)

    6 /etc/rc.d/rc6.d Reboot

  • 8/3/2019 Summer Training Based Presentation

    21/46

    LINUX DIRECTORY STRUCTURE

    /

    /bin/

    /boot/

    /dev/

    /etc/

    /home//lib/

    /mnt/

    /opt/

    /sbin/

    /srv/

    /tmp/

    /usr/

    /var/

    /root/

    /proc/

  • 8/3/2019 Summer Training Based Presentation

    22/46

    EDITORS IN LINUX

    Linux offers following editors

    nano

    vi

    vim

    gvim

    emacs

    gedit

    Console Mode

    Graphical Mode

  • 8/3/2019 Summer Training Based Presentation

    23/46

    vi EDITOR

    The vi editor is the screen based editor.

    The vi editor has powerful features to aid programmers.

    Modes in vi editor-

    Escape

    Mode

    Insert

    Mode

    Replace

    Mode

  • 8/3/2019 Summer Training Based Presentation

    24/46

    PACKAGE MANAGEMENT

    The red hat package manager (RPM) is a

    powerful command line driven package

    management system capable of installing,

    verifying, querying & updating computersoftware packages.

    xmms-1.2.10-9.i386.rpm

    Package name Version Type of

    architecture

    Extension

  • 8/3/2019 Summer Training Based Presentation

    25/46

    Package Management Contd

    The yellowdog updater

    modified (YUM) is an open source command line package

    management utility for RPM-compatible Linux OS.

    Developed by Seth Vidal & a group of volunteers.

    Is an automatic updater & package installer for RPM based

    systems.

    Yum can manage package groups, multiple repositories,

    fallback repositories & more to permit centralized package

    management.

  • 8/3/2019 Summer Training Based Presentation

    26/46

    LOGICAL VOLUME MANAGER

    LVM enables us to be much more flexible with our

    disk usage than we can be with conventional old-style

    file partitions.

    LVM is a resizing tool to increase the file system sizeto match the new partition size.

    First create Physical volume

    Now creating Volume group Now creating logical volumes

    Extending & reducing logical volumes

  • 8/3/2019 Summer Training Based Presentation

    27/46

    RAID

    RAID stands for Redundant Array of Independent Disk.

    RAID are of two types

    - Software RAID

    - Hardware RAID

    RAID 1 in software Disk Mirroring

    RAID 5 in software it combines the ability to use a large number

    of disks while still maintaining some redundancy.

  • 8/3/2019 Summer Training Based Presentation

    28/46

    SERVERS

    XEN Server

    NIS Server

    DHCP Server

    NFS ServerSAMBA Server

    SQUID Server

    DNS Server

    Apache Server

    FTP Server

    Telnet

  • 8/3/2019 Summer Training Based Presentation

    29/46

    XEN Server

    Xen is a free open source software virtual machine

    monitor for Intel/PowerPC architectures.

    There are 2 types of virtualization

    - Para virtualization

    - Full virtualization

    Packages

    - System-config-kickstart- Virt-manager

  • 8/3/2019 Summer Training Based Presentation

    30/46

    NIS Server

    Network information Service serves a central user information

    database.

    The NIS distributes information on the network that must be

    shared between the Linux machines.

    Four basic topologies used for NIS

    Single domain one master no slaves

    Single domain with slaves one master , one or more slaves

    Multiple domains each domain has a master but no slaves

    Multiple domains with slaves each domain with a master & one or more

    slaves

    Package ypserv

  • 8/3/2019 Summer Training Based Presentation

    31/46

    DHCP Server

    DHCP provides methods for hosts on a TCP/IP

    network to request and be granted IP address,

    and also to discover information about their

    local network Packages Required dhcp

    Port Numbers 67 Bootp, 68 DHCP

    Configuration File /etc/dhcpd.conf Service/Daemon d hcpd

  • 8/3/2019 Summer Training Based Presentation

    32/46

    NFS Server

    The network file system was developed to allow machines to mount a disk

    partition on a remote machine as if it were a local disk.

    Packages

    - portmap-4.0-63.i386.rpm

    - nfs-utils-1.0.6-4.6.i386.rpm Port Number

    - 2049-nfsd

    - 111-portmap

    Configuration File /etc/exports

    Service

    - Portmap

    - nfs

    Daemons nfsd

  • 8/3/2019 Summer Training Based Presentation

    33/46

    SAMBA Server

    Samba is a suite of utilities that allow a Linux PC to share files& other resources such as printers with Windows PC.

    Packages: samba{,-common,-client}

    Daemons: nmbd, smbd

    Service: smb Ports: 137,138,139

    Configuration: /etc/samba/smb.conf

    Samba daemons:

    -nmbd : NetBIOS name server

    resourse browsing

    WINS(windows internet name services)

    -smbd : SMB/CIFS server

  • 8/3/2019 Summer Training Based Presentation

    34/46

    ANY QUERIES??

  • 8/3/2019 Summer Training Based Presentation

    35/46

    SQUID Server

    The utility SQUID is an Internet proxy server

    that can be used within a network to distribute

    an internet connection to all the computers

    within the network.

    Packages Required : Squid-2.6.STABLE-4.el5.i386.rpm

    Port Number : 3128(default)

    Configuration File : /etc/squid/squid.conf

    Service : squid

  • 8/3/2019 Summer Training Based Presentation

    36/46

    DNS Server

    DNS makes it possible to refer to IP-basedsystems(hosts) by human-friendly names (domainnames).

    Packages : bind , bind-utils Daemons : named

    Scripts : named

    Ports : 53 udp, 53 tcp Configurations:/etc/named.conf, /var/named/ *

    Service : named

  • 8/3/2019 Summer Training Based Presentation

    37/46

    APACHE Server

    Apache is Red Hats standard web server .

    Apache is the most widely used web server:

    multiple web sites may share the same web server

    Packages : httpd

    Daemons : httpd

    Service : httpd

    Ports : 80/tcp(http), 443/tcp(https)

    Configuration : /etc/httpd/ *

    /var/www/ *

    Service : httpd

  • 8/3/2019 Summer Training Based Presentation

    38/46

    FTP Server

    FTP Service is used for transferring filesto/from a remote location. For file transfer theservice vsftpd must be running on the remote

    server.

    Packages: vsftpd , anonftp

    Daemons: vsftpd

    Ports: 21/tcp(ftp),20/tcp(ftp-data)

    Configuration:/etc/vsftpd.conf

    Service: vsftpd

  • 8/3/2019 Summer Training Based Presentation

    39/46

    TELNET

    Telnet service is used for remote login to ahost system. To login successfully, theservice xinetd must be running on the host

    system. Packages : xinetd

    Daemons: xinetd

    Ports: 23/tcp(telnet)

    Configuration:/etc/xinetd.d/telnet

    Service: xinetd

  • 8/3/2019 Summer Training Based Presentation

    40/46

    SHELL SCRIPTING

    It is defined as

    Shell script is a series of commands written inplain text file. Shell script is just like a batch

    file in MS-DOS but has more power than the

    MS-DOS batchfile

  • 8/3/2019 Summer Training Based Presentation

    41/46

    Shell Scripting Contd

    Why use shell script?

    Shell script can take input from user, file &

    output them on screen.

    Useful to create our own commands.

    Save lots of time.

    To automate some task of day today life. System administration part can be also

    automated.

  • 8/3/2019 Summer Training Based Presentation

    42/46

    REVIEW

    Linux is the fastest operating system in the world. Linux is the most reliable OS.

    Linux has an excellent scalability .

    Linux is fully 32-bit & 64-bit operatingsystem. And it is very modular and isalready ported to 64-bit chips like DECalpha, Sun Micro system.

    Linux is a very secure OS. Linux is very mature.

    Linux is less demanding on system resources

  • 8/3/2019 Summer Training Based Presentation

    43/46

    Review Contd

    Linux uses X-window which is a advanced network-

    windowing system.

    Linux has very low total_cost_of_ownership.

    Linux supports remote system administration .

    Linux kernel is very small and it can fit on a single

    floppy.

    Linux has many powerful desktops.

    Linux OS needs only 50 MB of disk space forinstallation.

    Linux runs on many hardware platforms .

    Linux is 100% POSIX compliant OS.

  • 8/3/2019 Summer Training Based Presentation

    44/46

    Review Contd

    Linux is free of any cost.

    Linux is trouble free.

    Linux more than 900 software packages

    on CDROM and many more are beingdeveloped world-wide. All the softwarepackages are in a single Linux CDROM.

    Linux was awarded The best Network

    Operating system 1997/98/99/2000 , by anyComputer magazines (US InfoWorld, Europeanpublications).

  • 8/3/2019 Summer Training Based Presentation

    45/46

    ANY QUERIES??

  • 8/3/2019 Summer Training Based Presentation

    46/46

    PROJECT

    Configuration Of Squid Server & Apache ServerUsing Scripts & Building Dialog Utilities