Click here to load reader

Linux LPI Bacis

  • View
    495

  • Download
    1

Embed Size (px)

Text of Linux LPI Bacis

  • Linux System Administrator

    Trang 3

    MC LC

    Bi Lab 1: Installing Linux as a Server ......................... 4

    Bi Lab 2: Package Management ................................. 21

    Bi Lab 3: User management ....................................... 29

    Bi Lab 4: Command Line ............................................ 38

    Bi Lab 5: Booting and Shutting Down ....................... 51

    Bi Lab 6: File Systems ................................................. 53

    Bi Lab 7: Core System Services .................................. 57

    Bi Lab 8: VNC Server ................................................. 60

    Bi Lab 9: Networking .................................................. 61

    Bi Lab 10: NFS .............................................................. 66

    Bi Lab 11: Samba server .............................................. 69

    Bi Lab 12: DNS server .................................................. 72

    Bi Lab 13: DHCP server .............................................. 76

    Bi Lab 14: Web Server ................................................. 79

    Bi Lab 15: FTP Server ................................................. 83

    Bi Lab 16: SSH Server ................................................. 86

    Bi Lab 17: Squid Server ............................................... 91

    Bi Lab 18: Firewall Server ........................................... 98

  • Linux System Administrator

    Trang 4

    Bi Lab 1: Installing Linux as a Server I/ Ci t:

    Ci t CentOS 5 Enterrprise (b 6 CDs).

    - Khi ng t CD Rom ca CentOS 5 enterprise - Khi chng trnh ci t khi ng, s hin th mn hnh:

    Chng ta c th chn cc ch ci t sau:

    : chn ci t ch ha (Graphical mode).

    Linux text : chn ci t ch text (text mode).

    Ngoi ra nu mun chn mt s option ci t khc, ta c th bm phm F2.

    - Chn Enter.

    Nu mun kim tra Source CD th chn OK, nu khng mun kim tra th chn Skip. Vic

    kim tra a gip ta pht hin a li, v trong qu trnh ci t nu c mt a li th ta s lm

    li ton b qu trnh ci t .

  • Linux System Administrator

    Trang 5

    - Chn Skip.

    Tin trnh ci t bt u.

    - Chn Next.

    Chn ngn ng trong sut qu trnh ci t.

    - Chn English chn Next.

  • Linux System Administrator

    Trang 6

    Chn keyboard thch hp.

    - Chn U.S. English chn Next.

    Phn chia partition:

    + Remove all partitions on selected drivers and create default layout: khi ta mun loi

    b tt c cc partition c sn trong h thng.

    + Remove linux partitions on selected drivers and create default layout: khi ta mun loi

    b tt c cc linux partition c sn trong h thng.

    + Use free space on selected drivers and create default layout: s dng vng trng cn

    li ca a cng chia partition.

    + Create custom layout: phn chia partition bng tay.

    - Chn Create custom layout chn Next.

  • Linux System Administrator

    Trang 7

    Thc hin phn chia partition:

    New: to partition mi, linux bt buc ti thiu phi to 2 partition sau:

    + Partition chnh cha th mc gc (/) v ht nhn (kernel), partition ny cn gi l

    Linux Native Partition.

    + Partition Swap c dng lm khng gian hon i d liu khi vng nh chnh

    c s dng ht. Thng thng kch thc ca partition Swap bng 2 ln kch thc ca

    vng nh chnh (RAM).

    Edit: sa partition.

    Delete: xo partition.

    Reset: phc hi trng thi a trc khi thao tc.

    RAID: s dng vi RAID (c ti thiu 3 cng).

    LVM: s dng vi Logical Volume Management.

    - To cc partition sau: Chn New to partition swap

    Chn File System Type : swap

    Chn Size: 1024 (gp 2 ln RAM)

    Chn OK.

  • Linux System Administrator

    Trang 8

    Chn New to partition /boot

    Chn Mount Point: /boot

    Chn File System Type : ext3

    Chn Size: tu

    Chn OK.

    Chn New to partition root (/)

    Chn Mount Point: /

    Chn File System Type : ext3

    Chn Size: tu

    Chn OK.

  • Linux System Administrator

    Trang 9

    Chn Next.

    - Ci t chng trnh boot loader GRUB v t password cho boot loader.

    Chn option The GRUB boot loader will be install on /dev/sda.

    Chn check box Use a boot loader password chn Change password.

    Nhp vo mt khu (123456) chn OK chn Next.

  • Linux System Administrator

    Trang 10

    - Thit lp cu hnh mng

    Chn Edit cu hnh Network Devices

    Chn Enable Ipv4 support chn option Activate on boot, khai bo IP Address v

    Prefix (Netmask).

    Chn OK.

    Hostname chn option manually nhp vo hostname.

    Miscellaneous Settings nhp vo Gateway, Primary DNS, Secondary DNS.

  • Linux System Administrator

    Trang 11

    Chn Next.

    - Chn khu vc a l ca h thng

    Chn Asia/saigon chn Next.

    - t password cho account root, Account root l account dng qun tr h thng v c quyn cao nht trong h thng.

  • Linux System Administrator

    Trang 12

    Chng trnh ci t yu cu password root phi c chiu di t nht 6 k t.

    Nhp password cho accont root (123456) chn Next.

    - Chn cc chng trnh v packages ci t

    Chn option Custumize now chn Next.

    - Chn cc chng trnh v packages ci t

  • Linux System Administrator

    Trang 13

    Chn nhm software chnh nn tri chn nhm software con bn phi chn

    Optional packages hin th danh sch cc software. Thc hin chn|b chn ci t hay g

    b cc software.

    Chn Close chn Next.

  • Linux System Administrator

    Trang 14

    - H thng sn sn ci t

    Chn Next.

    - Cc a c yu cu ci t

    Chn Continue.

  • Linux System Administrator

    Trang 15

    - Chng trnh ang c ci t

    - Ci t thnh cng, v reboot li h thng

    Chn Reboot.

  • Linux System Administrator

    Trang 16

    - Khi ng ln u tin sau khi ci t

    - First boot wizard xut hin

    Chn Forward.

  • Linux System Administrator

    Trang 17

    - Cho php Firewall

    Chn Firewall: Enabled, v chn cc dch v c php truy cp qua Firewall, c th thm

    cc port khc nu c nhu cu. chn Forward.

    - Chn cu hnh SELinux

    Chn SELinux Settings : Disabled chn Forward.

  • Linux System Administrator

    Trang 18

    - Chc nng Kdump dng lu li cc thng tin h thng trong trng hp h thng c s c

    Chn Forward.

    - Chn ngy gi cho h thng

  • Linux System Administrator

    Trang 19

    Nu ta mun thi gian s c Synchronized vi mt remote time server chn qua tab

    Network Time Protocol.

    Chn Forward.

    - To mt User account thng xuyn s dng trn h thng, khc vi account root

    Username: user Password:123456

    Chn Forward.

  • Linux System Administrator

    Trang 20

    - H thng s kim tra Sound card

    Chn Forward.

    - Ci thm software t cc CDs khc

    Chn Finish.

    - Login vo h thng

    Nhp vo username Enter.

    Nhp password Enter.

  • Linux System Administrator

    Trang 21

    Bi Lab 2: Package Management

    - Redhat Package Manager (RPM) l cng c dng Installing, Uninstalling v Upgrading

    software cho h thng Linux.

    - Mt RPM package l mt file cha cc chng trnh thc thi, cc scripts, ti liu, v mt s file

    cn thit khc. Cu trc ca mt RPM package nh sau:

    I/ Qun l package bng The Package Management Tool (dng giao din ha);

    - Vo menu Applications chn Add/Remove Software (nu ta dng command line c

    th dng lnh : system-config-packages)

    Mn hnh Package Manager.

  • Linux System Administrator

    Trang 22

    Chn nhm software chnh nn tri chn nhm software con bn phi.

    Chn Optional packages hin th danh sch cc software. Thc hin chn|b chn ci

    t hay g b cc software.

    Chn Close.

  • Linux System Administrator

    Trang 23

    Chn Apply.

    Chn Continue.

  • Linux System Administrator

    Trang 24

    - Ta c th tm kim danh sch cc packages c ci t (Installed packages) cng nh

    danh sch cc packages c th dng c cho ta download (Available packages) tab Search.

    - Ta c th lit k danh sch cc packages c ci t (Installed packages) cng nh

    danh sch cc packages c th dng c cho ta download (Available packages) tab List.

  • Linux System Administrator

    Trang 25

    II/ Qun l package bng RPM (dng command):

    1/ Xem c php lnh rpm: man rpm

  • Linux System Administrator

    Trang 26

    2/ Truy vn cc packages c ci t trn h thng (Query):

    rpm qa samba => lit k cc packages c tn l samba.

    rpm qa samba* => lit k cc packages c tn bt u l samba.

    rpm qa | grep samba => lit k cc packages c tn cha samba.

    rpm qd samba => lit k cc files ti liu lin quan n samba.

    rpm qi samba => lit k cc thng tin m t gi samba.

  • Linux System Administrator

    Trang 27

    rpm qc samba => lit k cc tp tin cu hnh ca samba.

    * Gii thch ngha ca cc tu chn dng Tu chn ngha

    -q (packagefile) hin th pa

Search related