1 / 72

Tutorial on Linux Introduction, Installation & Initial Setups

Tutorial on Linux Introduction, Installation & Initial Setups. Speaker: Faran Javed (BIT-5) Abdul Lateef Khan (BIT-5). Agenda. Introduction Planning to Install Installing Red Hat Linux Post Installation Configuration First Steps with Linux. Part – I Getting Started. Introduction.

reuben
Télécharger la présentation

Tutorial on Linux Introduction, Installation & Initial Setups

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. Tutorial on Linux Introduction, Installation & Initial Setups Speaker: Faran Javed (BIT-5) Abdul Lateef Khan (BIT-5)

  2. Agenda • Introduction • Planning to Install • Installing Red Hat Linux • Post Installation Configuration • First Steps with Linux

  3. Part – IGetting Started

  4. Introduction • For x86 architecture • Free implementation of UNIX • Used for • Programming • Productivity • Distributed Computing • Telecom & Networking

  5. What is Linux ?

  6. The core kernel of a free operating system first developed and released to the world by Linus Bendict Torvalds in 1991

  7. What’s Red Hat Linux ?

  8. Product of Red Hat Inc. • Named after a Cornell university team hat. • Objective: • Develop release and market an easily managed, and easy to use Linux Distribution

  9. Brief History • Initiated by Linux Torvalds • Initially the little Clone of Unix • Version 0.0.1 was never announced • Version 0.0.2 announced October 5 1991 • Aim was to build a MINIX look-a-like OS for AT 386 machines

  10. System Features • complete multitasking, multi-user operating system • Complete Implementation of the TCP/IP stack and other networking software is provided • Variety of File systems supported • Ext2 • Ext3 • XENIX and UNIX System V • Microsoft MS-DOS • Windows 95 VFAT file systems on a hard drive or floppy. • The ISO 9660 CD-ROM file system is also supported.

  11. System Features • The kernel supports demand-paged, loaded executables. • Only those segments of a program which are actually in use are read into memory from disk. • unified memory pool for user programs and disk cache. • All free memory is used by the cache, which is reduced when running large programs. • Executables use dynamically linked, shared libraries

  12. System Features • To facilitate debugging, the kernel generates core dumps for post-mortem analysis. • amount of available memory, Linux also implements disk paging • If several instances of a program are running at once, they share physical memory, which reduces overall usage.

  13. Software Features • Coming Up in Later Slides

  14. Preparing To InstallLinux

  15. Linux Installation • Hardware Compatibility • http://hardware.redhat.com/hcl/ • Disk Space • 400 MB – 5 GB depending on minimal, personal, server etc. settings

  16. Preparing for the Install Process • Most Common Installation Methods • CD-ROM • NFS • From a remotely mounted hard drive containing the red hat Linux software • FTP • HTTP • Hard Drive Partition

  17. Preparing to Install from a CD-ROM • Just make sure System BIOS is set to BOOT from CD_ROM

  18. Partitioning Your Hard Disk Space • If Linux is the only OS than we can auto partition • Assuming a machine with 20 GB Hard Disk & 256 MB RAM • Most basic Scheme Requires a native root partition & a swap partition

  19. Typical Partitions • For a machine with only Linux on the system the scheme will look like: • Hard Drive Partition Mount Point Size /dev/hda1 / 19.14 GB /dev/hda2 swap 512 MB • For a machine already having windows: • Hard Drive Partition Mount Point Size /dev/hda1 /mnt/dos 9.74 GB /dev/hda2 / 8.14 GB /dev/hda3 swap 512 MB

  20. Hosting Parts of the Linux File System on Partitions • /home • Our users home – will contain our personal files, • /opt • Directory for additional software packages to be installed • /tmp • Used as temporary storage for users • /usr • Holds nearly all software on the red hat system • /var • Security logs, mails, print spools are under this directory

  21. Kickstart Installation Method • Automation always saves time • Use Red Hats KickStart Configurator • A sample ks.cfg file #System Language Lang en-US #Langugae Modules to Install Langsupport en_US

  22. Sample File # System Keyboard keyboard us # System mouse Mouse genericps/2 # System time zone Timezone –utc America/NewYork # Root password Rootpw – iscrypted $1$shaldsgfakd3452435gjAJHSGDA/SAD324

  23. The Installation Process • Language Selection • Keyboard and Mouse configuration • Choice of installation type • Personal Desktop • If new to the world of Linux • Workstation • If you would like a graphical desktop environment, as well as software development tools • Server • If you would like your system to function as a Linux-based server • Custom • Greatest flexibility • Upgrade

  24. Installation Process (cont.) • Disk partitioning • Automatic Partitioning • Manual Partitioning • ext2, ext3, RAID, swap, vfat etc. • Configuring Boot Loader • LILO • GRUB • Network Configuration • Firewall Configuration • Language & Time Zone Configuration

  25. Installation Process (cont.) • Authentication setup • Package Selection • Actual installation • Boot Disk creation, VGA and monitor configuration

  26. First Steps In Linux

  27. Viewing the red hat Linux file system • Ls • Tree

  28. Basic Linux Directories • / The root Directory • /bin Essential Commands • /boot Boot Loader Files • /dev Device Files • /etc System Configuration files • /home User home directories • /lib Shared libraries • /mnt usual mount point • /opt Add-on software packages • Proc Kernel Information Process control • /root Super user • /sbin System commands mostly root only • /tftpboot Network boot support • /tmp temp files • /Usr Secondary software file hierarchy • /var Variable data (e.g. logos), spooled files

  29. Files in the /etc directory • Fstab • FILE SYSTEM TABLE. A text file listing each hard drive, Floppy drive or other storage attached to your PC. • Inittab • The system Initialization table. Defines default run level. Here we can define either to use text or GUI mode. • Modules.conf • Contains directions and options used when loading kernel modules to enable various types of hardware • Passwd • The list of users of the system & their accnt info. • Printcap • Systems printer capabilities database • Shells • A list of approved shells (command line interfaces) • Sysconfig • Tree –afx /etc/sysconfig

  30. Interact with the kernel • Use the proc diractory • Vi /proc/meminfo • Or use the free command • /proc/cpu -- cpu family,type & speed • /proc/net – important networking info • /proc/net/netstat , /proc/net/route , /proc/net/dev • /proc/version – kernel version

  31. Remote Login • Use SSH – secure shell • Linux also supports : • Telnet • Rlogin

  32. Changing user Information • Chfn – change finger information • Finger – get finger information

  33. Accessing Documentation • Apropos partition • Will display related commands

  34. Using the Man pages • Man rm • Will display manual pages for the rm command

  35. Grep • Grep alateef /etc/passwd • This will search for alateef in /etc/passwd • Whereis fdisk

  36. Using Environment Variables • PWD – current directory • USER – declare user name • LANG – To set language defaults • SHELL – TO declare the name and location of the current shell • PATH – set default location of executable files • LD_LIBRARY_PATH – location of important software libraries • TERM – set the type of terminal in use • MACHINE – declare system type, architecture & so on • $env • /etc/profile

  37. Navigating & searching with shell • Cd /home/….. • Cd .. • Whereis • Locate • Apropos • Cat <filename>– contents of file • Less <filename> - allows scrolling while reading contents of file name • Mv <file1> <file2> • Mv <file> <dir> • Cp <src> <dst> • Rm <file> • Rmdir <dir> • Grep <string> <file>

  38. Compressing & Decompressing Files • Bunzip2 - expands a compressed file • Bzip2 – compresses or expands files & directories • Gunzip • Gzip • Shar • Tar • unshar

  39. Using Text Editors • Ed • Emacs • Jed • Joe • Mcedit • Pico • Sed • Vim • Vi • Gedit • Kate • Kedit • Nedit • kwrite

  40. Working with vi • H,j,k,l – cursor movement • Delete character – x • Delete line – dd • Mode toggle – ESC, Insert (or i) • Quit - :q • Quit without saving - :q! • Save file - :w • Text search - / • Run a shell command - :sh (use exit to return)

  41. Mounting a Drive

  42. Compiling a simple C Program

  43. Internet Configuration

  44. Ethernet Configuration • Things you should know • IP address • If you're configuring loopback mode, it is 127.0.0.1 • Subnet mask • It is always 255.0.0.0 for loopback address • Broadcast address • It is equal to your subnet address with 255 replaced as the host address • IP address of Gateway • IP address of Name server

  45. Configuration using system scripts • Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.8.139 NETMASK=255.255.255.0 BROADCAST=192.168.8.255 GATEWAY=192.168.8.1 • Edit the file /etc/sysconfig/network NETWORKING=yes HOSTNAME=linux.niit.edu.pk GATEWAY=192.168.8.1

  46. Configuration of Static IP via command line • The shell provides two programs for NIC configuration, ifconfig & route • ifconfig • For configuring the network device interface with certain parameters, such as the IP address, subnetwork mask etc. • Remember to bring the interface down & up when modifying • Set IP Address ifconfig lo 127.0.0.1 ifconfig eth0 192.168.75.20 netmask 255.255.255.0 • Verify Settings ifconfig eth0 • route • To show and manipulate the IP routing table • Add default gateway route add default gw 192.168.1.254 route add –net 192.156.79.0 netmask 255.255.255.0 dev eth0

  47. Important Configuration files • /etc/hosts • Contains a list of IP addresses and the hostnames they correspond to 127.0.0.1 ENT localhost.localdomain localhost • /etc/networks • lists the names and addresses of your own and other networks • Used by the route command and allows you to specify a network by name instead of by address default 0.0.0.0 # default route - mandatory loopnet 127.0.0.0 # loopback network - mandatory niit-net 202.83.166.171 # Modify for your own network address

  48. Important Configuration files • /etc/host.conf • Specifies how your system resolves hostnames order hosts,bind • /etc/resolv.conf • Configures the name resolver • specifies the address of your nameserver (if any) • domains that you want to search by default if a specified hostname is not a fully specified hostname domain niit.edu.pk nameserver 10.10.10.1

  49. Network Configuration for DHCP • Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=dhcp IPADDR= NETMASK= BROADCAST= GATEWAY= • Edit the file /etc/sysconfig/network NETWORKING=yes HOSTNAME= GATEWAY=

  50. Basic PPP Configuration for Modems • In Windows, modems and other serial devices are named COM1, COM2 etc. • In Linux, these are referred as /dev/ttyS0, /dev/ttyS1 • At installation time a symbolic link called /dev/modem will be created for the modem • KDE graphical tool called “kppp” configures a dialup connection easily • Located in /usr/bin/kppp • Red Hat requires the root password to be entered each time kppp is executed for security reasons • Some distributions allow any user to execute this program such as SuSE

More Related