Download It


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Before you start the installation process, one of the following conditions must be met: Your computer must have enough unpartitioned disk space for the installation of Red Hat Linux. You must have one or more partitions that may be deleted, thereby freeing up enough disk space to install Red Hat Linux. Personal Desktop => 1.75 Gb Server => 1.58 Gb
  • Right click on my computer
  • Mount the root file system using loop mount. E.g. If root_fs is your root file system file loop mount it on the server to a ditectory using the mount command. E.g. mount –o <root_fs path> <directory path>
  • Download It

    1. 1. Linux System Configuration and Administration “ Power Linux – Unleash the full potentials of Linux”, BIET, Davangere. By Chetan Kumar S Wipro Technologies
    2. 2. Organization of the Talk <ul><li>Installation of Linux </li></ul><ul><li>System Configuration </li></ul><ul><ul><li>Network configuration </li></ul></ul><ul><ul><li>Sharing with Windows </li></ul></ul><ul><ul><li>Printer Configuration </li></ul></ul><ul><ul><li>Some security configuration </li></ul></ul><ul><li>Administrations </li></ul><ul><ul><li>User Management </li></ul></ul><ul><ul><li>User home pages </li></ul></ul>
    3. 3. Organization of Talk <ul><li>System maintenance </li></ul><ul><ul><li>Using package manager </li></ul></ul><ul><li>Cost Effective Linux solutions </li></ul><ul><ul><li>Network Booting </li></ul></ul><ul><ul><li>Single media Linux </li></ul></ul>
    4. 4. Where do you start <ul><li>Is Your Hardware Compatible? </li></ul><ul><ul><li> </li></ul></ul><ul><li>Do You Have Enough Disk Space? </li></ul><ul><ul><li>You have to decide, remove any virus if required, use fips </li></ul></ul><ul><li>Can You Install Using the CD-ROM? </li></ul><ul><ul><li>Your BIOS may need to be changed to boot from your CD-ROM </li></ul></ul><ul><li>Alternative Boot Methods </li></ul><ul><ul><li>Boot Diskette </li></ul></ul><ul><ul><li>Driver Diskettes </li></ul></ul><ul><ul><ul><li>Network Device Drivers Diskette </li></ul></ul></ul>
    5. 5. Gather more info <ul><li>Use ‘other’ OS to know more </li></ul><ul><ul><li>Personal Desktop Installations </li></ul></ul><ul><ul><ul><li>Learning About Your Hardware with Windows </li></ul></ul></ul>
    6. 6. The auspicious occasion <ul><li>The Graphical Installation Program User Interface (text mode is also available) </li></ul><ul><ul><li>Choose the language, keyboard and mouse </li></ul></ul><ul><li>Choose upgrade or new installation </li></ul><ul><ul><li>Better to choose fresh installation </li></ul></ul>
    7. 7. Installation of Linux… <ul><li>Choose personal desktop installation </li></ul><ul><li>For the first, but next time you bet on </li></ul><ul><li>Custom </li></ul><ul><ul><li>After all Linux is knowing more </li></ul></ul>Choose partition using disk druid Otherwise fdisk, in older
    8. 8. Installation of Linux… <ul><li>Configure the partition: </li></ul><ul><ul><li>Set the mount point </li></ul></ul><ul><ul><li>Set the SWAP size </li></ul></ul><ul><ul><li>Set the /boot space </li></ul></ul><ul><ul><li>Enable Ext3 formatting </li></ul></ul>
    9. 9. Installation of Linux… Choose the boot loader Grub or Lilo <ul><li>Configure the “Network </li></ul><ul><li>Configuration” </li></ul><ul><ul><li>DHCP, Firewall, IP address etc.. </li></ul></ul>
    10. 10. Installation of Linux… Choose the “Root password” Accept the default package selection or customize using the “ Customize option”
    11. 11. Installation of Linux… Installation starts and go on inserting the required CD when asked
    12. 12. Post Installation Create a boot diskette Configure your video card, monitor and screen resolution Reboot and start your Linux….!
    13. 13. System Configuration <ul><li>Kickstart Configurator </li></ul><ul><ul><li>Kickstart Configurator allows you to create a kickstart file using a graphical user interface, so that you do not have to remember the correct syntax of the file. </li></ul></ul><ul><ul><li>To use Kickstart Configurator , you must be running the X Window System. To start Kickstart Configurator , select the Main Menu Button (on the Panel) => System Tools => Kickstart , or type the command /usr/sbin/redhat-config-kickstart. </li></ul></ul><ul><ul><li>As you are creating a kickstart file, you can select File => Preview at any time to review your current selections. </li></ul></ul>
    14. 14. System Configuration… <ul><li>Network configuration </li></ul><ul><li>Networking can always be configured after installation with the Network Administration Tool (redhat-config-network). </li></ul><ul><li>For each Ethernet card on the system, click Add Network Device and select the network device and network type of the device. Select eth0 as the network device for the first Ethernet card, select eth1 for the second Ethernet card, and so on. </li></ul>
    15. 15. Printer Configuration <ul><li>Menu=> Printing=> New Printer => choose the printer and printing tool (e.g. Post script printer) </li></ul><ul><li>Testing printer </li></ul><ul><ul><li>Just do lpq to see printer status </li></ul></ul><ul><li>Lpr <filename> </li></ul><ul><ul><li>Should print the file </li></ul></ul>
    16. 16. Printer Configuration <ul><li>Useful Websites </li></ul><ul><li> General denitions of printers and descriptions of printer types. </li></ul><ul><li> A database of documents about printing, along with a database of </li></ul><ul><li>nearly 1000 printers compatible with Linux printing facilities. </li></ul><ul><li> Documentation, FAQs, and newsgroups about CUPS. </li></ul><ul><li> The Linux Printing-HOWTO from the Linux Documentation Project. </li></ul>
    17. 17. User Security <ul><li>Authentication </li></ul><ul><li>In the Authentication section, select </li></ul><ul><li>whether to use shadow passwords and MD5 </li></ul><ul><li>encryption for user passwords. </li></ul><ul><li>The Authentication Configuration options </li></ul><ul><li>allow you to configure the following methods of </li></ul><ul><li>authentication: </li></ul><ul><li>NIS, LDAP, Kerberos 5, Hesiod, SMB, Name </li></ul><ul><li>Switch Cache </li></ul><ul><li>These methods are not enabled by default. To </li></ul><ul><li>enable one or more of these methods, </li></ul><ul><li>click the appropriate tab, click the checkbox next </li></ul><ul><li>to Enable , and enter the </li></ul><ul><li>appropriate information for the authentication </li></ul><ul><li>method . </li></ul>
    18. 18. Network Security <ul><li>Firewalls </li></ul><ul><ul><li>Choose between High , Medium , and Disabled security levels. </li></ul></ul>
    19. 19. Network Security <ul><li>Common Access control system </li></ul><ul><ul><li>/etc/hosts </li></ul></ul><ul><ul><li>/etc/hosts.allow </li></ul></ul><ul><ul><li>/etc/hosts.deny </li></ul></ul><ul><ul><li>/etc/hosts.equiv </li></ul></ul><ul><li>For more info refer docs on iptable, firewall </li></ul>
    20. 20. Sharing With Windows <ul><li>SMB protocol to share files and printers across a network connection. Operating systems that support this protocol include Microsoft Windows (through its Network Neighborhood ), OS/2, and Linux. </li></ul><ul><li>SMB implementation in Linux is called samba </li></ul><ul><li>There are two things one can do </li></ul><ul><ul><li>Share your files/printer with other windows machine </li></ul></ul><ul><ul><li>Access windows shared printer/files on linux </li></ul></ul>
    21. 21. Allow Windows to share <ul><li>You need to start samba server and nmb server </li></ul><ul><ul><li>/etc/rc.d/init.d/smb start </li></ul></ul><ul><li>What ever you want to share is added in /etc/samba/smb.conf </li></ul><ul><ul><li>Every change in conf file require restarting of server </li></ul></ul><ul><li>Just browse OR find computer from windows to see these files/folders </li></ul><ul><li>You can share folders, CD, printer </li></ul>
    22. 22. To access windows share <ul><li>Smbclient is a samba client </li></ul><ul><ul><li>Smbclient –L myhost to see all share </li></ul></ul><ul><ul><li>Smbclient myhostyshare </li></ul></ul><ul><ul><ul><li>This will login to share and you can access the share </li></ul></ul></ul><ul><ul><ul><li>myhostrinter can be written to print files </li></ul></ul></ul><ul><li>Smbmount can be used to mount (map) folders on to local host </li></ul><ul><ul><li>Smbumount to unmount </li></ul></ul><ul><li>There are tools (GUI) for both sharing and accessing files </li></ul>
    23. 23. User Management
    24. 24. User Management <ul><li>Simple way to add user is adduser command </li></ul><ul><li>Passwd will allow to change the passwd </li></ul><ul><li>Ofcourse there are host of GUI tools for all these user management </li></ul><ul><li>Group all common user to single group </li></ul><ul><li>Be carefull while editing /etc/passwd </li></ul><ul><ul><li>/etc/shadow passwd file may also exist </li></ul></ul>
    25. 25. User Management <ul><li>Common files to look at </li></ul><ul><ul><li>/etc/passwd </li></ul></ul><ul><ul><li>/etc/group </li></ul></ul><ul><ul><li>/etc/shadow </li></ul></ul><ul><ul><li>/etc/samba/smbusers </li></ul></ul>
    26. 26. User Management <ul><li>Common files to look at </li></ul><ul><ul><li>/etc/passwd </li></ul></ul><ul><ul><li>/etc/group </li></ul></ul><ul><ul><li>/etc/shadow </li></ul></ul><ul><ul><li>/etc/samba/smbusers </li></ul></ul>
    27. 27. Web server on Linux <ul><li>Apache server is mostly available on Linux </li></ul><ul><ul><li>Rpm –q –all | grep apache to check </li></ul></ul><ul><li>This can be started via init services </li></ul><ul><ul><li>/etc/rc.d/init.d/httpd start </li></ul></ul><ul><li>Configuration files are at /etc/httpd/conf/ </li></ul><ul><li>Normally log files at /var/log/httpd </li></ul>
    28. 28. User home pages <ul><li>Will allow user to have home pages </li></ul><ul><ul><li> </li></ul></ul><ul><li>Need to edit /etc/httpd/conf/httpd.conf </li></ul><ul><ul><li>Enable UserDir public_html </li></ul></ul><ul><ul><li>Any user can have their page at public_html </li></ul></ul><ul><ul><ul><li>Eg. /home/user1/public_html for user1 </li></ul></ul></ul><ul><ul><ul><li>/home/user2/public_html for user2 </li></ul></ul></ul>
    29. 29. System maintenance <ul><li>Using package manager </li></ul><ul><ul><li>Package Management Tool </li></ul></ul><ul><ul><ul><li>Because people use their computers differently, users might want to install or remove packages after installation. The Package Management Tool allows users to perform these actions. </li></ul></ul></ul><ul><ul><li>RPM is good package management tool in RedHat Linux </li></ul></ul>
    30. 30. System maintenance (redhat) <ul><ul><ul><li>The X Window System is required to run the Package Management Tool . </li></ul></ul></ul><ul><ul><ul><li>To start the application, go to the Main Menu Button (on the Panel) => System Settings => Add/Remove Applications , </li></ul></ul></ul><ul><ul><ul><li>Type the command redhat-config-packages at shell prompt. </li></ul></ul></ul><ul><ul><ul><li>Command line tool rpm </li></ul></ul></ul>
    31. 31. Lost Root Passwd
    32. 32. Lost Root Passwd <ul><li>If you have Lilo installed, type </li></ul><ul><ul><li>LILI: linux init 1 </li></ul></ul><ul><ul><li>Change the root passwd, reboot aga </li></ul></ul><ul><li>If you have installed grub </li></ul><ul><ul><li>Type ‘e’ to go to edit mode, add init 1 argument at the end </li></ul></ul><ul><li>Boot with knoppix or single floppy linux </li></ul><ul><ul><li>Mount the disk and change root passwd </li></ul></ul><ul><ul><li>Reboot !! </li></ul></ul>
    33. 33. Cost Effective Linux Solutions <ul><li>You have PC, with less harddisk for dual OS </li></ul><ul><li>You have PC, on which you do not want to install Linux </li></ul><ul><ul><li>Good heaven's do not do that </li></ul></ul><ul><li>There is a spurt of Linux PC requirements for short duration of time </li></ul><ul><ul><li>For Linux LAB in one term OR during LAB examinations </li></ul></ul><ul><li>You have old PC, with out sizable hard disk </li></ul><ul><li>So you need Linux host for all the above case </li></ul>
    34. 34. Cost Effective Linux Solution <ul><li>Some most easy approach </li></ul><ul><ul><li>Network booting </li></ul></ul><ul><ul><li>Single CD Linux </li></ul></ul><ul><ul><li>Single floppy Linux </li></ul></ul>
    35. 35. Network Booting <ul><li>No need for harddisk(or harddisk with Linux) on every host </li></ul><ul><li>High level work flow </li></ul><ul><ul><li>The system boots up, may be with floppy (could be with hard disk also) </li></ul></ul><ul><ul><li>Sends dhcp request for IP number, gets one </li></ul></ul><ul><ul><li>Mounts the root file system over NFS </li></ul></ul>
    36. 36. Requirements for Network Booting <ul><li>Setup an LAN infrastructure </li></ul><ul><li>Need to setup nfs server </li></ul><ul><li>Need to setup dhcp server </li></ul><ul><li>Build a kernel image for network booting </li></ul>
    37. 37. Setup an LAN infrastructure Ethernet Cable Hub Ethernet Cable Your m/c to be booted Your host, NFS server and DHCP server should be on same LAN NFS server
    38. 38. Setup nfs server <ul><li>Edit /etc/exports file before starting the nfs server. </li></ul><ul><ul><li>/,no_root_squash) </li></ul></ul><ul><ul><li>This will export all files with root r/w to host </li></ul></ul><ul><li>Save your exports file and from the prompt execute exportfs command </li></ul><ul><li>Start the nfs server (nfs daemon) </li></ul><ul><ul><li>E.g. /etc/rc.d/inid.d/nfs start </li></ul></ul>
    39. 39. Setup dhcp server <ul><li>Add in your /etc/dhcpd.conf before starting the dhcp server. </li></ul><ul><li>Set the correct MAC address in /etc/dhcpd.conf as follows: </li></ul><ul><li>subnet < subnet address e.g. > netmask { </li></ul><ul><li>} </li></ul><ul><li>subnet netmask { </li></ul><ul><li>host master { </li></ul><ul><li>hardware Ethernet <Mac address of your Ethernet card>; </li></ul><ul><li>fixed-address < IP address of your machine e.g. >; </li></ul><ul><li>option root-path <your root path> ”; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>Save your /etc/dhcpd.conf file </li></ul><ul><li>start the dhcpd dameon by “/etc/rc.d/init.d/dhcpd start” command </li></ul>
    40. 40. Build a kernel image for network booting <ul><li>Linux Kernel compilation steps: </li></ul><ul><ul><li>Assumptions: machine x86 (i386); boot loader lilo.   </li></ul></ul><ul><ul><li>Get plain vanilla kernel from </li></ul></ul><ul><ul><li>Explode it into a directory (better if can do it in /usr/src/) => tar -zxvf linux-2.x.xx.tar.gz </li></ul></ul><ul><ul><li>Optional: create a symbolic link ln -s  linux-2.x.xx linux </li></ul></ul><ul><ul><li>cd to linux directory </li></ul></ul><ul><ul><li>cd /usr/src/linux or cd /usr/src/linux-2.x.xx </li></ul></ul><ul><ul><li>Select the components support by make menuconfig or make xconfig  - save the configuration </li></ul></ul><ul><ul><ul><li>Select IP:BOOTP support from Networking options </li></ul></ul></ul><ul><ul><ul><li>In File system -> Network File System -> Select </li></ul></ul></ul><ul><ul><ul><ul><li>NFS File system support and </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Root file system on NFS </li></ul></ul></ul></ul><ul><ul><li>Do </li></ul></ul><ul><ul><ul><li>Make dep bzImage </li></ul></ul></ul><ul><ul><ul><li>Make modules modules_install </li></ul></ul></ul>
    41. 41. Build a kernel image for network booting… <ul><li>Copy the /usr/src/linux/arch/i386/boot/bzImage to /boot </li></ul><ul><li>Do mkbootdisk with new kernel as argument </li></ul><ul><li>Optional take a coffee or tea break ? </li></ul><ul><li>      </li></ul>
    42. 42. Putting all together.. <ul><li>Make sure you are running dhcp server </li></ul><ul><li>Make sure you are running nfs server </li></ul><ul><li>On any PC that need Linux for temporary time </li></ul><ul><ul><li>Boot with new floopy you just made </li></ul></ul><ul><ul><li>That’s it !!! </li></ul></ul>
    43. 43. Knoppix Single CD Linux <ul><li>Knoppix is full Linux on a single CD </li></ul><ul><li>Can be freely downloaded from </li></ul><ul><li>Just make your PC to boot from CD, that is all required </li></ul><ul><li>Your current software (OS) on your system will not be lost </li></ul><ul><ul><li>If there is less memory, you can create temporary swap on dos partation </li></ul></ul><ul><ul><li>You can access dos partation </li></ul></ul>
    44. 44. Knoppix more info <ul><li>Hardware Requirements </li></ul><ul><ul><li>Minimum of 486 PC, 20M ram for text mode, 90M for graphics mode and128M for office suite </li></ul></ul><ul><ul><li>Bootable CD drive + key board, mouse, multimedia </li></ul></ul><ul><li>Software available </li></ul><ul><ul><li>2.4 kernel, standard drivers, development tools, Internet applications, multimedia applications </li></ul></ul><ul><ul><li>Upto 2GB worth software in total </li></ul></ul><ul><li>How to load/install start </li></ul><ul><ul><li>Step 1 put the 'cd' in drive, switch on the power </li></ul></ul><ul><ul><ul><li>All the configuration is “auto” </li></ul></ul></ul><ul><ul><li>Step 2 Enjoy working on Linux </li></ul></ul>
    45. 45. Knoppix can be handy <ul><li>The fact is you need not install Knoppix on harddisk </li></ul><ul><ul><li>So can be used in Demo of linux or software on Linux </li></ul></ul><ul><ul><li>So you need extra Linux machine lab ?? 2 minutes !! </li></ul></ul><ul><ul><li>No extra space on harddisk on old PC's, just use knoppix </li></ul></ul><ul><ul><li>Got a new laptop, just boot Linux on that in a jiffy </li></ul></ul>
    46. 46. Knoppix in Emergency
    47. 47. Knoppix at emergency <ul><li>Lost root passwd, boot knoppix, mount the harddisk, edit /mnt/etc/passwd, reboot old linux </li></ul><ul><ul><li>Can be dangerous, spurious user can do the same </li></ul></ul><ul><li>Linux do not boot, boot with knoppix and recover the important files </li></ul><ul><ul><li>Best part is you also recover lost dos/windows files as well </li></ul></ul><ul><li>You have screwed up your configuration </li></ul><ul><ul><li>Boot with knoppix and bring back to default </li></ul></ul>
    48. 48. Single Floppy Linux <ul><li>Similar to Knoppix, but over a floppy </li></ul><ul><ul><li>Will have much lesser applications </li></ul></ul><ul><ul><li>Some distributions come with two or more floppy </li></ul></ul><ul><li>MuLinux quite esay to use </li></ul><ul><ul><li> </li></ul></ul><ul><li>Coyote linux: mostly for network applications </li></ul><ul><ul><li> </li></ul></ul>
    49. 49. References <ul><li> (The Linux Documentation Project) : It contains a lots and lots of well documented and timely documents to learn and trouble shoot your Linux system (it’s free) </li></ul><ul><ul><li> </li></ul></ul><ul><li>The Linux System Administrators' Guide </li></ul><ul><ul><li>Lars Wirzenius, Joanna Oja, Stephen Stafford, and Alex Weeks </li></ul></ul><ul><ul><li>It’s free and available at http:// </li></ul></ul><ul><li>The Linux Cookbook: Tips and Techniques for Everyday Use </li></ul><ul><ul><li>Michael Stutz </li></ul></ul><ul><ul><li>It’s free and available at http:// </li></ul></ul><ul><li>The Linux Network Administrator's Guide, Second Edition </li></ul><ul><ul><li>Olaf Kirch and Terry Dawson </li></ul></ul><ul><ul><li>It’s free and available at </li></ul></ul><ul><li> </li></ul>
    50. 50. Thanks