LPI 101 Ch06 Configuring a Linux System

Embed Size (px)

Citation preview

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    1/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Chapter 6

    Configuring A Linux System

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    2/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Objectives

    Describe and configure the X Window System

    Describe and configurewindowmanagers and

    desktop environmentssuch as xdm, KDE, and

    GNOME

    Describe and use package (software)management

    utilitiessuch as Red Hat'srpm, Debian'sdselect,

    Slackware'spkgtool

    Examine how to add and configure devices

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    3/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    THE X WINDOW SYSTEM

    The X Window Systemis a Graphical User Interface (GUI)

    developed at the Massachusetts Instituteof Technology

    (MIT), runson UNIX and UNIX-like OS

    X Windowserver, is a program that draws graphics to thedisplay and relays any keyboard, mouse, orotherinput

    eventsbackto programsrunning under X or X clients

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    4/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    THE X WINDOW SYSTEM

    Windowmanagers and desktop environments takecareof

    thelook and feelof the desktop

    Nearly every Linux distribution comeswith afree X server

    programcalled XFree86, was developed and ismaintainedby The XFree86 Project, Inc

    There areother X servers that arecommercially available,

    including Accelerated-X ( from Xi Graphics) and Metro-X (

    from MetroLink). Formoreinformation visit:http://www.xfree86.org

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    5/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    X Client/Server Model

    The X serveris a program that takescontrolof the display

    and of theinput devices ( keyboard, mouse, );itsstarted

    with thecommand startx

    X clients are programs that use the X server forinput andoutput. The desktop and windowmanagers are alsojust client

    programs

    X clientsmay run on a machineanywhere on the networkand

    have their I/O managed by the X serveron a remoteworkstation

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    6/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Gathering Information

    To properly install the XFree86 windowing system, its

    necessary to gatherinformation about yoursystem

    hardware : video card, monitor, RAM, mouse and keyboard

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    7/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Video Card

    If you plan to purchase a new videocard, makesureit is

    supported by the XFree86 project. It is always a good idea to

    checkthelist ofsupported cards at:

    http://www.xfree86.org/4.0/Status.html If yourcard is NOT supported under XFree86 v4.1.0, lookat

    XFree86 v3.3.6'slist ofsupported cards. Use theolder version

    of XFree86 until they add your driverif necessary:

    http://www.xfree86.org/3.3.6/index.html

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    8/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Monitor

    If using a utility such as XF86Config or Xconfigurator to

    configure X, monitorconfiguration may be assimple as

    selecting yourexact model from a list.

    Howeverifconfiguring Red Hat's /etc/X11/XF86Config filebyhand, orif yourmonitoris not on thelist ofsupported

    hardware, you will need toknow therangeofhorizontal and

    vertical refresh rates that yourmonitorsupports.

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    9/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Installing XFree86

    Most Linux distributionsinstall XFree86 by default. It is

    also possible toinstall Xfree86 through common package

    formatssuch asrpm and deb

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    10/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Installing Over an Existing X Installation

    If you areinstalling X over an existing installation it is a good

    idea tomake a backup of yourcurrent setup in /usr/X11R6

    .Do NOT simply rename yourold directory, it willremove X

    applications you haveinstalled

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    11/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Configuring the X Window System

    There are tools available forconfiguring X Window System

    torun on yoursystem. These programsmodify XF86Config

    file ( residesin /etc/X11 or /usr/X11R6/lib/X11 )

    XF86Setup Xconfigurator

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    12/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Starting Your X Window System

    Morerecent distributionsoffer a choice toenable the X

    Window Systemenvironment directly after thesystem

    boots. This featurebrings the user to a graphicallogin

    screen, and implemented asrun level 5 in inittab

    You can start X Window from text consoleby typing startx

    command

    You can also temporary switch from X Window to text

    consoleby Ctrl+Alt+F1 (F1 through F6)

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    13/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    The xvidtune Utility

    This tool help you to aligned desktop on yourmonitor. It

    can adjust thesize and position of the desktop

    Type xvidtune at the prompt torun it if X isrunning

    The xvidtune utility allows forlow-levelreadjustment ofyour video display, so useit carefully

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    14/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    The .Xresources File

    Many applications that run under X can becustomized

    using externally configured settingscalled resources.

    Entriesin the .Xresources use thissyntax :

    program*resource: value program: The nameof theconfigurableclient

    resource: Theconfigurablesetting allowed by the

    program

    value: Thesetting of theresource

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    15/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    The .Xresources File

    The following is an excerpt from.Xresources that configurescolors for an xterm :

    xterm*background: Blackxterm*foreground: Wheat

    xterm*cursorColor: Orchidxterm*reverseVideo: false .Xdefaultsisloaded when thewindowmanagerisstarted and

    .Xresourcesismerged: both are "set" into X servermemoryusing the /usr/X11R6/bin/xrdb utility called from .xinitrcor asystemwide /etc/X11/xinit/xintrc

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    16/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Remote X Clients

    X boasts the ability to have X displaysrun over a network.You need toset theDISPLAY variable, which has three

    parts: :

    host : remote host nameon the network, IP addresses, domainname. Thelocalis used if the host is NOT specified

    display : specifieswhich display theoutput should be direct

    toward. A singlesystemcan managemany displays. Note that

    thecolon isstillrequired if the host isomittedscreen : is an optional parameter forcomputerswith more

    than onemonitor tosignify which monitor tosend the display

    to #export DISPLAY=:0.0

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    17/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    X Stations and X Terminals

    X stations and X terminals arediskless systems (sometimescalled "thin client") that requireonly a monitor and an X

    server

    They can beconfigured to access a remote host (X Server) torun graphicalclients

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    18/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    xdmand X Terminals

    To use X terminalwith your host

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    19/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Installing and Managing Fonts Under X

    XFree86 can beconfigured tosupport bitmap, TrueTypeand PostScript fonts

    Font servers arebackground process that makeinstalled

    fonts available to XFree86

    These font serverscan beconfigured tosupply fontsboth to

    XFree86 on thelocalmachine and toothermachines

    running X on the network

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    20/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Understanding the Font Path

    Thekey to understanding fonts under X is having a stronggrasp of thefontpath. Themain font path can beconfigured

    system-wideby editing the XF86Config file, orby adding

    directories to your font path using the xset command

    You can specify yourown font path using the FontPathdirectivein theFiles section of/etc/X11/XF86Config. Thesimplesyntax is:

    FontPath "path"

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    21/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Understanding the Font Path

    Section "Files"RgbPath "/usr/X11R6/lib/X11/rgb"FontPath "/usr/X11R6/lib/X11/fonts/miscFontPath "/usr/X11R6/lib/X11/fonts/Type1FontPath "/usr/X11R6/lib/X11/fonts/SpeedoFontPath "/usr/X11R6/lib/X11/fonts/100dpiFontPath "/usr/X11R6/lib/X11/fonts/75dpiFontPath "/usr/X11R6/lib/X11/fonts/local

    EndSection

    When XFree86 starts, it parses these font directories andincludes theircontentsin thelist of fonts available during theX session

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    22/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Understanding the Font Path

    On recent distributionsbased on Red Hat you may see alisting like:

    Section "Files"

    RgbPath "/usr/X11R6/lib/X11/rgbFontPath "/usr/X11R6/lib/X11/fonts/localFontPath unix/:-1

    EndSection

    The aboveis a reference to afontserverthat runsseparatelyfrom XFree86 and hasit'sown configuration file. It is alsopossible to haveboth paths to font directories and referencesto font serversin thesame XF86Config file

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    23/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Installing new Fonts

    If therewere a font directory on yoursystem at/usr/share/fonts/foo you could add them to your font path

    with the xset command :

    $ xset fp+/usr/share/fonts/foo

    $ xset fp rehash

    Fontsin the directory areonly available until userlogsout.

    To automate this you can add thesecommands toeither your

    .Xsession file, or .xinitrc orin the XF86Config filewithdirective FontPath

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    24/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Installing Fonts with XF86Config

    After the fonts areinstalled in the new directory, themkfontdir utility isrun tocatalog the new fontsin the new

    directory

    Newentries are added to theXF86Configfile toinclude the

    path for new fonts looklike:

    FontPath "/usr/share/fonts/foo"

    Restart X serveror font server torecognize the new fonts

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    25/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Font Servers

    Twomost popular font servers are xfs and xfstt. On RedHat,TurboLinux, Mandrake, xfscomescompiled tosupport

    TrueType fontsbut its not on Debian. With Debain system,

    you should install xfstt to provide TrueTypesupport.

    The font path for xfsis usually controlled by the

    /etc/X11/fs/config file. On Red Hat derived systems you can

    use thechkfontpath utility toselect a configuration file, and to

    add directories to the font path

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    26/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    WINDOW MANAGERS/ DESKTOP

    ENVIRONMENTS

    Its a program used to arrange, move, resize, windowson

    thescreen. There aremany windowmanager :

    KDE ( KDesktop Environment )

    GNOME ( GNU NetworkObject ModelEnvironment )

    Window Maker

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    27/53

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    28/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Configuring xdm

    xdm is distributed as part of XFree86 and isconfigured

    by a seriesof fileslocated in /etc/X11/xdm/. These files

    include:

    Xaccess This filecontrolsinbound requests fromremote hosts

    Xresources This fileissimilar to.Xresources.It holdsconfiguration information forsome xdm

    resources, including the graphicalloginscreen.

    Xservers This file associates the X display names (:0,:1, ...)

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    29/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Configuring xdm

    Xsession This filecontains thescript xdmlaunchesafterasuccessfullogin. It usually looks for.xsession inthe user's home directory and executes the

    commands found there. Ifsuch a file doesn'texist,Xsession starts a default windowmanager(orenvironment) and applications

    Xsetup_0 This fileis a script started before the graphicallogin screen

    xdm-config This file associates xdmconfiguration resourceswith theother filesin thislist. It usually isn'tnecessary tomakechangesin this file

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    30/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Running xdm manually

    Tostart xdm, simply enterit asroot

    # xdm

    Most Linux distributionsenable virtualconsoles. You can

    switch among them using thekey combinationsC

    trl-Alt-F1,Ctrl-Alt-F2, and soon. Typically, the first six consoles areset

    up as text-modescreens, and X launcheson console 7 (Ctrl-

    Alt-F7).

    If you want tostop xdm, simply stop the xdm process usingkillorkillallcommand from a text console:

    # killall xdm

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    31/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Running xdm automatically

    Thisline at thebottomof/etc/inittab instructsinit tostartxdm forrunlevel 5:

    # Run xdmin runlevel 5 x:5:respawn:/usr/X11R6/bin/xdm -

    nodaemon

    Using thisconfiguration, when thesystementersrunlevel 5,

    xdmstarts and presents the graphicallogin

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    32/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Modifying Xresources

    Thelookof the graphicallogin screen can be altered bymanipulating theresourcesin /etc/X11/xdm/Xresources

    !Xresources file

    xlogin*borderWidth: 10xlogin*greeting: Welcome to Linux on CLIENTHOST

    xlogin*namePrompt: Login:\040

    xlogin*fail: Login incorrect - try again! xlogin*failColor:

    red

    xlogin*Foreground: Yellow

    xlogin*Background: MidnightBlue

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    33/53

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    34/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Modifying Xsetup_0

    Toinclude additional X programsorsettingson the graphicallogin screen, put themin /etc/X11/xdm/Xsetup_0. In this

    example, thebackground colorof the X display isset to a

    solid color (in hexadecimal form), and a clockis added at the

    lowerrighthand cornerof thescreen:

    #!/bin/sh

    # Xsetup

    /usr/X11R6/bin/xsetroot -solid "#356390"/usr/X11R6/bin/xclock-digital -update 1 -geometry -5-5 &

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    35/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Install KDE

    KDEisoneof themany desktopsrunson all Linux

    distributions

    KDE dependson theqt libraries, install these packagesin

    order :

    qt kdebase kdenetwork

    qt-devel kdeutils k demultimedia

    kdesupport kdeadmin kdegames

    kdelibs k degraphics

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    36/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Terminal Emulators

    Oneof themost popular terminalemulatorsis xterm

    xterm providesDEC VT102 and Tektronix 4014 compatible

    terminals for programs that can't use thewindowsystem

    directly

    Configuration for xtermis found in the /usr/lib/X11/app-

    defaults/XTerm file. Thesyntax forentriesin the Xterm fileis

    thesame as thoseof .Xdefaultssinceis an Xresource file

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    37/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Package Managment

    Packages and packagemanagers are designed tosimplify

    installation process

    Package : collection ofrelated executable programs and

    associated data files : .rpm, .deb, .tar, .tar.gz, Packagemanagers : rpm (RedHat), dpkg (Debian),

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    38/53

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    39/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    RPM(RedHat Package Manager)

    Naming : RPM package (binary)

    ---architecture>.rpm

    Example: bash-2.0.5-8-i.386.rpm

    Input of RPM commands : package name orpackage file

    name

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    40/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    RPM Comands

    Install :

    rpm -ivh gcc-2.96-98.i386.rpm

    Upgrade :

    rpm -Uvh gcc-2.96-98.i386.rpm

    UnInstall :

    rpm -e gcc

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    41/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    RPM Comands

    List allinstalled packges :

    rpm -qa

    Listfiles containedin a specificinstalled package and where

    they arelocated:rpm -ql gcc

    List information about an installed packges :

    rpm qigcc

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    42/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    RPM Comands

    List packgeson which this packagedepends :

    rpm -Rgcc-2.96.i386.rpm

    Find out what packgesowns a given file:

    rpm -qf/usr/bin/gcc

    Verify the gcc packge:

    rpm -V gcc

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    43/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    The rpmrc File

    Thereisone file that controlsrpm's actions: /etc/rpmrc. Toview thesetting in rpmrc, use the --showrc flag :

    rpm --showrc

    Theoutput is divided into twosections: Architecture and operating system values

    rpmrc values

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    44/53

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    45/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Installing Software from Source

    Some distributionsrequire programs tobeinstalled fromsource asopposed tobinaries

    Softwaressourcecodeis usual under .tar, .tar.gzor .tgz

    formats

    Installing fromsource usually requires threesteps after you

    haveobtained the program:

    unpacking the tarball

    executing theconfigurescript

    making the program

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    46/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Unpacking the tarball (step 1)

    With .tar file :

    tarxvf foo.tar

    With .tar.gzor .tgz file :tarxjvf foo.tgz

    tarxzvf foo.tar.gz

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    47/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Executing the configure script (step 2)

    When thescript isexecuted, it lookson yourmachine tomakesure that it meets therequirements needed tocompile the

    program :

    #cd

    #./configure

    If theconfiguration terminatesbecausesomethingis missing,

    then it will generate an errorreport

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    48/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Making the program (step 3)

    Finally, we use themake and makeinstallcommands toactually compile thesoftware. Themakecommand actually

    compilesthe source code, whilemakeinstallcopiesthe

    compiled filesinto the system directories

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    49/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Using Packages Without a Package Manager

    If you want toexamine thecontentsof a package file and youdo not have thecorresponding packagemanager, there are

    two tools that you can use to doso :

    Midnight Commander (MC)is a programwhich can

    display the contents of files. If the fileis a package file, it

    willlist the filesin all directoriesin the archivecontained

    in the package

    Therpm2cpio program producesoutput that can be pipedtocpio : #rpm2cpio foo.rpm | cpio -t

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    50/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Adding Hard Drives

    1. Write down the new drive'sspecifications : the numberof

    cylinders, heads, sectors, and totalcapacity for your drive

    2. Configure the new drive appropriately for yourbus

    3. Install the new drivein yourcomputerchassis, ensuring that

    all data and powercables aresecurelyattached

    4. Configure your BIOS torecognize the new drive

    5. Boot youroperating system and ensure that the new driveis

    recognized

    6. Createoneormore partitionson your hard disk

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    51/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Adding Hard Drives

    7. Create the filesystemson partitions : usemkfscommand

    8. Create a mount point :

    mkdir /mnt/sparedisk

    9. Mount the drive

    mount -t ext3 /dev/hdb1 /mnt/sparedisk

    10. Test the new drive

    11. Update /etc/fstab formounting automatically when reboot

    by adding a newentry like:

    /dev/hdb1 /mnt/sparedisk ext3 defaults 1 1

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    52/53

    SAIGONLAB 83 Nguyn Th Nh, P9, Q.Tn Bnh, Tp. HCM LPI 102

    Adding NIC

    Linux supports a very large percentage of the NetworkInterface Controllers that exist today

    If there is no driver available in your current kernel, you will

    have to:

    Recompiled new kernel

    Obtain the current kernel sources

    Configure the kernel to use the proper driver

    Compile and install the new kernel

    Download device driver from Internet and install

  • 8/9/2019 LPI 101 Ch06 Configuring a Linux System

    53/53

    SAIGONLAB 83 N Th Nh P9 Q Tn B h T HCM LPI 102

    Summary

    Describe and configure the X Window System

    Describe and configurewindowmanagers and desktop

    environmentssuch as xdm, KDE, and GNOME

    Describe and use package (software)management utilities

    such as Red Hat'srpm, Debian'sdselect, Slackware'spkgtool,

    and alien

    Examine how to add and configure devices