Linux Os Myanmar

  • Uploaded by: weenyin
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Linux Os Myanmar as PDF for free.

More details

  • Words: 12,700
  • Pages: 75
1 Linux OS (Or) Open Source Operating System Getting Start with Linux OS What is Linux? Linux OS

jzpfw,f/ Linux udk 1991 ckESpfavmufwGif 32-bit architecture jzifh a&;om;cJhMuygonf/ Linux onf Unix OS ESifh qifwl aomfvnf; em;vnf xm;&rnfrSm Linux onf Unix r[kwfay/ Unix ESifh qifwlaomfvnf; (POSIX) Portable Operating System Interface on Unix jzpfonf/ Unix udk 1960 ckESpfwGif pwifa&;om;cJhMuNyD; ¤if;umvwGif C programming Language ay:vmojzifh C Language jzifh Unix OS udk AT&T bell lab company ua&;om;cJhMuonf/ ,cifu Unix onf open source OS wpfck jzpfaomfvJ aemufydkif;wGif AT&T rS rlydkifcGifh jyefvnf&&SdNyD; Close OS jzpfoGm;cJhonf/ Unix onf Close OS wpfck jzpfoGm;&kHrQru Dedicated hardware ay:wGifom run vdkY&onf/ Oyrm ajymqdk&rnf qdkvsif HP twGuf a&;om;xm;aom Unix udk IBM ay:wGif run vdkY r&Edkifay/ Linux OS onf Internet twGuf optimize toifh jzpfNyD;om; OS wpfck jzpfonfhtwGuf TCP/IP taMumif;udk tenf;tusOf; em;vnfxm;rS omvsif Linux udk avhvm&mwGif vG,fulvsifjrefrnf jzpfonf/ Linux onf multiuser, multitasking and multiprocessing jzpfonfhtjyif SMP (symmetrical multiprocessing) support jzpfonfhtwGuf Memory management ygvkyfEkdifonf/ 1992 ckESpfwGif Linux version 1.0 udk xkyfvkyfEdkifcJhonf/ Open source ESifh Close Source wdkY\ jcm;em;csufrSm kernel udk zGifhxm;ay;jcif;ESifh ydwfxm;ay;jcif; jzpfonf/ Linux kernel onf open kernel jzpfonfhtwGuf aMumifh pdwfBudKufjyKjyif okH;pGJEkdifonf/ [m

True 32-bit Operating System

The Linux Structure Operating System

2 Kernel

qdo k nfrSm OS \ core jzpfonf/ Shel onf command line interpreter [k ajymEdkifouJhodkY program wpfck[kívnf; jrifEdkifonf/ Shell qdkaom OS \ user interface udk OS \ kernel udk jyKjyifajymif;vJ a&;om;jcif;jzifh trsdK;rsdK;aom Linux OS rsm;ay:xGufcJh&onf/ ¤if;wdkYudk Distros (Commercial Linux Distribution) [kac:NyD; ¤if;wdkYteuf xif&Sm;vlodrsm;aom Linux OS rsm;rSm atmufygtwdkif; jzpfonf/ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ

Red Hat SuSE Caldera Open Linux Corel Linux Debian Mandrake Slack ware Turbo Linux and many more

Why Linux? Linux

udk tb,faMumifh okH;pGJoifhoenf;qdkaomf Linux onf Open Source jzpfonf/ Stable usaom OS wpfck jzpf&kHrQru Standalone odkYr[kwf Network ESpfckpvkH;twGuf aumif;rGefaom OS wpfck jzpfonf/ C, C++, Pascal, Cobol, Fortran, Delphi, Kylix ponfh programming language rsm;pGmtwGuf free jzpfaom library rsm; utilities rsm;udk support vkyfay;EkdifonfhtwGuf Programming uRrf;usifolrsm;twGuf txl;yif aumif;rGefonf/ system programming twGuf kernel udk pdwfMudKuf jyKjyif okH;pGJEkdifonf/ tjcm; platform rsm;ay:wGifvnf; 100% portability jzpfaom OS wpfckjzpfonf/ Linux OS udk Budge PCs ESifh Budget Servers rsm;wGif okH;&eftxl; oifhavsmfonf/ Computer Science ESifh ywfoufí avhvmvdkolrsm;twGuf vnf;aumif; Internet admin, system admin jyKvkyfvdk olrsm;twGuf Linux udk txl; oifhavQmfayonf/ Windows OS wGif GUI (Graphical User Interface) rygvsif t"dyÜg,fr&Sdaomfvnf;? Linux wGif GUI udk rygvsif&Ekdifonfh layer wGifom xm;&Sdonf/ tb,faMumifhqdkaomf Linux onf CLI (command line interface ) ESifh function trsdK;rdsK;udk vG,fulpGm okH;pGJEkdifaomaMumifh jzpfonf/

3 Preparing for Linux Operating System

wpfckudk install vkyfrnfqdkygu ta&;BuD;qkH;rSm File System jzpfonf/ xdkYaMumifh real life wGif tokH;rsm;aeaom media rsm;? OS rsm;\ file system rsm; taMumif;udk tenf;i,f od&Sdxm;&ef vdktyfayonf/ CD Rom onf ISO 9660 file system jzpfonf/ Windows OS rsm;onf FAT,FAT 32, NTFS ponfh file system rsm;udk tokH;jyKonf/ JFS, UFS ponfwdkYonfvJ oufqdkif&m OS tvdkuf tokH;jyKaom logical file system rsm; jzpfonf/ Hard Disk wpfckonf logical file system wpfckudk initiate vkyfay;rS omvsif OS wpfckwifEkdifrnf jzpfonf/ Linux OS onf EXT2, EXT3 file system rsm;udk tokH;jyKonf/ EXT3 wGif Generalizing file system yg0ifvmonf/ Hard Disk wpfck\ physical file system wGif Primary Partation 4 ckxufydk NyD;cJGvdkYr&ay/ xdkYaMumifh 4 ckxufydk cGJcsifygu Extended partition wpfck cGJNyD; logical partition rsm; cGJ&rnf jzpfonf/ Linux OS twGuf Boot vkyfay;Ekdifaom Primary Partation wpfckawmh cGJxm;&efvdktyfonf/ tu,fí rdrd\ pufwGif wpfckxufydkaom OS rsm; wifxm;vdkygu OS loader ac: Boot loader udk rnfhonfh OS \ loader jzifh wufrnf udk a&G;cs,fwwf&rnf/ xdkYaMumifh Linux OS rS yg0ifvmaom OS loader udk tokH;jyKrnf qdkygu ¤if; loader tm; MBR wGif xm;ay;&rnf/ MBR wGif OS loader odkYr[kwf Boot Loader udk wpfckxufydkí xm;vdkYr&ay/ Introduction to Linux Features Linux File System Linux File system

qdk&mwGif Linux u tokH;jyKaom File system rSm Ext2, Ext3 jzpfaMumif; od&SdNyD; jzpfonf/ odkYaomf ,ckajymvdkaom File system qdkonfrSm file system [k qdkaomvJ OS tokH;jyKaom file system udk qdkvdkjcif; r[kwfay/ Windows OS rsm;wGif File rsm;xnfhoGif;xm;onfh file tpkta0;udk directory odkYr[kwf folder [k ac:onf/ Linux wGif ¤if; folder rsm;? directory rsm;udk file system [k ac:onf/

4 Hardware Device in Linux Linux

OS

onf case sensitive jzpfaom OS wpfck jzpfonfhtwGuf trSm;cHvdkYr&ay/ Linux wGif " / " udk root [kac:onf/ device rsm;? Driver rsm;? file system rsm; tm;vkH;onf ¤if; root atmufwGifom &SdMuonf/ xdkYaMumifh IDE 1st hard drive udk /dev/hda IDE 1st hard drive \ partition 1 udk /dev/hda1 IDE 1st hard drive \ partition 2 udk /dev/hda2 IDE 2nd hard drive udk /dev/hdb IDE 2nd hard drive \ partition 1 udk /dev/hdb1 IDE 2nd hard drive \ partition 2 udk /dev/hdb2 [lí em;vnf assign vkyfxm; onf/ owdjyK&eftcsufrSm rdrd HDD wGif Extended partition &Sdaevsif ¤if; extended partition udk Linux OS rS /dev/hda4 tjzpf point vkyfay;xm;onf/ Floppy disk drive rsm;udk Linux wGif atmufygtwdkif; od&Sdem;vnf assign vkyfonf/ 1st floppy disk drive udk /dev/fd0 2nd floppy disk drive udk /dev/fd1 CD Rom drive twGuf /dev/cdrom udk Linux OS rS point vkyfay;onf/ Input device rsm;udk od&SdNyD;onfhaemuf output device rsm;udk rnfodkY assign vkyfxm;onfudk em;vnfxm;&rnf/ COM1 port udk /dev/ttyS0 COM2 port udk /dev/ttyS1 LPT1 udk /dev/lpt0 LPT2 udk /dev/lpt1 tjzpf assign vkyfay;onf/ " / " onf root file system jzpfNyD; windows \ command prompt c: ESifh twlwlyif jzpfonf/ dev onf device \ twdkaumufjzpfonf/ root ESifh ywfoufNyD; Linux \ administrator user taMumif;udk ajymrnfqdkygu windows wGifokH;aom system management vkyfEkdifonfh administrator user udk Linux wGif root user odkYr[kwf root [k ac:jyefygonf/ Linux wGif root user ESifh non-root user [lí a,bl,tm;jzifh ESpfydkif; cGJjcm;xm;Ekdifonf/ odkYaomf multi system jzpfonfhtwGuf individual account awGrsm;pGm&SdEkdifonf/ omreftvkyfrsm;ESifh operate vkyfrnf qdkygu

5 tjcm; individual user account rsm;ESifh operate vkyfEkdifNyD; twwfEdkifqkH; root account jzifh operate rvkyfrdap&ef *&kjyK&rnf/ tb,faMumifhqdkaomf Linux onf Open source jzpfNyD; kernel onfvJ open jzpfaeaomaMumifh root user account jzifh operate vkyfaecsdefwGif system files rsm;tm; edit vkyfrnf qdkygu rnfonfh wanning rS ay;rnf r[kwfay/ xdkodkYoabm&SdaomaMumifh root account jzifh operate vkyfjcif;udk wwfEkdiforQ owdjyK&rnf/ Basics Understanding Linux File System

wGif oufqdkif&m directory rsm; yg&SdouJhodkY Linux oufqkdifonfh File system rsm; yg&Sdonf/ xdkYaMumifh Linux \ fsh Hierarchy) udk avhvmrnfqdkvsif atmufygtwdkif; tajccHMuaom file jrifawGUedkifrnf jzpfonf/ Windows

/

root file system

/boot

(boot process

twGufta&;BuD;aom

files

OS

wGifvnf;

(File System system

rsm; yg&Sdonfh

wdkYudk

file

system) /etc /dev /bin

(system configuration files

rsm;yg&Sdonfh file system) (device tm;vkH;\ files rsm;yg&Sdonfh file system) (run Edkifonfh binary file rsm; tm;vkH;yg0ifaom

file system?

*.exe,*.com) /sbin /tmp

/opt /home

(system

\ special binary files rsm;yg0ifaom file system) (temporary file jzpfNyD; Windows \ temp folder ESifh twlwljzpfonf/) (Windows \ program files folder ESifh twlwlyif jzpfonf/) (user account rsm;\ files rsm; odrf;qnf;&m ae&m jzpfonf? documents and setting ESifh qifwl onf/ /home/Williom, /home/Jhon)

/usr

/var

/proc

(omref user account

ESifh oufqdkifonfh binary file rsm; yg&Sdonf/ manual files rsm;? documentations rsm;) (variable nature &Sdaom ykHrSefr&Sdonfh files rsm; yg&Sdonfh file system jzpfonf/ Oyrm print spool file, Email account file) (Process &JU twdkaumufjzpfonf/)

6

Installing Linux Windows OS installation method

tokH;jyKaeMu user rsm;taeESifh Linux OS udk install vkyf&mwGif rsm;ESifh &if;ESD;uRrf;0ifzkdY vdktyfygonf/ ¤if; installation methods

rsm;rSm•

CD Rom



WEB



NFS(network file system)

rS boot vkyfNyD; install vkyfjcif;?

ay:rS install vkyfjcif;?

jzifh install vkyfjcif;? NFS qdkonfrSm windows OS &Sd work group rsm;ESifh wlnDaom service jzpfonf/ Installation

methods

rsm;tjyif installation type rsm;udkvnf; em;vnfxm;&ayrnf/ Type a&G;cs,f&mwGif client ESifh server [lí ESpfrsdK;&Sdonf/ client taeESifh install vkyfrnfqdkygu vdktyfaom files rsm;udkom a&G;cs,fNyD; install vkyfEdkifygonf/ odkYaomf server qdkygu files system rsm; pkHvifzdkY ta&;BuD;onf/ tcsdKYaom Linux version rsm;wGif laptop computer rsm;twGuf oD;oefY installation type yg&Sdwwfonf/ xdkodkYr[kwfyJ custom qdkaom type rsdK;vJ &Sdwwfonf/ Installing Linux OS

rsm; install vkyf&mwGif personalize user rsm;twGuf ta&;rBuD;aomfvnf; server twGuf OS install vkyf&mwGif planning onf tvGefta&;ygaom tcef;u@ rS yg0ifonf/ xdkYaMumifh I/O(Input/Output devices), Programs ESifh Partation wdkYonf tvGefta&;BuD;onf/ OS

7 Partation

rSm root twGuf partition wpfck oD;oefY&Sd&rnf/ physical memory udk management vkyf&ef swap partition wpfck &Sd&rnf/ ¤if; swap partition onf rdrdpuf\ RAM memory yrmP\ ESpfq jzpf&rnf/ boot partition twGuf primary partition wpfck &Sd&rnf jzpfNyD; ¤if; partition onf hard disk \ cylinder 1024 twGif;wGif &Sd&rnf jzpfonf/ xdkYaMumifh Linux \ boot partition udk OD;pGm 100MB xm;NyD; cGJ&rnf/ server rsm;twGufrl partition rsm;udk tokH;jyKrnfh server tvdkuf /home, /var, /usr tp&Sdonfhtwdkif; cGJjcm;xm;&rnf jzpfonf/ tjcm;*&kjyK&ef tcsufrSm swap udk partition cGJjcm;&mwGif IDE drive wpfcktwGuf swap wpfck&Sd&rnf jzpfonfhtwGuf tu,fí rdrdpufwGif Hard drive ESpfck &Sdygu swap ESpfckcGJ&rnf/ Hard drive okH;ck &Sdygu swap okH;ck cGJxm;&rnf jzpfonf/ Linux OS udk install jyKvkyfonfh install methods rsm;teuf CD Rom rS install jyKvkyfonfh method rSm tokH;rsm;aomaMumifh atmufwGif CD Rom rS install jyKvkyfykH tqifhqifhudk azmfjyxm;ygonf/ wGif

Linux

\

minimum requirement

Booting with Linux Installer package Bootable Linux OS Installer CD

twGif;odkYxnf;NyD; pufudk restart ay;um CD rS Boot vkyfrnf qdkygu Linux \ Installation mode a&G;cs,faom screen ay:vmrnf jzpfonf/ Installation mode wGif Graphic mode ESifh text mode tjyif maintainence mode [lí a&G;cs,f&ef okH;ckyg&Sdonf/ Linux tm; pwifavhvmolrsm; taeESifh Graphical mode udkom a&G;cs,foifhonf/ xdkYaMumifh graphic mode udk enter EdkyfNyD; a&G;cs,fvdkufygu next step odkYa&muf&SdoGm;onfudk atmufygtwdkif; jrifawGUEkdifygonf/ udk

CD drive

8 ¤if;tqifhwGif Install vkyf&ef CD media udk awGU&SdaMumif;ESifh ¤if; CD tm; aumif;? raumif; ppfaq;Munfh&eftwGuf ar;jcif;jzpfonf/ tu,fí ppfaq;rI rjyKvkyfcsifygu skip udk a&G;cs,f&ygrnf/ xdkodkYa&G;cs,fvdkufaomtcgwGif RED Hat Linux Installation \ Welcome screen udk Graphic mode jzihfawGUjrif&rnf jzpfonf/

Next

udk ESdyfvdkufaomtcgwGif Linux OS tm; install jyKvkyfaepOfwGif tokH;jyKrnfh language setting a&Gcs,faom dialog box ay:vmrnfjzpfonf/

Next

button

udk EdkyfvdkufaomtcgwGif rdrdvuf&SdtokH;jyKaeaom trsdk;tpm;a&G;cs,fonfh dialog box ufk atmufygtwdkif; jrifawGU&rnf jzpfonf/

keyboard

9

aemufwpfqifhwGif vuf&SdtokH;jyKaeaom rdrdpufrS mouse trsdK;tpm; a&G;cs,fonfh dialog box rSm atmufygtwdkif; jzpfNyD; next button udk Edkyfum Installation Type a&G;cs,fonfh tqifhodkY oGm;&ygrnf/

Installation type

a&G;cs,f&mwGif Personal, Workstation, server ESifh [lí&SdNyD; rdrdtokH;jyKrnfh field t& installation type udka&G;cs,f&rnf jzpfonf/

custom

10

aemuftqifhwGif partition tydkif;a&mufNyD jzpfNyD; ¤if;wGif auto partition cGJjcif;ESifh manual cGJjcif; ESpfrsdK;udk a&G;cs,fcdkif;rnf jzpfonf/ tu,fí auto udka&G;cs,fygu vG,fulaomfvnf; rdrdpufwGif wpfckxufydkaom OS &Sdaeygu ¤if;OS udk xdcdkufysufpD;aprnf jzpfonf/ xdkYaMumifh manual udkom a&G;cs,fNyD; next udk click &ygrnf/ xdktcgwGif rdrdwdkYpuf&Sd partition onf Linux File system twGuf readable jzpfaom partition r[kwfonfhtwGufaMumifh Linux File system rS readable jzpfatmif Hard Disk tm; initialize vkyfrnf jzpfaMumif;ESifh ¤if; drive &Sd data rsm; ysufpD;aysmufqkH;rnf jzpfaMumif; owday;aom dialog bos ay:vmrnf jzpfNyD; YES udkom click &ygrnf/ tb,faMumifhqdkaomf manual partition udk a&G;cs,fxm;aomaMumifh next step wGif rdrdwdkYpdwfBudKuf partition udk cGJjcrf;pdwfjzmEdkifrnf jzpfonf/

11

xdktcg rdrdwGif&Sdaom Hard disk yrmPESifh ¤if;\ tcsuftvufrsm;tm; azmfjyxm;aom screen wpfck ay:vmrnf jzpfonf/

¤if;wGif New tm; click í partition topfwpfckudk zefwD;&ygrnf/ yxrOD;qkH; zefwD;aom partition rSm Linux operating System twGuf ta&;ygaom boot partition tydkif;jzpfNyD; xdk boot partition tydkif;onf primary jzpf&eftvGefta&;BuD;onf/ xdkYtjyif boot partition tydkif;onf Hard disk \ cylinder size wGif 1024 xufrausmfvGefap&yg/ 1024 xufausmfvGefvsif boot rwufaom error rsm; &&SdEdkifrnfjzpfaomaMumifh ¤if;partition udk hard disk \ cylinder 1024 rausmfaom xdyfqkH;tydkif; \ 100 MB

12 wGifxm;&Sd&ygrnf/ Boot /boot udka&G;cs,fNyD; file

partition

udk zefwD;&mwGif mount point drop down list wGif system type rSm Ext3 xm;&Sd&ygrnf/ Size(MB) udk 100 xm;í Force to be primary partition udk check vkyfum OK udk click &ygrnf/ ykHwGifjyxm;onfhtwdkif; jzpfygonf/

xyfrHí New udkEdkyfum swap twGuf partition udk owfrSwfay;&ygrnf/

*&kjyK&eftcsufrSm swap partition \ size onf rdrdpuf\ RAM yrmPxuf ESpfq ydkrsm;&rnf jzpfonf/ aemufqkH; usefaom root partition udk cGJjcrf;&mwGif mount point \ drop down list wGif "/" udk a&G;cs,fxm;&SdNyD; Fill to maximum all0owabl size udk check

13 vkyfay;rnfqdkygu usef&Sdaeaom Hard Disk tpdwftydkif;rsm;udk root partition wpfck wnfaqmufay;rnf jzpfonf/

"/"

rS ,lvdkuf&efjzpfNyD;

xdkodkY r&Sdrjzpf minimum vdt k yfaom partition okH;ckudk cGJjcrf;pdwfjzm owfrSwfay;NyD;aemuf tu,fí /usr, /home, /var tp&Sdaom partition rsm;udkvnf; rdrdwdkY tokH;jyKrnfh taetxm;ay:rlwnfum cGJvdku cGJEkdifonf/ t"duvdktyfaom partition okH;ckudk cGJjcrf;NyD;aemuf atmufygtwdkif; jrifawGU&rnf jzpfonf/

14 partition

cGJjcm;NyD;onfhaemuf? aemufwpfqifhwGif boot loader configuration tqifhudk jrifawGU&ygrnf/ tu,fí rdrdpufwGif tjcm; OS rsm;&Sdao;onfqdkygu ¤if; configuration screen rS add udk click NyD; OS trsdK;tpm;udka&G;cs,f&ygrnf/ odkYrSom puf boot up vkyfaomtcgwGif OS selector menu ay:rS wqifh tjcm; OS rsm;odkY vG,fulpGm ajymif;a&ThEkdifrnf jzpfygonf/ tu,fí Boot loader password udktokH;jyKrnf qdkygu pufpwifaom tcsdefwGif OS selector menue wGif password awmif;rnf jzpfonf/ xdYkjyif boot loader udk xm;onfh ae&monfvJ ta&;BuD;aMumif;udk MBR tydkif;wGif txufu &Sif;jycJhNyD; jzpfonf/ xdkYaemuf next udk click NyD; Network Configuration tydkif;odkY a&muf&Sdrnfjzpfonf/

15

Network Configuration

tydkif;wGif manually option udk check í rdrdpufESifh default Domain name udk &dkufoGif;&ygrnf/ xdkYaemuf Edit udk click aomtcg atmufygtwdkif; NIC twGuf IP configuration dialog box wpfck ay:vmrnfjzpfonf/ xdkodkYay:vmaom tcgwGif Configure using DHCP udk uncheck ay;í IP address ESifh NetMask wdkYudk rdrdwdkY tokH;NyKrnfh Network address ESifh subnetmask udk &dkufoGif;&ygrnf/

OK

NyD;aemuf Miscellaneous Setting wGif Gateway, Primary DNS Esifh Secondary DNS wdkYdudk &dkufoGif;&ygrnf/ Primary DNS ae&mwGif rdrdpuf\ IP address udkom&dkufoGif;&rnf jzpfonf/ tb,faMumifhqdkaomf Linux onf multiuser, multitasking jzpfaomaMumifh jzpfonf/ udk

click

16

xdkodkY&dkufoGif;NyD;aomtcgwGif Security ESifh oufqkdifaom Firewall setting tqifhodkYa&muf&Sdvmygonf/ rdrdonf Linux udk pwifavhvmol wpfa,mufjzpfygu ¤if;tqifhwGif Firewall setting tm; tokH;rjyKbJ xm;onfrSm toifhawmfqkH; jzpfygonf/ xdkYaMumifh No Firewall udk select vkyfNyD; Next udk click vdkuf&ygrnf/ xdkYaemuf additional language support setting ESifh Time Zone setting rsm;wGif rdrd ESpfouf&m a&G;cs,fí installation step udk qufvuf vkyfaqmif&ygrnf/ language support setting onf Linux OS tm; rdrdtokH;jyKvdkonfh language jzifh tokH;jyKEdkif&ef jzpfonf/ Time Zone onf system \ time jzpfNyD; Linux OS onf rdrdxm;&Sdaom time zone twdkif; operate vkyfrnf jzpfí server type installation wGif ta&;ygonf/

17

aemufwpfqifhonf security twGuf ta&;ygaom step jzpfNyD; root password owfrSwfjcif; jzpfonf/ root [kqdk&mwGif root user account ESifh root file system wdkY ESpfrsdK;pvkH; twGuf jzpfonf/ root account udk login vkyfNyD;rSomvsif system administration jyKvkyfEdkifrnfjzpfonf/ ¤if; step wGif password udkESpfBudrf &dkufEdkyf &rnfjzpfonf/ odkYrSom root password accepted jzpfrnf/

18

aemufwqifhonf Authentication Configuration jzpfNyD; ¤if;tqifhwGif Enable MDS password ESifh Enable shadow password [lonfh option ESpfckudk default tm;jzifh a&G;cs,fxm;onfudk awGUEdkifonf/ Enable MDS password qdkonfrSm rdrdwdkY qufvuftokH;jyKrnfh password length udk &SpfvkH;xufydkNyD; character 256 vkH; txday;Edkif&eftwGuf ¤if; option udk enable vkyfay;&rnf jzpfonf/ Shadow password udk enable vkyfjcif;tm;jzifh password file udk shadow file wpfck taejzifh encrypt vkyfNyD; odrf;qnf;aomaMumifh security twGuf pdwfcsaumif;rGefonf/

19

package

group

selection

wGif install vkyfvdkaom package rsm;tm; a&G;cs,fay;&ygrnf/ ¤if;wdkYwGif Desktop rsm;? Application rsm;? server rsm;? developer rsm;? system admin rsm;? yg0ifonf/ Miscellaneous onf package wpfckcsif;pDudk vdkufa&G;raeawmhyJ minimal option jzifh install vkyfygu rygrjzpf yg0if&rnfh package rsm;udkom a&G;cs,f install vkyfrnf jzpfNyD;? Everything udk a&G;ygu available jzpfaeaom package tm;vkH;udk install vkyfoGm;rnf jzpfonf/ next udk click ygu about installation dialog ay:vmrnf jzpfNyD; rdrda&G;cs,fcJhaom step rsm;tvdkuf installation vkyfrnfh tajctaeudk azmfjyygonf/ ¤if;aemuf next vdkufygu installation pwifrnf jzpfonf/

20

about installation dialog

rS next udk click vdkufaomtcgwGif installation udk atmufygtwdkif; pwifNyDjzpfygonf/

RED Hat Linux

a&G;cs,fxm;aom package yrmPESifh rdrdwdkYpuf\ pGrf;aqmif&nfay: rlwnfNyD; tcsdefMumjrifhrnfjzpfonf/ omreftm;jzifh package tukef install vkyfygu CPU speed 2.6 GHz &Sdaom pufwGif 2 em&DausmfMumrnf jzpfygonf/ Installation NyD;qkH;aomtcgwGif system csdkKU,Gif;rI odkYr[kwf user wdkY\ trSm;rsm;aMumifh system down cJhvsif ta&;ay: maintenance vkyfEdkif&eftwGuf boot diskette wpfck zefwD;jyKvkyf&eftwGuf ar;rnf jzpfygonf/ diskette udk rzefwD;vdkaMumif; No udk check vkyfNyD; next udk click &ygrnf/ xdktcg Linux installation NyD;qkH;NyDjzpfaMumif; ESifh login mode udk graphical mode

21 odkYr[kwf Text mode rnfonfh mode jzifh login vkyfrnfudk a&G;cs,f&ygrnf/ Text mode jzifh login vkyfrnfudkom a&G;cs,f&ygrnf/ tb,faMumifhqdkaomf graphical mode onf login 0if&mwGif tcsdefMumjrifhaomaMumifh jzpfonf/ text mode rS login 0ifNyD; Graphical mode odkYvnf; jyefoGm;Edkifrnf jzpfygonf/ xdkaMumifh Linux wGif Command rsm;onf ta&;ygaom tcef;u@rS yg0ifojzifh command udk rodrjzpf avhvmxm;oifhygonf/ Linux wGif ta&;ygNyD; tokH;0ifaom comman tcsdkKUudk atmufwGif azmfjyxm;ygonf/ Command adduser

alias

apropos at

batch cat

cd

chattr chfn

Synopsis adduser dsoneil

Description | This command will automatically add a new user to the system |The Bash script can be found in /usr/sbin if it needs to be changes alias help=man | The alias command allows you to substitute a new name for a command alias long=ls -al | An alias can also contain command line options | Unless the alias definition is included in your .login file it is only temporary apropos keyword | Display command names based on keyword search at 1:23 lp /home/index.html | The at command runs a list of commands at a specified time (e.g. print @ 1:23) at 1:50 echo ‘‘lp Job Done’’ | This uses the echo command to send a message at 1:50 saying a print job is done at ---l | Lists all scheduled jobs; an alias for the atq command at -d 5555 | This will cancel job number 5555; an alias for the atrm command Example: | Temporarily blank cat /etc/filename | Prints specified file to the screen cat file.a > file.b | Moves file.a to file.b cat -n file.a | This will show the contents of the file with line numbers (-b number only no blank lines) cat /proc/scsi/scsi | This will list all the SCSI processes running on your system cd /home/dsoneil | Changes directories to the specified one cd ~username | This will move you to the users specified home directory chattr +i /etc/passwd | makes the named file immutable. Attributes are not shown by ls; use lsattr chfn dsoneil | This will allow you to change finger

22

chmod

chown

clear cmp cp cpio

cpkgtool cron

date

dmesg df du

e2fsck

fc

fdformat

information on that user | As an example it will allow you to change dsoneil to Darcy S. O’Neil chmod 666 filename | This command will give a file Read - Write permission for everyone chmod 777 filename | This command gives Read - Write – Execute permission to everyone chmod a=rwx file | This gives Read - Write - Execute permission to all users chown dso /home/html | This command will change the owner of the specified directory to dso chown dso /home/file.a | This command will change the owner of the specified file to dso clear | This will clear your screen cmp -s file.a file.b | Compares 2 files of any type. The -s option will return nothing in the files arethe same cp file.a file.b | This will create a duplicate of file.a under a new file name, file.b ls /home | cpio -o > /root | This will copy the files of /home to the directory /root cpio -it < /root > bk.indx | This will extract all of the files to /root and creates an index file called bk.indx |Graphical front end to installpkg, removepkg, makepkg that uses ncurses. crontab -e | Edit your personnel crontab file | The main crontab files can be found in the /etc directory date | Will outout the present date to the screen date --date=‘‘2001-3-15‘‘ | This will set date to 2001-Mar-15 date --date=‘‘2001-3-15 11:59 AM’’ | This will set the date as well as time dmesg |Prints out the bootup messages so you can locate errors df -hT | Displays the total size, used and available space on all mounted file systems du -k /home/html | Provides a summary of the disk space usage, in kb, within the specified path du -k /home/html/file.a | Provides a summary of disk spaced used by a particular file e2fsck /dev/fd0 | To "scandisk" a floppy (run while the floppy is unmounted) e2fsck /dev/hda1 | Also can be used to scan for disk errors on hard drive partitions fc -l | Lists your recent commands (Beware that fc is dangerous w/o -l because it will run commands) fdformat /dev/fd0 | low level format of a floppy device in drive fd0 fdformat /dev/fd0H1440 |This will fromat a “Double Sided High Density”disk

23 file

find

finger free fsck git grep

groupadd groups gzip

history

hostname Ifconfig

insmod installpkg

| This command will try to determine what type of file file.a is. (exec, text, etc.) file -z file.a.tar | Looks inside a compressed file to determine it’s type. file -L file.a Follows symbolic links to be followed to determine file type find /path -name passwd | Locates the specified string (passwd), starting in the specified directory (/path) | All filenames or directories containing the string will be printed to the screen finger | This will list all users currently logged into the UNIX system free -t ---o | Provides a snapshot of the system memory usage fsck /had | file system check and repair | This is a file system viewer (Use F10 to exit) cat /etc/passwd | grep dso | This searches for and limits the command output to the pattern specified | In this case all instances of dso from the /etc/passwd file are printed grep -i ‘‘Sample’’ /home/dsoneil | The -i option makes the search indifferent to case (e.g. sample or SAMPLE) groupadd sudos | Create a new group called sudos on the system groups | Shows which groups you are in gzip file.a | This will zip file.a and give it the extension file.a.gz gzip -d file.a.gz | This will unzip the file file.a.gz tar -zxvf file.a.tar.qz | The z flag allow you to decompress the tar file on the fly history | grep sneak | To retrive your recent commands with "sneak" somewhere in them. 6/00 history -d 1061 | To delete history entry 1061, which may be a password in cleartext. | Get or set hostname. Typically, the host name is stored in the file /etc/HOSTNAME. ifconfig eth0 | This will display the status of the currently defined interface (.e.g Ethernet Card 0) ifconfig eth0 up | This flag causes the iterface to be activated (To deactivate an interface use down) ifconfig eth1 192.168.0.2 up | Makes eth1 active with IP address 192.168.0.2 | used (by root) to install modular device drivers installpkg -r packagename.tgz | This will install a Slackware package with the name you specify (-r option) file file.a

24 removepkg removepkg -copy packagename | This will remove the named package but make a copy in the /tmp directory rpm2targz rpm2targz filename.rpm | This will convert an RPM file to a Slackware .tgz package upgradepkg upgradepkg packagename.tgz | This will upgrade a Slackware package and remove any old or no used files ipchains ipchains [-A -s -d -j] [Input / Output] | This command is used to ACCEPT or DENY access to your system ipchains -A input -s 24.1.50.25 -j DENY | This will block the IP address 24.1.50.25 from accessing your system ipchains -A output -d 24.1.50.2 -j DENY | This command will DENY your system from accesing this IP address | [-A append] [-s source] [-d destination] [-j join] jobs jobs | This will list all jobs presently running on your system kernelcfg | GUI to add/remove kernel modules (as root in X terminal). kill kill 2587 | Kills the process specified by the Process ID Number (2587) kill -9 2587 | The -9 flag forces the process to die last last -300 | Prints to the screen the username, location, log-in and log-off times of the last last -5 username | -x logins to the system. The username will select the last x time that person has | used the system. The last command is not traceable. lastlog lastlog | Displays a list of the login attempts / times of all users on the system (security check) less less /html/index.html | Less displays information a screen at a time, you can also page back and forth lilo lilo ---v | To write or correct boot config to disk. Use this comand after modifying /etc/lilo.conf | Do this before rebooting (to avoid "LIL-" on startup) if it's been a while lilo -b /dev/fd0 | This command will make a boot disk ln ln -s /usr/dso ./home/html | Creates a “symbolic” link from the first directory or file to the second. A user changing | into ./home/html will actually be directed to the /usr/dso directory. locate locate wordperfect | The locate command will locate the file specified aand output a directory path (see “updatedb”) lpr lpr /home/html/index.html | This command will print the file index.html to the printer lprm lprm 12 | This command will cancel pint job 12 in the printer queue lpq lpq | This will show the contents of the print

25 ls

lspci lsof lsmod make

man

md5sum mkdir mkfs

more

mount

queue | Lists all information on all files (-a) in the current directory in single line | format (-l). Includes permissions, owners, modification time, file size and name ls ---F | Marks (directories with a trailing / ) - ( executables with an *) (symbolic links w/ @) ls /proc/sys/net/ipv4 | This will ist all IP4 (masquerading) entries in the system processes directories lspci | Lists your PCI devices lsof |grep :<port number> | This will show you what program has that port open. | used (by root) to show kernel modules currently loaded make mrproper | Cleans up junk accidentally left behind by the development team make menuconfig | This will ask you a series of questions about your system and drive requirements make dep | This will use dependencies make clean | The clean command will clean up any unnecessary files left lying around make bzImage | This will begin the process of compiling your new kernel make lnx | This specified that the source will be compiled under a Linux system make install | After the make command this will install the compiled binaries to their directories make modules | This will compile all the necessary modules make modules_install | This will install modules into the /lib/modules directory man vi | Prints the manual page on the specific topic (vi) to the screen. To scroll down | the page use the Space Bar, to scroll up use the letter b, to exit press the q key. md5sum filename.tgz | To ensure a copy between machines went perfectly mkdir pascal | This will create new directory (pascal) in the present directory mkfs -t msdos -c -v /dos-drive | Formats a partition and builds a new filesystem on it mkfs -t xfs -c -v /home | -t specifies filesystem type, -v produces verbose output, -c checks for bad blocks more /home/html/index.htm | Paginates the specified file so it can be read line by line (using Enter key) or | screen by screen using the Space Bar. Use b key to move back and q to quit. mount -t msdos /dev/hda5 /dos | Mounts the msdos partition on the Hard Drive (hda5) to the directory /dos ls -al

26

mv netstat

nice

nmap

nohup passwd ps

pstree pwd quota

renice

rm

rmdir

mount -t iso9660/dev/sr0 /cd | Mounts the CD-ROM under the directory /cd mount -t msdos /dev/fd0 /mnt | Mounts the floppy drive with an msdos file system to /mnt mount -a /etc/fstab | Attempts to mount all file systems located in the /etc/fstab file mv ./home/file ./dso/file | Moves the specified file to another directory netstat -tap | grep LISTEN |This will give us a list of all currently running TCP servers that are LISTENing on a port netstat -t -u ---a | This will list all UDP and TCP ports that are open nice -5 sort one.a > two.b | This command adjusts the priority of a process before it starts | The higher the number the lower the priority. All process start at 10 nmap localhost | This will port scan the ‘localhost’ server to determine open ports nmap -sT -sU -p 1-65535 localhost | This will thoroughly check all ports on the system (both UDP and TCP) | This command allows a process to continue after you log out passwd | Launches the password program so the user can change their password ps | Lists all current running processes, their corresponding pids, and their status ps -ef | grep dsoneil | This will find all of the processes for user dsoneil pstree ---p | Provides a list of running processes in a tree structure pwd | Prints the current working directory quota | Lists the user’s quotas for both ada (/home/ada/a#/username) and amelia | (/var/spool/mail/username), indicating the number of blocks used and the users quota. renice -5 6641 | Adjusts the priority of the running process 6641 (The 5 lowers the priority to use less resources) rm file.a | Removes the specified file in your current directory rm -i file.a | Removes specified file but prompts for confirmation before deleting rm -r /home/dso | Removes the specified directory and all files in that directory rmdir pascal | Removes the empty directory specified, if not empty you will receive an error rmdir -r pascal | Removes the directory and all files in that directory (if supported)

27 route

rpm

su

shutdown

sort tar

top

route -n | Displays the Linux Kernel IP routing table route add -net 192.168.0.0 eth0 | This will tell other systems what network to route your system on route add default gw 192.168.0.5 eth0 | This will tell the your system where the Internet gateway is located | This information can be added to you /etc/rc.d/rc.local system files (Slackware) rpm -i file.2.0-i386.rpm | This will unpack an RPM file. This is the most basic method of installation rpm -U file.2.0-i386.rpm | This will install an upgrade to a previous RPM package. rpm -i ---force file.rpm | The –force option will force the package to re-install rpm -e file.2.0-i386.rpm | This will remove and RPM package. (You do not need to use the complete name) rpm -i ---nodeps file.rpm | This command uses the “no dependencies” flag. rpm ---qa | This will give a screen print out of all packages installed (q is query) rpm -qa | grep gtk | This will print out all of the rpm packages will gtk in the file name rpm -qi file.2.0-i386.rpm | This will provide information on the package you are about to install rpm ---rebuild file.2.0.rpm | This will rebuild a package if it has been corrupted by another installation process su username | This will allow you to access the Superuser privileges. Type exit to revert back to normal shutdown -t 10.00 | This will notify all logged in users that the system will shut down at 10:00 AM shutdown -r -t 20.00 | This will reboot the system at 8:00 PM shutdown -t +10 good day | This will shutdown the system in 10 minutes with the message “good day” sent shutdown ---f | The -f flag will cause Linux to do a fast reboot sort myfile | To sort files. (Options -r Reverse normal order, -n Sort in numeric order tar -cf /usr/dso.tar /home | This command copies the directory /home to the file /user/dso.tar tar cvf /backup.tar /dso | This will create a tar archive of everything in the directory /dso tar -xvf file.a.tar | This command will extract the tar archive tar -tvf file.a.tar | more | This will allow you to check whether the tar archive starts with a directory tar -zxvf file.a.tgz | This command will unzip and extract the file in one step as opposed to using gzip M for memory usage information | This program shows a lot of stuff that goes on with your system. In the P for CPU information | program, you can type: q to quit

28 touch

touch file.a

umask

umask -S u=rw,g=,o=

umask 022

uname

uname -a

updatedb uptime

updatedb uptime -a 192.168.0.100

userdel

userdel -r dsoneil

w

w

whatis

whatis cat

which

which -a filename

who

who

whoami

whoami

| Creates an empty file in the current directory with the name file | Specify the permission for files when files are created for owner(u),group(g), and others(o) | you can use 022 for read only file permission for others and 077 for read and write permission | This will print to the screen the Linux Kernel in use on your system | This will update the “locate” database | Shows system uptime and includes a list of users who have been idle for more than one hour | This will delete the user dsoneil from the system, the -r option will delete the users /home | Lists all users currently logged into the UNIX system. Provides information such | as username, login time, idle time, and current action | Provides a one-line summary of the command | This will search through all directories in your current path and find all files named filename | Lists currently logged on users username, port, and when they logged in | Tells the user who they are acting as; usually their own username.

Other Useful Commands Ctrl-Alt-F1: installation dialog Ctrl-Alt-F2: shell prompt Ctrl-Alt-F3: install log Ctrl-Alt-F4: system related messages Ctrl-Alt-F5: other messages Ctrl-Alt-F7: X graphical display

txufazmfjyyg Linux commandrsm;onf tokH;rsm;aom Linux command rsm;jzpfMuNyD; Linux command ajrmufrsm;pGm usef&Sdaeygao;onf/ xdkYtjyif command wpfckpDwGif ]]-}} cH&&dkuf&aom switch rsm;&SdouJhodkY ]]--}} cH&dkuf&aom switch rsm;vJ yg&Sdavh&SdMuonf/ Command wpfckwGif switch tenf;qkH; 10 ckpDcefY yg&SdwwfMuonf/ Linx \ command rsm;onf rsm;jymvGef;onfhtjyif command wpfckpDwGifvnf; switch rsm;pGm yg&SdaomaMumifh tvGwfusufrSwf&ef cufcJygonf/ xdkYaMumifh command

29 wpfcktaMumif;udk od&Sdvdkygu man cHNyD; &dkufEdkyf&ygrnf/ man qdkonfrSm manual \ twdkaumuf jzpfonf/ Oyrm ls command tm; rnfodkY tokH;jyK&rnf udk odvdkygu man ls

[k&dkufoGifygu ls command \ taMumif;t&mrsm;? rnfodkYtokH;jyK&rnf ponfwdkYudk azmfjyrnf jzpfonf/ xdkYtjyif ls --help [kvnf; &dkufoGif;ygu tvm;wl output rsdK; azmfjyrnf jzpfonf/ Linux wGif tokH;jyKaom software rsm;? utilities rsm; udk tokH;jyK&ef tcuftcJ&Sdyg howto command onf Linux beginner rsm;twGuf rsm;pGm taxmuftul ay;aom command jzpfonf/ howto command \ syntax rSm atmufygtwdkif; jzpfonf/ apache -howto email -howto Linux command

rsm;udk ravhvmrnf linux files system rsm;\ permission taMumif;udk od&Sdxm;&ygrnf/ tb,faMumifhqdkaomf Linux onf multi user, multitasking jzpfaomaMumifh file permission tydkif;onf t"duusaom tydkif;wGif yg0ifonf/ xdkYtjyif Linux onf device rsm;? directory rsm;? files rsm;tm;vkH;udk file tjzpfom handle vkyfaomaMumifh jzpfonf/ Linux wGif file permission udk 10-bit jzifhowfrSwf control vkyfonf/ yxrOD;qkH; bit onf file system udk nGef;onf/ file, directory ESifh device wdkYtm; list vkyfMunfhaomtcgwGif ay:vmaom list xJrS file rsm;\a&ShwGif ]]-}} ygvmvsif file [k od&SdEdkifonf/ "d" qdkvsif directory jzpfNyD; "l" qdkvsif physical r&SdbJ tjcm; file wpfckudk link vkyfxm;onf[k odEdkifonf/ "c" qdkvsif character device jzpfonfh modem rsm;? tape drive rsm;udk qdkvdkonf/ "b" qdkygu block device qdkaom floopy rsm;? CD rsm; jzpfMuonf/

30

ls

comman

tokH;NyKNyD;

files

rsm;udk

list

vkyfMunfhyHktm; atmufwGif

azmfjyxm;ygonf/

txufwGif azmfjyxm;onfhtwdkif; "-" ygonf files system rsm;onf files rsm; jzpfMuNyD; "d" rsm;onf directory rsm;jzpfMuonf/ aemufxyfusef&Sdaom 9-bit onf file permission tydkif; jzpfonf/ File type & permission drwxr-x---

depth

owner

group

size

Creation time

filename

12

root

root

4096

Sep 18 14:17

gtkrc

31 txufwGif azmfjyxm;onfhtwdkif; File type & permission tydkif;wGif 10-bit udk awGU&Sd&rnfjzpfonf/ d onf directory jzpfNyD; rwxr-x--- onf file permission jzpfonf/ r, w, x \ t"dyÜg,frSm ESifh wefzdk;rSm atmufygtwdkif; jzpfonf/ r = 4 Æ read w = 2 Æ write x = 1 Æ execute d rwx r-x --d 421 4-1 0 d 7 5 0

txufwGif azmfjyxm;onfh twdkif; yxr okH;wGJonf root twGuf permission jzpfonf/ 'kwd,onf group twGuf jzpfonf/ wwd,onf root group xJwGif ryg0ifonfh user rsm;twGuf permission jzpfonf/ r, w, x ESifhywfoufNyD; Linux wGif umask qdkonfh default permission wpfck&Sdonf/ umask \ default value rSm 022 jzpfonf/ Full permission access

777

umask

022 755

xkdYaMumifh Linux wGif omref text file wpfck zefwD;wdkif; xdk file \ default permission rSm 755 jzpfonf/ file permission ajymif;&mwGif tokH;jyKaom command rSmchmod jzpfonf/ chomd \ t&SnfrSm change mode jzpfonf/ chmod udk okH;&ef erlem syntax rSm atmufygtwdkif; jzpfonf/ chmod 777 filename chmod a=rwx filename

txufyg command line rsm;onf file wpfcktm; user tm;vkH;udk write, execute vkyfEkdifaom permission ay;onfh command rsm;jzpfonf/ Operating system

r[kwfyJ shell Linux \ shell

read,

rsm;wGif OS udk tokH;jyKol user rsm;u wdkuf&dkufcdkif;apcsif udkom apcdkif;csif;jzpfonf/ xdkYaMumifh Linux OS wGifvnf; shell &Sdonf/ rSm Unix \ shell (3)rsdK; jzpfaom

32 bsh = borne shell ksh = korne shell csh = cshell Linxs

wdkYjzpfonf/ (3)rsdK;onf toGifajymif;NyD;

wGif xdk shell bsh onf bash (born again shell) ksh onf kash C onf c shell taejzifh a&muf&SdcJhonf/ Linux \ bash wGif command completation qdkaom feature ygonfhtwGuf pmwpfvkH;&dkufNyD; tab cvkwfEdkyfvdkufygu command line twGJvdkuf ay:aom pepfyg0ifonf/ txufwGif Linux ESifhywfoufaom command rsm;? Linux \ tajccHMuaom feature tcsdKUudk avhvmcJh&NyD; jzpfonfhtjyif Linux OS version 9 udk graphical mode jzifh install vkyfykH tqifhqifhudk od&SdcJhNyD; jzpfonf/ xdkYaMumifh Linux OS jzifh pwiftvkyfvkyf&eftwGuf vnf;aumif; command rsm;ESifh &if;ESD;uRrf;0if&eftwGuf vnf;aumif; atmufwGif qufvufazmfjyygrnf/ yxrOD;pGm Linux udk pwif&mwGif Linux RED Hat \ OS choice menu ay:vmrnf jzpfonf/

xdkYaemuf enter Edkyfvdkufaomtcg linux OS rS device rsm; command rsm; ? features rsm;udk loading vkyfaeaom tcsuftvufrsm; azmfjyonfh screen udk awGU&Sd&rnf

33 jzpfonf/ xdkYaemuf Linux OS tm; install vkyfpOfu Text mode ESifh login 0ifrnf [k option ay;cJhaomaMumifh Text mode login udk atmufygtwdkif; awGU&Sd&rnf jzpfonf/

¤if; login name wGif root user taeESifh 0ifa&mufrnf qdkygu root [k&dkufEdkyfNyD; enter Edkyfygu root password awmif;rnfjzpfonf/ root password &dkufoGif;NyD; enter Edkyfygu root user taeESifh login 0ifNyD;atmufygtwdkif; jrifawGU&rnf jzpfonf/ password udk jrifawGU&rnf r[kwfay/

34 root

0ifNyD;aomtcgwGif owdjyK&eftcsufrSm # sign jzpfonf/ # onf root authority &aom user rsm;wGifom jrifawGUEdkifrnf jzpfNyD; tjcm; root authority r&aom user rsm;wGif # sign tpm; $ sign udk awGjrifEdkifonf/ qufvufNyD; rdrdonf rnfoljzpfonf? rnfonfh account jzifh 0ifa&mufvkyfudkif aeonfudk odvdkygu t&dk;&Sif;qkH;jzpfonfh command rSm whoami jzpfonf/ xdkYaemuf root r[kwfaom omref user account wpfckudk jhon [laomtrnfjzifh create vkyfMunfhrnfjzpfonf/ user account zefwD;onfh command rSm useradd jzpfonf/ zefwD;vdkufaom user account jhon twGuf password ay;aom tcgwGif passwd jhon [k &dkufEdkyfvdkufygu changing password for user jhon [k ay:vmrnf jzpfonf/ xdktcg rdrd&dkufoGif;vdkaom password udk &dkufoGif;&ygrnf password onf wdkvGef;aeygu odkYr[kwf vG,fulaeygu BAD password jzpfaMumif; ajymrnf jzpfaomfvnf; password conformation wGif &dkufoGif;cJhaom password udk aemufwpfBudrf &dkufoGif; &rnf jzpfonf/ xkdtcg user acoount jhon twGuf password rSm successfully change jzpfoGm;aMumif; azmfjyrnf jzpfonf/ taeESifh

login

zefwD;xm;aom user account jhon udk delete vkyfrnfqdkygu command rSm userdel jzpfonf/ xdkYaMumif; userdel jhon udk &dkufEdkyfygu jhon qdkaom user account ysufoGm;rnf jzpfonf/ xdkYaemuf clear udk &dkufEdkyfygu screen &Sif;oGm;rnf jzpfonf/ tu,fí rnfonfh user account rSrqdk logout vkyfvdkygu Ctrl+d odkYr[kwf exit udk&dkufEdkyfygu logout jzpfoGm;rnf jzpfNyD; login screen odkY jyefvnfa&muf&Sd oGm;rnf jzpfonf/ tu,fí file wpfckudk zefwD;vdkygu command rSm touch jzpfonf/ syntax rSm atmufygtwdkif; jzpfonf/

35 touch filename

qdkaom file wpfckudk wnfaqmufvdkufjcif;jzpfonf/ ¤if; atmufxJodkY xnfhvdkvsif

test directory

file

udk

temp

cp test /tmp

jzpfonf/ cp qdkonfrSm a&mufra&muf odvdkvsif

copy

\ twdkaumuf jzpfNyD;

temp directory

atmufodkY

ls -al /tmp/test

[k &dkufEdkyfvdkufygu awGU&rnf jzpfonf/ test file udk jyefzsufvdkygu command rSmrm test

jzpfNyD; file tm; zsufrnfqdkonfh conformation udk ar;rnf jzpfonf y udk &dkufEdkyfvdkufygu ysufoGm;rnf jzpfonf/ ls -al command jzifh jyefMunfhygu ysufoGm;onfudk awGUjrif&rnf jzpfonf/ Linux onf login 0ifvsif0ifcsif; '/' ac: root directory xJodkYa&mufaeayvdrfhrnf/ tjcm; directory xJodkY oGm;csifygu DOS rSmuJhodkY cd (change directory) jzpfonf/ temp directory odkYoGm;vdkvsif cd /tmp [k&dkufEdkyf&rnf/ rdrda&muf&Sdaeaom directory udk odvdkvsif pwd (print working directory) qdkaom command udk &dkufEdkyfygu vuf&Sda&mufaeaom directory udk azmfjyrnf jzpfonf/ aemufwzef test qdkaom file wpfck zefwD;NyD; ¤if; file tm; test 1 [k emrnf ajymif;vdkygu mv qdkaom command jzpfonf/ xdkYtjyif ¤if; file tm; permission ajymif;rnfqdkygu chmod qdkaom command udk okH;&rnf jzpfonf/ atmufwGif emrnfajymif;ykHESifh permission ajymif;vJykHwdkYudk azmfjyxm;ygonf/

36

file

rsm;tm;

list

vkyfMunfhaomtcgwGif tpdrf;a&mifrSm tjzLa&mifrSm ASCII file jzpfonf/

binary

file

jzpfNyD;

System Administration Linux

wGif system udk configuration file rsm;jzifh xdrf;csKyfonf/ xdk configuration file rsm;onf omref ASCII file rsm;omjzpfonfhtwGuf ¤if; file rsm;udk edit vkyf&ef editor rsm;jzifh configure vkyf&onf/ Edit vkyfaom editor rsm;pGm&Sdonfhteuf 1990 ckESpf linux pwifay:aygufonfhtcsdefrS pwifí ,aeYwdkiftokH;jyKvsuf&Sdaom editor rSm vi editor jzpfonf/ aemufwpfrsdK;rSm mcedit ESifh tjcm; third party editor rsm;vJ&Sdonf/ vi onf tjcm; editor rsm;ESifh ,SOfvsif ydkrdkaumif;rGefonfrSm script vkyf&mwGif process awGudk sentence rsm;jzifh edit vkyfEdkifonfhtwGufjzpfNyD; vi onf linux ray:cif ay:cJhzl;aom edlin qdkonfh line editor ESifh qifwlonf/ vi \ command rsm;onf vG,fulonfhtwGuf linux &Sdvsif vi &Sd&rnf jzpfNyD; vi &SdaeorQ Linux &Sdaernf jzpfonf/ xdkYaMumifh Linux tokH;jyKolrsm; taeESifh vi udk tuRrf;w0if&Sd&ef vdktyfonf/ vi editor udk pwifrnf qdkygu command rSm t&dk;&Sif;qkH; jzpfNyD; vi [k &dkufEdkyf&kHjzifh vi editor odkY 0ifa&mufoGm;rnf jzpfonf/ tu,fí temp qdkaom file wpfckudk vi jzifh create vkyfrnfqdkygu vi temp [k&dkufEdkyf&ygrnf/ vi editor wGif pwif edit vkyf&ef 'i' Edkyfvdkufrnfqdkygu inseart [k screen \ atmufqkH;wGif ay:vmrnfjzpfonf/ xdkYaemufrdrd vdk&mudk edit vkyfEdkifrnf jzpfonf/

37

vi editor

rvkyfyJ vi editor udk command ay;vdkygu Esc cvkwfudk &dkufEdkyfNyD; command ay;Edkifygonf/ owdjyK&efrSm Esc udk &dkufNyD; ':' sign udk &dkufay;&onf/ odkYrSom command ay;Edkifrnf jzpfonf/ vi editor tm; edit vkyfNyD;vsif save vkyf&ef command rSm Ecs EdkyfNyD; ':' sign Edkyf&ygrnf/ NyD;vsif 'w' jzpfonf/ write [k t"dyÜg,f&onf/ vi editor rS save vkyfNyD; xGufvdkygu wq jzpfNyD; tu,fí bmwpfckrQ edit rvkyfyJ xGufvdkvsif !q jzpfonf/ zefwD;xm;aom temp file wGif line tcsdKU&dkufEdkyfNyD; txufazmfjyyg command rsm;twdkif; save NyD; vi editor rS xGufMunfhyg/ xdkYaemuf vi temp qdkaom command jzifh temp file udk jyefzGifhMunfhEdkifygonf/ xdkYtjyif edit rvkyfyJ Munfh&kHrQom Munfhvdkvsif cat command udk okH;Edkifonf/ cat filename jzpfonf/ temp file udk Munfhrnfqdkygu cat temp jzpfonf/ cat taMumif;udk odvdkygu cat --help udk&dkufEdkyfNyD; tao;pdwfod&SdEdkifrnf jzpfonf/ zefwD;xm;aom temp zdkiftm; vi editor jzifhjyefvnf edit vkyfrnf qdkygu vi temp [k &dkufEdkyfNyD; edit vkyfEdkifonf/ ¤if; file twGif;rS lne wpfcktm; copy vkyfvdkygu copy vkyfvdkaom line wGif coursor xm;NyD; Esc udkEdkyfNyD;vsif yy udkEdkyfNyD; copy ul;&ygrnf/ xdkYaemuf paste csvdkaom ae&mwGif coursor xm;NyD; pp udkEdkyfrnfqdkygu copy ul;NyDjzpfygvdrfhrnf/ wpfaMumifr[kwfyJ 5 aMumif; copy yGm;vdku 5p jzpfonf/ 3 aMumif; jzpfu 3p jzpfNyD; zsufvdku dd udkEdkyfNyD; zsuf&rnf jzpfonf/ wGif

insert

38 Esc

udkEkdyfNyD; j, k,l, h udk EdSyfygu coursor udk tay:atmuf ab;b,fnm oGm;wmjzpfonf/ vi editor twGif rdrd&Smvdkaom pmvkH;udk &Sm&eftwGuf command rSm Esc udk EdkyfNyD; / ESifh &SmcsifwJh pmvkH;udk (/ice) &dkuf&rnf jzpfonf/ vi editor jzifh configuration file rsm;udk edit vkyfjcif; taMumif; od&SdNyD;onfhaemuf atmufygtwdkif; vufawGUprf;oyfMunfhEdkifygonf/ cd /etc udk&dkufEdkyfí etc directory atmufodkY0ifNyD; ¤if; directory xJ&Sd passwd tm; vi passwd command jzifh edit vkyfMunfhygrnf/ vi editor odkYa&muf&SdaomtcgwGif jhon user account ab;&Sd 501 ESifh 502 wdkYonf user ID rsm;jzpfMuonf/ ¤if; ID rsm;ae&mwGif 0 wefzdk;rsm; tpm;oGif;NyD; wq jzifh write vkyfNyD; quit vkyfrnfqdkygu jhon onf root \ authority &aom user account jzpfoGm;ayvdrfhrnf/

tu,fí rdrdpufxJwGif root authority &aom od&Sdvdkygu grep jzifh atmufygtwdkif; MunfhEdkifonf/

user account

b,fESpfck&Sdaeonfudk

cat passwd | grep 0:0 | wc -l

xdktcg ta&twGuf rnfrQ&SdaeaMumif; atmufwGifazmfjyxm;onfhtwdkif; vkyfjyrnfjzpfonf/

print

39 tu,fí omref user account jzifh tvkyfvkyfaepOftwGif; root account taejzifh authorized vkyf&rnfhtydkif;rsm;wGif su – udk tokH;jyKNyD; root user account taejzifh tvkyfvkyfEdkifonf/ odkYaomf root password udk&dkufoGif;ay;&rnf jzpfonf/ tu,fí '-' sign rygvsif root account \ shell tppftrSefudk rokH;yJ vuf&SdtokH;jyKaeaom user \ shell udk tokH;jyKum root \ authority udk&,lrnf jzpfonf/ The signal of Linux Linux

wGif OS pwifjcif;? reboot vkyfjcif;? Graphical mode ESifh pwifjcif; odkYr[kwf CLI mode jzifh login 0ifjcif; ponfwdkYudk xdrf;csKyfonfrSm signal rsm;jzifh xdrf;csKyfonf/ ¤if; signal rsm;udk initaialization signal rsm;[kac:NyD; xdk signal rsm;udk inittab qdkaom file jzifh xdrf;csKyfxm;onf/ inittab file onf /etc atmufwGif&Sdonf/ vi editor jzifh edit vkyfonfhtcg atmufygtwdkif; jrifawGU&rnf jzpfygonf/

signal '0'

onf shutdown signal '1' onf Singleuser mode signal '2' onf NFS(Network File Systam) rygaom Multiuser mode signal '3' onf Full multiuser mode or CLI mode signal '4' onf for reserve signal '5' onf graphical mode with NFS and Multiuser signal '6' onf restart the system jzpfonf/ ykHwGif id:3:initdefault: onf (3) jzpfonfhtwGuf Full multiuser mode without GUI jzpfonfhtwGuf command Line mode jzifh login wufvmrnf jzpfonf/ tu,fí default value 3 ae&mwGif 5 tjzpfajymif;vJNyD; wq jzifh overwrite vkyfrnfqdkygu GUI mode jzifh login wufvmrnf jzpfonf/

40 File

system

rsm;ae&m,lxm;ykHESifh ywfoufNyD; Linux wGif fstab qdkaom command jzifh File system table udkMunhfEdkifonf/ xdkYenf;wl PCI device rsm;udk list vkyfMunfhvdkygu lspci command jzpfonf/ module rsm;udk list vkyfMunfhonfh command rSm lsmod jzpfonf/ modules.conf file onf hardware rsm;\ module rsm;taMumif;ESifh ¤if;wdkYudk drive vkyaf om file jzpfonf/ ¤if; file onf /etc atmufwGif &Sdonf/ cat /etc/modules.conf udk&dkufEdkyfí modules rsm;udkMunfh&IEdkifonf/ xdkYtwl rdrdpuf&Sd Harddisk rsm;\ disk space udk odvdkvsif df command udk okH;&rnf/ du command onf file system rsm;tvdkuf ae&m,lxm;onfh yrmPrsm;udk azmfjyjcif; jzpfonf/ du -hs /etc qdkvsif etc directory \ t&G,ftpm;udk azmfjyvdrfhrnf/ DOS wGif partition cGJvdkcsif fdisk command jzifhokH;EdkifouJhodkY Linux wGifvnf; fdisk command udkokH;Edkifonf/ odkYaomf DOS \ fdisk xufxl;jcm;aom tm;omcsufrSm DOS \ fdisk onf 16-bit FAT udkom manage vkyfEdkifNyD; Linux \ fdisk onf file system rsm;pGmudk manage vkyfay;Ekdifonf/ fdisk command tm;tokH;jyKykHrSmfdisk -l /dev/hda

[k&dkufEdkyfygu rdrdMunfhvdkaom harddisk \ information udk odEdkifrnfjzpfonf/ tu,fí -l rygvsif harddisk udk management vkyfrnf[k command ay;jcif; jzpfonf/ -l rygyJ &dkufEdkyfNyD; fdisk ESifh ywfoufí help vdktyfygu m udk &dkufEdkyfMunfh&IEdkifonf/ rdrdpufwGif puf pwifzGifhvsif zGifhcsif; hardware device rsm;udk load vkyfEdkif? rvkyfEkdifudk od&Sdvdkygu kernel rS wdkuf&dkufxkwfay;aom message rsm;udk jyefvnf zwf&Ijcif; jzifh od&SdEdkifrnf jzpfonf/ kernel rSxkwfay;aom message udk zwf&ef command rSm dmesg jzpfNyD; more cH&dkufrSom wpfvdkif;csif;pD awGUjrifEkdifrnf/ xdkYaMumifh command line rSmdmesg | more

rdrdpufwGif tokH;jyKaeaom command rSm free om jzpfonf/

RAM

yrmP rnfrQ

free

jzpfaeonfudk odvdkygu

41 Searching in Linux Linux

wGif rdrd&Smvdkaom files rsm;? directory rsm;udk tvG,fwul &SmEdkif&eftwGuf search command rsm;&Sdonf/ owdjyK&efrSm searching rvkyfrD updatedb qdkaom command jzifh database rsm;udk OD;pGm update jzpfae&ef vkyfxm;oifhygonf/ Linux twGif;&Sd search command rsm;rSmlocate filename find / filename find command

onf rnfonfh directory xJwGif tvkyfvkyfaeonfjzpfap &Smvdkaom file udk &SmEdkifonfh command jzpfonf/ xdkYtjyif binary file rsm;udk &Smvdku which filename

ae&mudk odvdkygu

jzifh&SmEdkifonf/ whereis -b filename (binary files rsm;udkom azmfjyrnf) whereis -m filename (manual page files rsm;udkom azmfjyrnf) whereis -s filename (sources files rsm;udkomazmfjyrnf) rdrdpuftwGif user rnfrQ0ifa&mufvkyfudkifonfudk od&Sdvdkyguvnf; w odkYr[kwf who command jzifhodEkdifrnf/ xdkY tjyif finger command jzifhvnf; od&SdEdkifonf/ odkYaomf finger service onf user plan udkyg azmfjyavh&Sdojzifh tcsdKUonf ¤if; service udk off xm;avh&Sdonf/ hostname qdkaom command onf name to IP, IP to Name ajymif;vJay;aom command jzpfonf/ uname command onf hardware ESifh software information rsm;udk print vkyfjyonf/ whereis filename

42 Process Management Windows OS

ay:&Sd

task manager

aeonfudk od&SdEdkifonfh command rSm

ps

uJhodkY rdrdpufwGif

process

rnfrQ

run

jzpfNyD;

ps -ax | more

qdkygu atmufygtwdkif; awGUjrifEkdifrnf jzpfonf/

process

ygaom process rsm;onf kernel \ process rsm;jzpfNyD; [---] rygvsif user process jzpfonf/ a&ShwGif yg&Sdaom *Pef;rsm;onf process ID rsm; jzpfMuNyD; ¤if; ID rsm;jzifhom process management udk jyKvkyf&onf/ process udk stop vkyfjcif;tm; Linux wGif; process udk kill onf[k ac:onf/ command rSmwGif

[---]

kill -9 1576

txufyg command wGif 1576 qdkonfrSm process ID jzpfNyD; -9 qdkonfrSm kill vkyf&mwGif strongest tjzpfqkH; signal jzpfonf/ Windows \ task manager uJhodkY process rsm;ESifh CPU, RAM ponfwdkY\ status udkod&SdEdkif&ef command rSm top jzpfonf/ atmufygtwdkif; awGUjrifEdkifygonf/ top process manager twGif; tokH;jyKaom command rsm;udk odvdkygu h udk &dkufESdyfNyD; odEkdifygonf/ process udk kill vdkvsif PID qdkaom process ID eHygwftvdkuf kill vkyfEkdifonf/ xGufvdku q udkESdyfNyD; xGuf&rnf/

43

Package Management or Software Installation on Linux Windows platform

wGif install vkyfjcif;udk Linux wGif package [kac:onf/ wGif &Sdaom package type (3)rsdK;rSm atmufygtwdkif; jzpfonf/ •

RPM (RedHat Package Management) # rpm



Debian # dpkg



TAR (Tape Archive Format)

Linux

# abc.tar.gz (or) abc.tgz RPM

twGuf oD;oefY specific jzpfonf/ TAR onf Unix ESifh tjcm; linux rsm;wGif operate vkyfEkdifonf/ RPM type package udk control vkyfaom command rSm rpm jzpfonf/ Debian udk dpkg jzifh manage vkyfonf/ TAR type onf tape device wGif odrf;qnf;Edkif&eftxd jyKvkyfxm;aomaMumifh command \ aemufwGif device udk file tjzpf ay;vsif file format jzifh odrf;qnf;rnf jzpfNyD; tape tjzpfay;cJhvsif tape xJwGif record vkyfvdkY &onf/ multipile files rsm;tm; TAR jzifh package vkyf&mwGif files trsm;BuD;tm; file wpfckwnf; tjzpf pkaygif;vkdufjcif;om jzpfNyD; compress rvkyfay/ xdkYaMumifh TAR file wpfckxGufvmvsif Linux wGif &Sdaom zip utility jzpfonfh gzip jzifh compress vkyfay;&onf/ xdkodkY gzip vkyfvdkufonfhtwGufaMumifh filename.tar file onf ESifh

Debian

wdkYonf

Linux

44 odkYr[kwf filename.tgz file format jzpfoGm;NyD; file size vnf;ao;i,foGm;rnf jzpfonf/ tar format awmfawmfrsm;rsm;wGif source code rsm;ygvmwwfNyD; rdrdpufay:wGif jyefNyD; compile vkyf&onf/ odkYrSom execute vkyfEdkifonfh binary file xGufvmrnf jzpfonf/ source code ygvmonf qdkaomfvJ binary vnf; ygvmwwfonf/ source code xnfhay;&jcif;rSm pufwdkif;wGif operate vkyfEkdif&eftwGuf jzpfonf/ xdkYaMumifh tar format wGif source code onf primary jzpfNyD; binary file onf secondry jzpfonf/ RPM onf binary file ygvmNyD;om; jzpfouJhodkY vdktyfygu compile vkyfEkdif&ef source code vnf; ygvmonf/ odkUaomf RPM wGif binary file onf primary jzpfNyD; source code onf secondary jzpfonf/ RPM onf command wpfaMumif;wnf;ESifh package aygif;rsm;pGmudk management vkyfEdkifonfhtjyif WEB ay:rSvnf; install vkyfEkdifonf/ tar ESifh rpm wdkY\ command rsm;teuf tcsdkKUudk atmufwGif azmfjyxm;ygonf/ files rsm;tm; csKHNyD; aygif;pnf; (package) vkyfvdkygufilename.tar.gz

tar -cvzf filename /directory c = create v = verbose z = gzip (zip

vkyfrnf[k ajymjcif; jzpfonf) f = file format ESifh output xkwfrnf txufyg command wGif tar onf tar jzifh package vkyfrnfh command jzpfNyD; -cvzf onf option jzpfonf/ /directory onf package vkyfvdkaom file \ wnfae&mjzpfonf/ Package vkyfxm;aom file tm; jyefjznfxkwfrnf odkYr[kwf install vkyfrnf qdkygutar -xvzf filename.tar.gz x = extract v = verbose z = unzip f = file format

txufyg file jzpfonf/ Uninstall

command

wGif

filename

onf

vkyfrnf qdkygu &dk;&Sif;aom

tar format

command

jzifh

compress

rSm rm jzpfNyD;

syntax

vkyfxm;aom rSm-

45 rm -Rf filename R = remove f = do not confirm for remove

tu,fí gzip udk tokH;jyKNyD; switch option rsm;rSmgzip -f

compress / decompress

vkyfvdkvsif

gzip

ESifh ¤if;\

force overwrite output file and compress link

-1

(one)compress faster

-9

compress better

-t

test compress

-d

decompress

-l

list

ESifh ywfoufNyD; atmufygtwdkif; jzpfonf/ rpm

install

/

Uninstall

vkyfaom

command

rpm -ivh filename

install package

rpm -Uvh filename

uninstall package

rpm -ivh --replacepkgs

replace package alerady installed

rsm;rSm

pufxJwGif install vkyfxm;aom package rsm;udk odvdkvsifrpm -qa | more rpm -qa | grep packagename

install

rpm -qpi filename

(qpi = query package information)

rpm -qpl filename

(qpl = query package list)

vkyfNyD;om; packages rsm;udk rpm -e filename Files

command

rsm;udk jzpfonf/

compress

uninstall

vkyfvdkvsif(e = erase) vkyf&mwGif aemufxyf

command

wpfrsdK;rSm

zcat

46 CD Rom mount vk y fj cif ; Linux

wGif CD Rom udk cd drive xJodkY xnfhoGif;NyD;ygu odkYrSom cd tm;zwfEdkifrnf jzpfonf/ cd udk mount vkyf&efrSm-

mount

vkyfay;&onf/

mount /mnt/cdrom

jzpfonf/ xdkYaemuf ls command jzifh cd rom tm; list vkyfMunfhEkdifonf/ cd tm; unmount vkyfvdyk gu /dev directory xJodkY jyefoGm;NyD; unmount cdrom [k &dkufEdkyfEdkifonf/ t&dk;&Sif;qkH;rSm /cdrom rSxGufNyD; eject [k &dkufEdkyfvdkufygu cd tray xGufvmrnf jzpfonf/ cd /mnt/cdrom

Proxy/Cache Server on Linux Linux

ay:wGif server rsm;tvdkuf services ay;onfh taMumif;rsm;tm; ravhvmrnf Linux wGif rdrdpufüwwfqifxm;aom NIC rsm;udk IP configuration vkyfay;onfhtaMumif;udk od&Sdxm;&ayrnf/ IP configuration udk DOS ü ipconfig command jzifh Munfh&IEdkifouJhodkY Linux wGif &Sa d om command rSm DOS ESifh qifwlonfh ifconfig (interface configuration) jzifhvkyfaqmifEdkifonf/ ¤if; command \ syntax rSm ifconfig jzpfaomfvnf; tu,fí rdrdpufwGif NIC wpfckxufydkNyD; wwfqifxm;ygu NIC trnfESifhvnf; Munfh&IEdkifonf/ Oyrm- ifconfig eth0 jzpfonf/ ifconfig jzifh MunfhaomtcgwGif jrifawGU&aom NIC wdkY\ configuration rsm;udk xdrf;odrf;xm;&Sdonfh zdkifrsm;rSm /etc/sysconfig/network/scripts/ atmufwGif &SdMuonf/ file names rsm;rSm ifcfg-eth0, ifcfg-eth1 tp&Sdonfjzifh rdrdpufwGif &Sdaom NIC ta&twGuftvdkuf &Sdrnfjzpfonf/

47 tu,fí ¤if; files rsm;r&Sdygu Ethernet udk rdrdudk,fwdkif zefwD;ay;&ayvdrfhrnf/ xdkYaMumifh ¤if; file rsm;\ default wGif rdrdwdkYtokH;jyKaom NIC \ IP address ESifh Netmask wdkYudk vi editor jzifh jyifqifay;&ayrnf/ ¤if; files tm; Munfhrnfqdkvsif atmufygtwdkif; awGUjrifEdkifrnf/

wGif rdrdpuf\ IP address udk &dkufoGif;&rnf/ NETMASK, NETWORK, ESifh BROADCAST ae&mrsm;wGif vnf; oufqdkif&m Address rsm;&dkufoGif;&ygrnf/ xdkYaMumifh IP address udk configure rvkyf&ao;vsif ifcfg-eth0 udk edit vkyf&rnf/ Linux ay:wGif IP addressing taMumif; azmfjyNyD;onfhaemuf Linux wGif ay;Edkifonfh DNS, DHCP, Proxy/Cache, E-Mail, IRC, Remote server tp&Sdaom Network services rsm;taMumif;udk od&Sdxm;&rnf/ azmfjycJhaom service rsm;udk Linux ay:wGif services taeESifh od&Sdem;vnfxm;onf/ ¤if; service rsm;tm; run aom service program udk Daemon [kac:onf/ xdkYaMumifh WEB service onf http jzpfvsif service ay;aom program rSm httpd jzpfonf/ ftp service twGuf ftpd, Mail service twGuf popd ESifh IRC service twGuf ircd ponfjzifh jrifawGUEdkifonf/ rnfonfh service udkrqdk manage vkyfaom command rSm service jzpfonf/ Oyrm- network module udk manage vkyfvdkvsifservice network start (network module tm; pwif&ef) service network stop (network module tm; ydwfypf&ef) service network restart (network module udk restart vkyf&ef) IPADDR

48 service

ay;jcif;ESifh ywfoufNyD; service tvdkuf tokH;jyKí service ay;aom port rsm;udk od&Sdae&rnf/ Oyrm telnet onf port 33 ESifh ssh onf port 22 jzpfonf/ ssh qdkonfrSm secure shell jzpfonf/ ssh twGuf command rSm sshd jzpfonf/ sshd onf linux server rsm;twGuf aumif;rGefaom remote server software jzpfonf/ ssh udk tokH;jyKrnfqdkygu atmufygtwdkif; tqifhvdkufvkyfaqmif&rnf/ yxrOD;pGm sshd service udk pwif&ygrnf/ service sshd start

xdkYaemuf rdrdpufwGif sshd service tvkyfwu,f vkyf^rvkyf odvdkvsif command jzifh Munfh&IEdkifonf/ netstat | grep 22

netstat

(service port of ssh)

xdkYaemuf rdrdpufESifh Network group wlaom tjcm;pufwpfvkH;wGif putty software jzifh Linux sshd on xm;aom pufudk remote administration vkyfEkdifonf/ putty \ user interface udk atmufwGifazmfjyxm;ygonf/

Host Name (or IP address)

ae&mwGif sshd service on xm;aom Linux puf\ address udk&dkufoGif;&ygrnf/ Port wGif 22 jzpfNyD; Protocol wGif SSH jzpfygrnf/ Open udk click aomtcgwGif warning message ay:vmrnfjzpfNyD; yes udk click vsif ssh on xm;aom Linux puf\ login screen udk jrifawGUEdkifrnf jzpfonf/ wzef ssh on xm;aom linux pufwGif rdrd system twGif user rnfrQ 0ifa&mufokH;pGJaeaMumif; odvkdvsif w qdkaom command udkEdkyfNyD; Munfhygu putty software okH;NyD; remote admin vkyfaeaom pufudk jrifawGUEkdifrnf jzpfonf/

49 WEB Service on Linux

wGif tokH;jyKaom WEB service ay;onfh software rsm;pGm&Sdonfhteuf apache WEB server onf Enterprise level txd vG,fulacsmarGUpGm tokH;jyKEkdifaom aMumifh apache \ nature ESifh configuration udk azmfjyxm;ygonf/ Linux

Apache WEB server

onf open source server wpfckjzpfNyD; server \ factory default setting jzifhyif oef;aygif;rsm;pGmaom WEB site rsm;udk service ay;Edkifonf/ tb,faMumifhqdkaomf apache onf multi sit connection jzpfNyD; pdwfBudKuf configure vkyfEdkifaomaMumifh jzpfonf/ apache \ configuration ESifh ywfoufNyD; tajccH WEB server wpfck omreftvkyfvkyfEdkifaom configuration setting rsm;udk tqifhvdkuf atmufwGif azmfjyxm; ygonf/ Linux wGif WEB service udk httpd(http deamon) jzifh udk,fpm;jyKonf/ xdkYaMumifh httpd service udk service httpd start qkdaom command jzifh http service On &ygrnf/ xdkYaemuf apache WEB server \ configuration udk /etc/httpd/conf atmufwGif &Sdaom httpd.conf file udk vi editor jzifh edit vkyf&ygrnf/ vi jzifh editor vkyfaomtcg atmufygtwdkif; jrifawGUEdkifrnf jzpfyg section (1) \ server root configure wGif ServerRoot "/etc/httpd" jzpfaMumif; onf ta&;BuD;onf/ apache \ configuration wGif # sign ygvsif command r[kwfyJ description(remark) jzpfNyD; rygvsif command jzpfonf/ ServerAdmin wGif rdr\ d e-Mail address udk &dkufoGif;Edkifonf/ Listing wGif 80 udk awGUjrifEdkifrnf jzpfNyD; ¤if;rSm rdrd http service ay;aom port jzpfonf/ tu,fí xdk port udk rdrdpdwfBudKuf port jyifxm;vdku jyifEkdifonf/ ServerName wGif new.host.name:80 udk awGUjrifEdkifrnf jzpfNyD; xdk line \atmufwGif ServerName rdrd IP address ESifh service ay;rnfh port udk a&ShqkH;ü # sign rygyJ &dkufoGif;&rnf/ Apache

tu,fí DNS service &SdaecJhygu ¤if;ae&mwGif rdrdwdkY puf emrnf odkYr[kwf site name udk &dkufoGif;Edkifonf/ rdrd\ Web Server jcif;tm; netstat –an | grep 80 jzifh Munfhygu Port 80 tvkyfvkyfaeygu Server Run aeNyDjzpfonf/

50

xdkYaemuf atmufodkY qufvuf Munfhygu DocumentRoot udk awGUEkdifrnf jzpfonf/ Document root qdkonfrSm WEB site rsm;xm;aom directory jzpfonf/ Default DocumentRoot rSm /var/www/html jzpfNyD; WEB site rsm;udk ¤if; directory atmufodkY xm;ay;&rnf jzpfonf/ qufvufNyD; Directory tydkif;odkY a&mufvsif Directory \ configure udk DocumentRoot ESifh wlnDatmifxm;&rnf/ xdkYaMumifh rdrdpufonf WEB server vkyfrnf[k &nf&G,fcJhygvsif /var udk partition owfowfcGJjcm;NyD; disk space rsm;rsm;xm;ay;&rnf/ xdkYaemuf DirectoryIndex tydkif;wGif WEB site \ yxrOD;qkH; home page \ name ESifh wnfae&mudk azmfjy&dkufoGif;rnf qdkvsif WEB server wpfck atmifjrifpGm configura vkyfNyD; jzpfonf/ rSefuefaom configuration NyD;ygu httpd services udk restart vkyfay;&ygrnf/ odkYrSom configuration vkyfxm;aom effect onf oufa&mufrI &Sdrnfjzpfonf/ rdrd pufwGif WEB server run aeonfudk Munhfvdkygu tjcm;pufrS web browser wGif proxy setting tm; WEB server \ IP Esifh port udk setting csay;NyD; URL address ae&mü WEB server address ESifh port udk&dkufoGif;ygu apache \ Welcome screen udk jrifawGUEdkifrnf jzpfonf/ WEB service tm; puf pwifzGifhonfESifh tvdktavsmuf start vkyf&eftwGuf setting csxm;ay;Edkifonf/ command rSmntsysv

jzpfNyD; atmufygtwdkif; jrifawGU&rnf jzpfonf/ ¤if;wGif httpd udk check vkyfNyD; udk Edkyfygu OS boot vkyfonfESifh WEB server run NyD;om;jzpfoGm;ayvdrfhrnf/

OK

51

Setting up Gateway on Linux Linux OS

wGif

Gateway setting

udk GUI mode rS jyKvkyfvsifvG,fulaomfvnf; CLI mode wGif setting jyKvkyfjcif;onf ydkrkdpdwfcs&Ny;D wdusaom setting wpfckudk jzpfay:aponf/ Gateway setting rjyKvkyfrnf route -n qdkaom command jzifh route vkyfaeaom tajctaeudk Munfh&Irnfqdkygu Gateway setting rvkyf&ao;ojzifh Kernel IP routing table udk atmufygtwdkif; awGUjrifEdkifrnf jzpfonf/

Gateway

udk

setting

network

qdkonfh file wGif

Edit

jyKvkyfvdkygu vkyfEkdifonf/

/etc/sysconfig/

atmufwGif&Sdaom

vi /etc/sysconfig/network

txufygtwdkif; command udk &dkufoGif;NyD; &dkufoGif;&mwGif syntax rSmGATEWAY=192.168.0.254

ponfjzihf rdrd

Gateway IP

udk&dkufoGif;&rnf/

gateway

IP

udk &dkufoGif;&ygrnf/

52

Gateway

udk owfrSwfay;NyD;aemuf hosts file udk setting csay;&rnf jzpfonf/ udk&Sm&efrSm ¤if; file onf /etc directory atmufwGifwdkuf&dkuf&Sdygonf/

hosts file

vi /etc/hosts

xdktcgatmufygtwdkif; jrifawGU&rnf jzpfonf/ jzpfonfudk aumif;pGmod&Sdxm;&rnf/

xdkYaemuf e*dk&SdNyD;om; jyif&ygrnf/

default setting

127.0.0.1

udk atmufygtwdkif; rdrd\

onf

local loop back

IP address

ay:rlwnfNyD;

udk edit vkyfNyD;vsif nameserver udk setting jyKvkyf&ygrnf/ name server setting jyKvkyfykHrSm /etc/resolv.conf file udk edit vkyfay;&ygrnf/ nameserver wGif rdrdpuf\ DNS udk xnfhoGif;&ygrnf/ Oyrm- bagan rS connection &,lxm;onfqdkygu namerserver wGif xdkodkY

hosts file

nameserver 203.81.71.69

[k&dkufoGif;&rnf jzpfonf/ xdkYaemuf nslookup command jzifh rdrd ESpfouf&m WEB site wpfckcktm; Munfhrnf qdkygu IP address azmfjyrnf jzpfonf/ Oyrm- nslookup www.bagan.net.mm txufygtwdkif; Gateway setting jyKvkyfjcif;? hosts file udk edit vkyfjcif;ESifh resolve.conf file jzifh DNS owfrSwfay;jcif;rsm; NyD;ygu rdrdpufonf Internet odkY csdwfquf tokHjyKEkdifNyDjzpfonf/ Internet odkYcsdwfqufNyD;ygu rdrdwdkY LAN twGif; proxy servise ay;onfh proxy server wpfck jyKvkyfum Internet udk sharing jyKvkyfEdkifrnfjzpfonf/ proxy server wGif Linux \ squid II onf powerful jzpfaom proxy service ay;Edkifonf/

53

Squid II squid

onf ¤if;\ proxy setting udk edit vkyf&mü CLI mode jzifh jyKvkyf&onf/ xdkYaMumifh squid \ setting udkjyKjyif&ef file rSm /etc/squid twGif;&Sd squid.conf file jzpfonf/ ¤if; squid.conf file udk vi editor jzifh Munfhvdkufrnf qdkygu pmaMumif;a& 3225 vdkif; &Sdaom squid \ configuration file udk awGUjrif&rnf jzpfonf/ squid \ configuration udk atmufygtwdkif; tqifhvdkufjyKvkyfoGm;&rnf/ yxrOD;pGm Network Option wGif proxy service ay;rnfh port udk edit vkyfay;&rnf/ configuration file \ default rSm 3128 jzpfonfudk awGUjrif&rnf/ port 3128 onf ,cifu tokH;jyKaom proxy port jzpfonf/ odkYaomf ,aeYacwfwGif international tokH;jyKaeaom proxy port rSm 80 jzpfonf/ xdkYaMumifh # http_port 3128 qdkaomae&mwGif # sign udk zsufNyD; port udk on &ygrnf/ port number ajymif;vdkvsif 3128 ae&mü rdrdxm;vdkaom port number udk &dkufoGif;&ygrnf/ Oyrm 80 xm;rnfqdkygu command line status rSm atmufygtwdkif; jzpfaeygvdrfrh nf/ http_port 80 port number

udk jyifNyD;vsif cache peer udk setting vkyf&ygrnf/ cache peer qdkonfrSm rdrdtxufrS proxy server udk ajymjcif; jzpfonf/ tu,fí bagan net rS connection udk &,lxm;onfqdkygu cache peer wGif bagan rS proxy server address udk

54 &dkufoGif;&rnf jzpfonf/ cache peer setting \ default rSm none jzpfonf/ xdkYaMumifh none udk zsufNyD; atmufygtwdkif; &dkufoGif;&rnf/ &dkufoGif;rnfh line number onf 309 jzpfonfudk nmbuf atmufa'gifhwGif awGUEdkifrnf/ cache_peer 192.168.1.254 parent 8080 0 default no-query

txufyg command line udk &Sif;&rnf qdkvsif cache_peer onf cache_peer command jzpfonf/ 192.168.1.254 qdkonfrSm parient proxy \ IP address jzpfonf/ parient qdkonfrSm parient jzpfaMumif; aMumfjimjcif; jzpfonf/ 8080 rSm parient proxy \ service ay;aeaom port jzpfonf/ aemufxyf 0 rSm neighbours rsm;tm; query ay;jcif;r&Sd[k t"dygÜ,f&onf/ default qdkonfrSm connection tm;vkH; default okH;rnf[k ajymjcif; jzpfonf/ no-query qdkonfrSm query rvkyfbl; [k t"dyÜg,f&onf/ tu,fí parient proxy wGif rdrdonf user account wpfck &,lxm;NyD; login vkyfrS access ay;onfh parient proxy jzpfaeygu no-query aemufwGif login name ESifh password udk &dkufoGif;ay;&ayrnf/ Proxy server onf High Volume Traffic udk access vkyf&aomaMumifh IO system aumif;&rnf jzpfonf/ xdkYaMumifh server tokH;jyKaom cache memory yrmPrsm;&ef vdktyfonf/ Squid wGifvnf; cache memory udk setting vkyfay;&onf/ Option Which Effect the Cache Size qdkaom acgif;pOfatmufwGif line number 468 ü default setting 8 MB udk awGUEdkifrnfjzpfonf/ # sign udk zsufNyD; cache memory udk on ygrnf/ NyD;vsif rdrdxm;vdkaom cache size udk &dkufoGif;&ygrnf/ xdkYaemuf line number 501 &Sd maximum_object_size 4096 KB udk # sign zsufNyD; default setting twdkif; on ay;&ygrnf/ xdkYaemuf Logfile Pathnames and Cache Directory acgif;pOf atmuf&Sd cache directory udk setting vkyfay;&rnf/ Default setting jzpfonfh line number 666 wGif&Sdaom cache_dir ufs /var/spool/squid 100 16 256 qdkaom command line udk # sign zsufí on ay;&rnf/ azmfjyyg command \ t"dyÜg,fwGif 100 onf directory \ size udk ajymjcif;jzpfonf/ 16 qdkonfrSm ¤if; directory wGif directory 16 ck&Sdrnf[k ajymjcif;jzpfonf/ 256 onf sub directory 256 ckxm;&Sdrnf[k ajymjcif;jzpfonf/ xdkYaemuf line number 673 &Sd cache_access_log ? line number 681 &Sd cache_log ESifh line number 691 &Sd cache_store_log wdkYudk toD;oD; on ay;&rnf/ ¤if; log rsm;onf rdrd server tm; access vkyfonfh connection rsm;udk log taeESifh

55 odrf;qnf;azmfjy&ef jzpfNyD; server run aecsdefwGifvnf; monitor vkyfEdkifrnf jzpfonf/ xdkYaemuf line number 733 wGif&Sdaom emulate_httpd_log off qdkaom command line udk # sing zsufNyD; on ay;&kHrQru default setting jzpfonfh off udk on [kajymif;vJay;NyD; command udk on &ygrnf/ qufvufNyD; line number 1678 wGif acl setting udk awGUjrifEdkifrnf jzpfonf/ acl qdkonfrSm access control list jzpfNyD; standart jzpfaom denine vkyfay;Edkifonfh tool jzpfonf/ ¤if;\ command rSm acl jzpfonf/ command line t"dyÜg,ftm; em;vnfxm;&efvdktyfygonf/ acl all src 0.0.0.0/0.0.0.0

qdkonfrSm acl command jzpfonf/ all qdkonfrSm aclname jzpfonf/ src onf source jzpfNyD; 0 rsm;onf IP address jzpfonf/ txufyg command line t& rnfonfh source address rSrqdk vma&muf access vkyfEdkifaMumif; ajymxm;jcif; jzpfonf/ Line number 1739 wGif And Finally deny all other access to this proxy ae&mü local host rS vGJí usefwmtm;vkH;udk deny vkyfxm;onfudk atmufygtwdkif; jrifawGUEkdif rnfjzpfonf/ acl

xdkYaMumifh default twdkif; xm;&Sdygu rnfonfh connection udkrQ vufcHawmhrnf r[kwfay/ tu,fí allow all command csnf;oufouf ay;vdkufrnf qdkyguvnf; connection tm;vkH;udk vufcHaeayvdrfhrnf/ xdkYaMumifh atmufygtwdkif; command wpfck &dkufoGif;ay;&rnf/

xdkodkYjyKvkyfNyD;ygu allow all command

line number 2457

ESifh 2466 wdkYwGif&Sdaom never_direct line rsm;udk a&ShrS # sign rsm;zsufNyD; on ay;&ygrnf/

56

txufyg configuration step rsm;tvdkufjyKvkyfNyD;ygu omref proxy service ay;Edkifaom tajctaeodkYa&muf&SdoGm;NyD jzpfonf/ xdkYaMumifh vi editor rS wq command jzifh write vkyfNyD; xGufvdkufygrnf/ NyD;vsif squid proxy run &eftwGuf squid -z command jzifh cache file wnfaqmufay;&ygrnf/ cache file wnfaqmufNyD;ygu squid proxy run &ef tqifoifjh zpfNyD jzpfygonf/ service squid start qdkaom command jzifh squid server udk pwifEdkifNyD jzpfygonf/ ,cktcsdefwGif netstat command jzifh Munfhrnfqdkvsif squid server twGuf server ay;aeaom port onf listen vkyfaernfjzpfonf/ tjcm;pufwpfvkH;&Sd WEB Browser wGif proxy setting ü squid server IP address &dkufoGif;vdkufNyD; prf;oyfMunfhEdkifygonf/ squid server tm; 0ifa&muf access vkyfaeaom connection rsm;tm; monitor vkyfvdkygu atmufyg command jzifh MunfEkdifonf/ tail -f /var/squid/log/access. log

txufyg command jzifh Munfh&Irnfqdkygu rdrd server twGif;odkY 0ifa&mufcsdwfqufaeaom client rsm;\ rnfonfhtcsdefrS rnfonfhtcsdeftxd 0ifa&muf connection jyKvkyfoGm;onfudk od&SdEdkifrnf jzpfonf/ Super Server in Linux Host

wpfckrS client rsm;xHodkY ay;aeaom service trsdK;rsdK; &SdMuNyD; service rsm;tvdkuf port toD;oD;wGif listing vkyfaeMuonf/ tu,fí hoste wpfcktaeESifh service rsm;pGmay;xm;onfhtwGuf rdrdtm; connection jyKvkyfaeaom client ta&twGufrsm;jym;vmonfESifh trQ service ay;aeaom port rsm;tm; listing vkyf&onfrSmvJ rsm;jym;vmonf/ xdkYaMumifh server \ performance usqif;vmrnf

57 jzpfonf/ xdkodkY performance rusqif;ap&ef Host ESifh client tm; wdkuf&dkuf csdwfqufcGifh csufcsif;ray;yJ super server Mum;cHNyD;rS om super server \ request jzifh wdkuf&dkufcsdwfqufapjcif;tm; jyKvkyfjcif;jzifh host performance udk wufaponf/ super server \vkyfaqmifcsufonf host \ performance wufaponfrSefaomvnf; security udk usqif;aponfudk owdjyK&rnf/ Linux wGif super server Mum;cHrIudk od&Sdvdkvsif /etc/xinetd.d directory xJwGif od&SdEdkifonf/ inetd qdkonfrSm inet daemon jzpfonf/ ,cif RedHat version rsm;wGif inetd onf directory taeESifh rwnf&SdyJ inetd.conf file wpfcktaejzifh wnf&Sdonf/ service wpfcktwGuf pmaMumif;a& wpfckjzifh configure vkyfaqmifay;onf/ inetd.d directory tjzpfajymif;vJvmaomtcgwGif service wpfcktm; file wpfcktjzpf udk,fpm;jyKvkyfaqmifay;vmcJhonf/ Telenet service in Linux telenet service

qdkonfrSm remote admin wpfrsdK;jzpfonf/ telenet \ service ay;aom port rSm standard tm;jzifh 23 jzpfonf/ telnet service tm; Linux wGif ay;csifygu /etc/xinetd.d directory twGif;&Sd telnet file tm; vi editor jzifh edit vkyfay;&rnf/ atmufwGif jyxm;onfhtwdkif; disable=no ay;NyD; wq jzifh save um vi editor rSjyefxGufrnfqdkygu telnet service ay;NyD; jzpfrnf/ xdkYaemuf service xinetd restart command jzifh services rsm;tm; restart vkyfay;&ygrnf/ netstat -al | grep 23 jzifhMunfhvsif port 23 wGif listing vkyfaernfudk awGU&SdEdkifonf/

xdkYaemuf tjcm;puf wpfvkH;rS putty soft ware jzifh telnet service jzifh login vkyfrnf[k option ay;NyD; remote admin jyKvkyfrnfqdkygu root user account jzifhr[kwfyJ omref user account jzifh login vkyfEdkifrnf jzpfonf/

58

FTP service on Linux fip service

onf rwlnDaom OS toD;oD;\ uGJjym;jcm;em;aom File system rsm;twGuf wlnDaom format jzpfatmif ajymif;vJvkyfudkifay;NyD; sharing vkyfEdkifaom service jzpfonf/ Linux wGif ftp service udk /etc/vsftpd atmufwGif&Sdaom vsftpd.conf file wGif vi editor jzifh edit vkyfNyD; ftp service udk configure vkyfEkdifonf/ ftp service wGif odoifhaomtcsufrSm encoding tydkif;jzpfonf/ encoding wGif omref tm;jzifh binary encoding ESifh ASSCII encoding [lí ESpfrsdK;&Sdonf/ ykHrSef text rsm;udk translate vkyfrnfqdkvsif ASSCII ESifh jyKvkyfNyD; binary file rsm;udk binary encoding jzifh encode vkyfonf/ tjcm;rodaom format rsm;udk binary ESifh jyKvkyfjcif;onf omvGefaumif;rGefí pdwfcs&aom vkyfaqmifcsufjzpfonf/ odkYaomf ,aeYacwfwGif ftp service twGuf format encoding tm; auto mode ay;NyD; vkyfaqmifEdkfionfh client software rsm;ay:aygufvmNyD jzpfonf/ owdjyK&rnfrSm Linux rS Linux odYkjzpfap Linux rS Unix odkYjzpfap Unix rS Unix odkY jzpfap? Unix rS Linux odkYjzpfap binary mode jzifhom encode vkyfonf/ ftp server rsm;odkY login 0ifa&muf&mwGif internet ay:ü anonymous ftp server rsm; &SdouJhodkY user name, password ay;NyD; login ay;&onfh ftp server rsm;&Sdonf/ tcsdKU ftp server rsm;wGifrl username ftp ESifh password ftp ay;NyD; 0ifa&muf&onfh server rsm;vnf;&Sdonf/ odkYaomf login trsdK;tpm;tvdkuf permission uGJjym;rnfjzpfonf/ ftp \ service ay;aom standard port rSm 21 jzpfonf/ Linux ay:wGif ftp server ay;&eftwGuf tqifhvdkufrSm atmufygtwdkif; jzpfygonf/ a&S;OD;pGm rpm -qa | grep ftp qdkaom command jzifh ftp service udk install pwifygrnf/ xdktcgatmufygtwdkif; service (3)rsdK; install vkyfygrnf/

editor

xkdYaemuf vi vsftpd command jzifh vsftpd file tm; edit vkyf&ygrnf/ vi wGif anonymoys login rsm;tm; allow ay;Edkif&ef twGuf enable wGif YES

59 ay;Edkifonf/ xdkYaemuf localel user rsm;twGuf permission setting rsm; vdkovdkjyKjyifEkdifonf/ xdkYtjyif xferlog setting wGifvnf; connection log setting rsm;udk jyKjyifMunhf&IEkdifonf/ baner wGif rdrda&;xdk;vdkaom welcome messag rsm; rdrd\ admin e-mail address rsm;udk jyKjyifxnfhoGif;Edkio f nf/ xdkodkY rdrdpdwfwdkif;us setting jyKvkyfNyD;ygu wq jzifh save NyD; configure jyKvkyfEdkifygonf/ xdkYaemuf tjcm;pufwpfvkH;xHrS ftp client ftp jzifh prf;oyfMunfhrnf qdkygu ftp server &SifoefaeaMumif; od&SdEkdifrnf jzpfonf/ xdkYaemuf cute ftp uJhodkYaom ftp client software rsm;jzifh rdrd ftp site tm; anonymous user taeESifh vnf;aumif;? known user taeESifh vnf;aumif; login 0ifa&mufNyD; user account tvdkufuGmjcm;rIudk od&SdEdkifygonf/ service rsm;tvdkuf service ay;&mwGif service qdkaom command udk tokH;jyKí service udk start, stop, restart ponfjzifh jyKvkyfonf/ tu,fí service command tvkyfrvkyfvsif /etc/rc.d/init.d atmufodkYoGm;NyD; rdrd ay;vdkaom service udk run Ekdifonf/ Windows ES i f h Linux csd w f q uf j cif ; Windows

ESifh Linux csdwfquf&ef platform rwlnDaomaMumifh wpfckESifh wpfck awGUjrifEdkif&efyif cufcJvGefvSayonf/ xdkYaMumifh xdk OS ESpfcktMum; standard protocol jzifh csdwfqufEdkifrSomvsif windows ESifh Linux wpfckESifh wpfckjrifawGUum csdwfquftokH;jyKEkdifMuayrnf/ Windows wGif workgroup odkYr[kwf domain atmuf&Sd client rsm; taeESifh vkyfaqmifMuonf/ tu,fí Linux computer wpfvkH;onf windows \ workgroup em;vnfatmif jyKvkyfEdkifygu Windows ESifh Linux tjyeftvSef em;vnfoGm;NyD; files rsm;? printer rsm;udk share vkyfEkdifrnfjzpfonf/ xdkuJhodkYjyKvkyfEkdif&eftwGuf Linux \ SAMBA onf NetBIOS, NetBieu ponfh SMB(server message block) protocol rsm;udk emulate vkyfay;Edkifonf/ /etc/samba/smb.conf file udk vi editor jzifh editor vkyfay;&ygrnf/ workgroup wGif rdrd\ work group udk &dkufoGif;&ygrnf/ xdkYaemuf rdrd samba server description udk ESpfouf&m&dkufoGif;&rnf/ usef&Sdaom configuratuion rsm;udk description Munfh&INyD; jyifqifEdkifonf/ xdkYaemuf wq jzifh vi editor rS xGufNyD; /etc/inetd.d/ atmufwGif &Sdaom swat file udk vi /etc/inetd.d/swat command udk okH;NyD; vi

60 editor

vkyf&ygrnf/ editor wGif default port rSm 901 jzpfonf/ only_from windows OS zufrS IP &dkufoGif;&rnf/ disable udk no xm;ay;&rnf/ xdkYaemuf wq jzifh xGuf&ygrnf/ NyD;vsif service xinetd restart command jzifh service rsm;tm; restart vkyfay;&ygrnf/ xdkYaemuf Windows ay:wGif&Sdaom Internet Explorer jzifh Linux puf\ IP address ESifh swat service ay;aom port 901 udk http://LinuxIP:port jzifhac:Munfhrnfqdkygu samba \ WEB admin page wufvmygrnf/ xdkodkY samba server \ Homw Page wufvmvsif workgroup name, netbios name, server string ponfwdkYudk ESpfouf&m xm;Edkifonf/ Security Option wGif security tm; SHARE a&G;cs,fay;&rnf/ odkYrSom share jyKvkyfEdkifrnfjzpfonf/ xdk page wGif share ay;jcif;? NetBIOS name ay;jcif;rsm; tjyif tjcm; administration rsm;udk jyKvkyfEdkifygonf/ xdkYaemuf service smb restart command jzifh restart vkyyf grnf/ NyD;vsif windows rS run command wGif Linux PC \ IP address tm;&dkufoGif;vsif vnf;aumif; My Network place rS oGm;Munfhvsifvnf;aumif; Linux PC udk awGUjrifEdkifrnf jzpfonf/ aemufwzef Windows rS share files rsm;tm; Linux wGif ac:,ltokH;jyK&eftwGuf Linux wGif atmufygtwdkif; jyKvkyf&ayrnf/ smbclient -L 192.168.0.5 [k&dkufoGif;ygu 192.168.0.5 \ share file rsm; yGifhvmrnf/ xdkYtjyif Work group rsm;tm;vnf; azmfjyxm;ayvdrfhrnf/ tu,fí share files rsm;tm; ul;,lvdkygu odkYr[kwf Munfh&Ivdkygu rdrdul;vdkaom directory udk mount vkyfay;&onf/ yxrOD;pGm /mnt atmufwGif directory wpfckudk atmufyg command jzifh wnfaqmuf&ygrnf/ jzifh

edit

mkdir smbfs

xdkodkY wnfaqmufNyD;ygu rdrdMunfhvdkaom Munfh&IEdkifonf/

share

files

rsm;udk atmufygtwdkif;

mount -t smbfs //192.168.0.5/sharefolder /mnt/smbfs

awmif;ayvdrfhrnf/ windows OS password udk&dkufoGif; NyD;ygu share folder twGif;&Sd share files rsm;tm; jrifawGUEkdifayonf/ tu,fí ul;,lvdkvsif rdrdwnfaqmufxm;aom directory udk chmod jzifh write permission ay;xm;&ef vdktyfonf/ xdktcgwGif

password

61

NAT(Network Address Translation) in LINUX Internet

odkYcsdwfquf&mwGif csdwfqufenf; (3)rsdK;&Sdonf/ ¤if;wdkYrSmDirect csdwfqufjcif; Proxy server jzihfcsdqufjcif; NAT jzifhcsdwfqufjcif; Router or Gateway

Internet

203.81.76.X

LAN

Direct Connection

odkYwdkuf&dkufcsdwfquf&mwGif rdrd\ LAN wGif&Sdaom IP address rsm;onf Internet wGif Fully Qualified jzpfaom address rsm;jzpfMuonf/ odkYjzpfí LAN onf Internet \ wpfpdwfwpfa;o jzpfaeonfhtjyif security raumif;ay/ rdrd LAN twGif;&Sd pufwdkif;tm; Internet rS wdkuf&dkufod&Sdem;vnfaernf jzpfonf/ Internet

62

192.168.X.X

GateWay

Internet

LAN

Fully Qualified Address

Proxy Connection Proxy server

jzifh Mum;cHcsdwfquf&mwGif Internet odkYxGuf&mü Internet wGif fully qualified jzpfaom address wpfckwnf;jzifhom connection &SdNyD; rdrd LAN wGif Internet rS rodaom address wpfckjzifh jyef0ifrnf jzpfonf/ LAN twGif;&Sd pufrsm;tm;vkH;onf Internet odkYxGuf&mwGif Proxy wpfckwnf;udkom Mum;cHqufoG,faomaMumifh security aumif;rGefonf/ GateWay with NAT Service

Internet

192.168.X.X

LAN

Fully Qualified Address Security

With NAT connection NAT

jzifh csdwfqufjcif;onf Internet sharing jyKvkyfEdkifonfhtjyif security aumif;rGefNyD; fully qualified jzpfaom address wpfckom vdktyfrnfjzpfonf/ Linux wGif Masqurading jyKvkyfjcif;[kac:onf/ NAT udk computer server rsm;rokH;yJ dedicated NAT box rsm;tokH;jyKívnf; vkyfaqmifEkdifonf/ ¤if; Box rsm;onf WEB base configuration rsm;jzifh configure vkyfEkdifonf/ NAT udk Windows OS wGif ICS (internes Connection Sharing) [lí built in yg&Sdaomfvnf; ICS service on vdkufygu rdrd LAN \ IP address onf 192.168.0.X

63 jzpfoGm;onf/ odkYjzpfaomaMumifh LAN \ address t& rdrd LAN twGif puftvkH;a& 253 vkH;om tokH;jyKEdkifawmhrnf jzpfonf/ Linux wGif iptable ESifh squid service ESpfckaygif;pyfNyD; NAT service udk on Ekdifonf/ Windows wGifuJhodkY tuefYtowfr&Sday/ Windows wGif ISA service rwufrcsif; firewall service rwufay;/ ISA server run rSomvsif cover vkyfay;onf/ Linux wGif boot vkyfonfESifh cover vkyfay;onf/ xdkYtjyif tm;omcsufwpfckrSm virus rsm;\ wdkufcdkufrIudk vkH;0xnfhoGif; pOf;pm;&ef rvdktyfay/ Linux wGif Firewall, NAT twGuf tokH;jyKaom command rSm iptables jzpfonf/ Linux version 2.0 wGif ipfwadm jzpfNyD; version 2.2 wGif ipchain, version 2.4 rS pwifí iptables tjzpfpwifcJhonf/ iptables wGif kernel space ESifh user space [lí ESpfrsdK;&Sdonf/ kernel space onf netfilter model jzpfNyD; user space onf iptables jzpfonf/ iptables onf Good Guys IN Bad Guys OUT qdkaom firewall \ function udkyg &&Sdonf/ network connection wpfckwnf; odkYr[kwf wpfckxufygaom connection rsm;jzpfonfh multi home sustem wGifyg tokH;jyKEkdifonf/ host wpfcktwGufomru network wpfckESifhwpfcktMum; Gateway rsm;wGifyg tokH;jyKEkdifonf/ iptables tvkyfpwifvkyf&eftwGuf IP routing function udk on ay;&rnf/ IP routing function udk atmufygtwdkif; On ay;Edkifonf/ vi /etc/sysctl.conf

¤if; file wGif pmaMumif;a& (7) ü net.ipv4.ip_forward = 0 tm; 1 tjzpfajymif;vJay;vsif IP routing On NyD; jzpfonf/ xdkodkYjyKvkyfNyD;aemuf user space iptables wGif firewall rules rsm;udk xnfhoGif;&ayrnf/ iptables wGif Input change, Output change, ESihf Forward change [lí (3)rsdK;&Sdonf/

64

txufazmfjyygykHtwdkif; server twGif;odkY incoming 0ifa&mufvmvsif routing decision rS host twGufvmonfh input [kwf? r[kwf ppfaq;onf/ host twGufvmonfh input qdkygu outgoing state odkY wdkuf&dkufydkYaqmifay;onf/ host twGuf r[kwfyJ DMZ (DeMilitarized Zone) aemufzuf&Sd rdrd LAN twGif;rS computer rsm;twGufqdkvsif Local twGif; process vkyfay;NyD; outgoing state odkY a&muf&SdoGm;onf/ DMZ (demilitarized Zone) qdkonfrSm rdrd Internel LAN ESifh Externel Network tMum;wGif xyfrHjznfhpGufxm;aom wwd,ajrmuf Network tydkif;jzpfonf/ DMZ udk tcsdKUae&mrsm;wGif Perimeter Network odkYr[kwf Three-home Perimeter Network [líac:onf/ rsm;aomtm;jzifh WEB server rsm;? Mail server rsm;onf DMZ twGif;ü xm;&Sdavh&SdMuonf/ tb,faMumifhqdkaom DMZ onf Inetenet odkYaemufqkH;xGufaom interface ESifh Secure vkyfxm;aom LAN tMum;wGif additational firewall filter wpfck tjzpfwnf&SdaomaMumifh jzpfonf/

65

Routing decision address

wGif

PRErouting

ESifh

POSTRouting

[líESpfrsdK;&SdNyD;

source

udk ajymif;vsif SNAT jzpfNyD; POSTrouting jzpfonf/ PAT (port address translation) onf distination address udk ajymif;vJay;í DNAT jzpfonf/ PRErouting [kowfrSwfEkdifonf/ prot routing PAT \ oabmw&m;rSm Oyrm- DMZ (DeMilitarized Zone) twGif;&Sd iptables service &Sdaom Gateway wpfckwGif WEB service run rxm;aomfvnf; Internet rS client request onf WEB service ay;aom port udk request vmvkyfonfqdkygu DMZ zone aemufbuf&Sd secure jzpfaeaom? Internet rS wdkuf&dkufrodaom WEB service run aeonfh WEB server odkY forwading vkyfay;jcif;rsdK;jzpfonf/

66 iptables

ESifhywfoufí aommand rSm iptables omjzpfaomfvnf; ¤if; command \ switch rsm;onf ta&;BuD;onf/ t"du tm;jzifh -A qdkvsif add jzpfonf/ -I qdkygu insert jzpfNyD;? -D onf delete jzpfaMumif;OD;pGm od&Sdxm;&ayrnf/ xdkYaemuf -P onf policy jzpfaMumif;ESifh -t onf type jzpfaMumif; tajccHrQod&Sdxm;&rnf/ iptables \ command rSm&Snfvsm;aomaMumifh command line tqifhtvdkuf udk em;vnfod&Sd&eftwGuf atmufwGif tqifhvdkuf azmfjyxm;ygonf/ iptables -A INPUT -p icmp j -DROP

txufygt& iptables onf command jzpfonf/ -A onf command line option jzpfonf add vkyfrnfjzpfaMumif; command ay;jcif;jzpfonf/ INPUT onf chain jzpfNyD; 0ifvmrnfh request \ status jzpfonf/ -p onf command line parameter jzpfonf/ protocol udk service vkyfrnfjzpfaMumif; aMujimonfh oabmjzpfonf/ -p NyD;ygu protocol emrnfomvdkuf&rnf jzpfonfhtwGuf icmp (internet control message protocol) udk xnfhoGif;jcif; jzpfonf/ j onf operation parameter jzpfNyD; jump operation jyKvkyfrnf[k ajymjcif;jzpfonf/ jump wGif ALLOW, DROP ESifh REJECT [lí (3)rsdK;&Sdonf/ REJECT onf request tm; vufrcHbJ client xHodkY error message ydkYrnf jzpfonf/ DROP rSm request tm; vpfvsLvsKvdkufjcif;jzpfNyD; request vmaom client xHodYk rnfonfh error message rQydkYrnf r[kwfay/ txufyg command line rSm icmp protocol jzifh request vmygu jzwfoef;cGifh ray;awmhyJ request udk vspfvsLvsKvdkufrnf jzpfonf xdkYaMumifh secure LAN twGif;&Sd pufrsm;ESifh iptables service &Sdaom puftm; ping command jzifh &SmMunfhvsif awGUEdkifrnf r[kwfawmhay/ tu,fí atmufygtwdkif; &dkufoGif;ygu vmorQ request wdkif;udk DROP vkyfjypfrnf jzpfonf/ iptables -P INPUT DROP command

wGif -P onf policy jzpfonf/ Linux wGif NIC rsm;tm; eth0, eth1 ponfjzihf em;vnfaMumif; od&SdcJhNyD;jzpfonf/ tu,fí rdrdpufwGif Ethernet card ESpfck&SdNyD; eth0 onf LAN odkY0ifonfh interface jzpfNyD; eth1 onf Internet odkY xGufaom Interface jzpfonfqdkygvsif eth1 tm; NAT service 0n &ef command rSm-

67 iptables -t nat -A POSTROUTING -o eth1 j MASQURADE

txufyg command wGif -t onf service type jzpfNyD; nat onf NAT service jzpfonf/ -A onf add odkYr[kwf append jzpfNyD; POSTrouting twGuf jzpfaMumif; aMujimjcif; jzpfonf/ -o onf eth1 \ output jzpfaMumif;ESifh ¤if; output tm; masquerade vkyfrnfjzpfaMumif; owfrSwfay;vdkufjcif; jzpfonf/ MASQURADE qdkonfrSm twkta,mif? rsufESmzkH;pGyfvdkufjcif; [k qdkEdkifonf/ wenf;tm;jzifh source address rsm;udk ajymif;vJay;vdkufonfh function udk Ethernet 1 (eth1) \ output tjzpfajymif;vJ xkwfay;vdkufjcif;jzpfonf/ rdrd wGif&Sdaom WEB server twGufqdkvsif ¤if; WEB server twGuf secure jzpfNyD; aumif;rGefpGm WEB service ay;Edkif&eftwGuf command rsm;rSm atmufygtwdkif; jzpfonf/ iptables -P INPUT DROP

¤if;

command

command

jzifh 0ifvmorQ request wdkif;udk ydwfypfvdkufygrnf/ xdkYaemuf atmufyg jzifh WEB service ay;aom port wpfckwnf;udk vufcHNyD; zGifhay;ygrnf/

iptables -A INPUT -P tcp --dport 80 j ACCEPT command

tm; avhvmMunfhrnf qdkygu incoming 0ifvmaom distination IP ESifh port 80 jzpfygu accept vkyfrnfh policy jzpfaMumif; odEdkifonf/ txufyg command rsm; onf rdrdwGif &Sdaom WEB server twGuf jzpfNyD; tu,fí rdrd LAN twGif;rS pufrsm;tm; a&G;cs,fowfrSwfNyD; authorized ay;csifvsif atmufygtwdkif; &dkufoGif;&rnf jzpfonf/ iptables -A INPUT -s 192.168.1.50 -p tcp --dport j ACCEPT

jzifh 192.168.1.50 qdkaom IP tm; accept ay;jcif;jzpfonf/ -s onf source jzpfonf/ -p onf protocol jzpfNyD; protocol rSm tcp jzpfonf/ txufygtwdkif; command rsm;? policy rsm; owfrSwfay;NyD;aemuf ¤if;wdkYudk jyefzsufvdkygu atmufygtwdkif; jyKvkyfEdkifonf/ ¤if;

command

iptables -nL

txyfygtwdkif; &dkufoGif;vdkufygu ay;cJhaom owfrSwfcsufrsm;udk awGU&rnfjzpfonf/

policy

rsm;

Input

ESifh

Output

68 iptable -nL INPUT

rsm;om list vkyfjyrnf jzpfonf/ list vkyfjy&mwGif policy rsm;udk process wpfckpD line tvdkuf azmfjyaeayvdrfhrnf/ xdkodkY azmfjy&mwGif yxrvdkif;onf policy number (1) jzpfonf/ 'kwd, qdkvsif (2) jzpfNyD;? wwd, qdkvsif (3) ponfjzifh &Sdaeayvdrfhrnf/ tu,fí 'kwd,ajrmuf policy udk zsufvdkygu atmufygtwdkif; &dkufoGif;&ygrnf/ qdkygu

Input policy

iptables -D INPUT 2

jzpfNyD; Input policy rS 'kwd,ajrmufudk zsufrnf [k ajymjcif;jzpfonf/ Port routing ESifh ywfoufNyD; WEB server odkY PRErouting vkyf&ef command rSm atmufygtwdkif; jzpfonf/

-D

onf

delete

iptables -t nat -A PREROUTING -s 0/0 -d 203.81.71.65 -p tcp dport 80 -j DNAT --to 192.168.1.2

txufyg command wGif -t onf service type NyD; -A rSm Append jzpfonf/ append trdsK;tpm;rSm Prerouting jzpfNyD; -s rSm source jzpfonf/ 0/0 qdkonfrSm rnfonfh source address rS rqdk[k qdkvdkjcif; jzpfonf/ -d onf distination jzpfNyD; ¤if;\ aemufwGif destination address vdkufonf/ -p onf proto type jzpfNyD; tcp jzpfaMumif; aMujimonf/ dport rSm distination \ port number udk qdkvdkonf/ aemufwGif disnation port ygonf/ DNAT trsdK;tpm;jzpfaMumif; ESifh --to jzifh 192.168.1.2 odkY forward vkyfay;jcif;jzpfonf/ Kernel Compilation Linux

onf open source jzpfaomaMumifh Linux \ kernel udk pdwfBudKufjyKjyif a&;om; Ekdifonf/ xdkodkYa&;om;jcif;udk kernel compilation vkyfjcif;[k ac:onf/ kernel udk rdrdpdwfBudKuf jyKjyifNyD;ygu rebuilt jyefvkyfay;&onf/ wenf;tm;jzifh compilation jyefvkyfay;&onf/ xdkodkYjyKvkyf&eftwGuf /usr/src/ atmufwGif kernel version tvdkuf directory &Sdonf/ ¤if; directory atmufodkY oGm;NyD; make command jzifh compilation vkyfEkdifonf/ make command wGif atmufygtwdkif; configuration vkyfonfh type rsm;&Sdonf/

69 •

make config



make menuconfig



make xconfig



make oldconfig

onf yes or no command rsm;tvdkuf command ay;NyD; compilation vkyf&onf/ menuconfig onf menu rsm;a&G;cs,fNyD; rebuilt vkyf&onf/ xconfig rSm GUI mode jzifh compilation vkyfjcif;jzpfonf/ aemufydkif;wGif gconfig [kvnf; awGUjrifvm&onf/ oldconfig onf factory default odkY tvdktavsmuf compile vkyfay;jcif;jzpfonf/ atmufwGif make menuconfig command jzifh compile vkyf&eftwGuf tqifoifhjzpfaeaom custom configuration screen udk azmfjyxm;ygonf/

config

kernel

tm; rdrdvdktyfovdk jyKjyifNyD;ygu compile vkyfaomtcgwGif device rsm; support rsm;udk built-in taeESifh xm;NyD; compile vkyfygu kernel \ s\t&G,fyrmPonf tvGefBuD;rm;ayvdrfhrnf/ xdkYaMumifh device rsm;tvdkuf module cGJxm;NyD; compile vkyfoifhonf/ kernel configuration tm; save vkyfNyD;ygu make dep command tm; run &rnf [k system rS ajymygvdrfhrnf/ dep qdkonfrSm dependence jzpfonf/ make dep tm; atmufygtwdkif; make vkyfEkdifonf/

70 make dep bzImage

xdkodkY &dkufoGif;ygu compile vkyfaeayvdrfhrnf/ tcsdeftenf;i,f Mumjrifhrnfjzpfygonf/ NyD;aemuf make modules install command jzifh modules rsm;udk install vkyfyg/ Linux wGif boot loader ESpfrsdK;yg&Sdonf/ Lilo ESifh grup jzpfonf/ tu,fí topfzefwD;vdkufaom kernel image twGuf boot loader tm; od&Sdem;vnfap&ef vdktyfygu boot loader configuration wGif oGm;a&mufjyKjyif&rnf/ atmufwGif Lilo \ configuration udk azmfjyxm;NyD; ¤if; configuration file onf /etc/ atmufwGif &Sdonf/

txufazmfjyyg ykHtwdkif; initrd onfvnf;aumif;? 2.4.20-8 [kwfr[kwfudk odem;vnfxm;oifhygonf/

image

onf

/boot/vmlinuz-

Source Code Compilation Linux

\ source code wGif rpm, dpkg, tar, tgz ponfwdkYrS wqifh compilation vkyfonfudk od&SdNyD; jzpfonf/ installation vkyf&mwGif windows rSmuJhodkY rnfonfh directory atmufwGif install vkyfrnf udk nGTefjyEdkifonf/ odkYaomf standard tm;jzifh /opt atmufwGif install vkyfonf/ tar format jzifh vmaom package wpfckudk jznfxkwfvdkygu atmufygtwdkif; command &dkufoGif;&ygrnf/ tar -xvzf abc.tar.gz

71 xdkodkY&dkufoGif;vdkufygu /opt atmufwGif /abc/*.* taeESifh a&muf&SdoGm;rnf jzpfonf/ qufvufNyD; standard procedure tm; azmfjyygrnf/ source package wpfck &&Sdvmygu yxrOD;pGm environment udk configure vkyfay;&ygrnf/ 'kwd,taeESifh compile vkyfjcif; wenf;tm;jzifh make vkyfjcif; jzpfonf/ wwd,tqifhonf install vkyjf cif; jzpfonf/ pwkw¦taeESifh configuration jyKvkyfay;&rnf jzpfonf/ configure jyKvkyf&jcif;rSm package rsm;onf machine independent jzifhvmMuonfjzpfaomaMumifh compiler trsdK;rsdK;? library file trsdK;rsdK; jzifhwnfaqmufxm;Mujcif; jzpfonf/ xdkYaMumifh configure vkyf&jcif; jzpfonf/ Linux wGif ykHrSeftm;jzifh package wpfckpDwGif configure qdkaom file wpfckyg&Sdwwfonf/ ¤if; file onf binary file(exe) jzpfonf/ ¤if; file tm; configure, config, Config, Configure paom emrnfrsm; jzifhawGUEkdifrnf jzpfonf/ configure vkyfaom command rSm atmufygtwdkif; jzpfonf/ ./ configure

onf ,ckvuf&Sd tvkyfvkyfaeaom directory atmufwGif configure vkyfrnf [k ajymjcif; jzpfonf/ Configure vkyfNyD;ygu Makefile qdkaom file xJwGif variable rsm;udk rSwfom;xm;rnf jzpfonf/ tu,fí Configure script rygvmvsif makefile udk xnfhay;xm;rnf jzpfonf/ configure vkyf&jcif;rSm makefile xGufvmap&efjzpfonf/ Makefile xGufvmNyD qdkygu source file rsm;udk /abc/src/ atmufwGif awGYEdkifrnf jzpfonf/ xdkYaemuf make command jzifh .o files rsm;xGufvmatmif jyKvkyf&ygrnf/ aemufwqifh onf install vkyfonfh tqifhjzpfaomaMumifh make install qdkaom command jzifh install vkyfyg/ install vkyfNyD;ygu /usr/local/bin/ atmufodkY a&muf&SdoGm;onfudk awGU&rnf/ tcsdKUonf /usr/local/etc/ atmufwGifvnf; a&muf&SdoGm;wwfonf/ ./

WEB base administration (webmin) Linux

wGif command line jzifhjyKvkyf&aom configuration rsm;udk GUI mode jzifh configure vkyfEkdifonfh tjyif Linux beginner rsm;twGuf WEB base administration jzpfaom webmin software onf vG,ful&Sif;vif;onfh WEB base configure program wpfckjzpfonf/ webmin tm; install vkyfNyD;onfESifh wjydKifeuf webmin onf port 10000 (default) jzifh run onf/ xdkYaMumifh Internet explorer rS ¤if; webmin tm; zGifhí configure vkyfEkdifonf/

72

E-Mail on Linux Linux

ay:wGif E-mail server wpfck jyKvkyf&mwGif a&S;OD;pGm Linux \ E-mail aMumif;udk em;vnfxm;oifhayonf/ Linux wGif Mailreceive vkyf&mwGif iMAP odkYr[kwf POP udk tokH;jyKNyD; Mail rsm;udk send vkyf&mwGif SMTP udk tokH;jyKonf/ E-Mail wdkif;wGif mail wpfck vdk&modkY a&muf&SdvufcHEdkif&eftwGuf process wGif (3)qifh&Sdonf/ tvG,ftm;jzifh agent (3)OD;[kac:Muonf/ ¤if;wdkYrSm atmufygtwdkif; jzpfMuonf/ MTA (Mail Transfer Agent) Mail

rsm; vdk&modkYa&mufatmif vTJajymif; owfrSwfay;onfh uJhodkYaom service rsm;udk qdkvdkonf/

agent

jzpfonf/

SMTP

MDA (Mail Delivery Agent) Mail

rsm;udk vdk&modkYa&mufatmif ydkYaqmifay;onf/ user rsm;\ Mail box rsm;xJodkY 0ifa&mufvmatmif jyKvkyfay;aom agent jzpfonf/ POP, iMAP rsm;onf Mail Delivery agent rsm;jzpfonf/ MUA (Mail User Agent) mail user agent mail

rsm;\ mail box twGif;wGif a&muf&Sdaeaom server rsm;xHrS download qGJ,laom mail client rsm;udk Express uJhodkYaom software rsm;onf mail client software

qdkonfrSm

user

rsm;tm; mail qdkvdkonf/ OutLook rsm;jzpfMuonf/ txufazmfjyyg Mail agents rsm;wGif MTA onf tcsdKUtcsdefrsm;wGif MDA uJhodkY vkyfaqmifay; wwfonf/ Mail transfer agent tcsif;csif; awGUqkHcsdwfqufrdNyD; mail rsm; tvJtvS,f vkyfouJhodkYjzpfonf/ teD;pyfqkH; Oyrmay;&vsif pmydkYorm;ESpfOD; vrf;c&D;wGif qkHrdMujcif; ESifh qifwlonf/ Linux wGif &Sdaom send mail onf complex jzpfNyD; prowerful jzpfaom software jzpfaomaMumifh administration vkyf&mwGifvnf; cufcJonf/ send mail onf MTA ESifh MDA ESpfrsdK;pvkH; pGrf;aqmifEdkifaomfvnf; configure vkyf&mwGif cufcJaom aMumifh aemufydkif;wGif QMail ay:vmcJhonf/ send mail udk configure vkyf&mwGif /etc/sendmail/ atmufwGif multipile configuration files rsm;awGUEdkifrnf jzpfonf/ xdk configuration files rsm;? uGJjym;ae&jcif;rSm domain name uGJNyD; user name wlvsif?

73 domain name configuration

uGJNyD; username rsm;yg uGJjym;jcm;em;vsif rnfodkYvkyfaqmif&rnf qdkaom rsm; yg0ifaomaMumifh jzpfonf/

Oyrm-

[email protected] [email protected] [email protected]

onf user wpfckwnf; jzpfNyD; domain name (3)ckjzifh account (3)ck &Sdonfh jzpfonf/ xdktcgrsdK;wGif rnfonfh ae&mrS yifjzpfaom 0ifvmaom mail rsm;onf mail box wpfckwnf;udk omydkY&ef configure vkyfxm;Edkifonf/ [email protected]

user

a

a

\

[email protected] [email protected]

[k domain name wpfckwnf; wlnDaomfvnf; user (3)OD; jzpfaevsif rnfodkY vkyfaqmif&rnf qdkaom function rsm;twGuf configure vkyfay;Edkifonf/ E-Mail service jyKvkyf&eftwGuf DNS configuration OD;pGmvkyf&rnf jzpfonf/ tu,fírdrdwGif DNS configuration rjyKvkyf&ao;ygu odkYr[kwf DNS service tqifoifh rjzpfcJhygvsif atmufygtwdkif; Host file wGifoGm;a&mufNyD; Edit vkyfay;&ygrnf/ odkYrSomvsif rdrdwGif Domain Name wpfck ydkifqdkif&&Sdrnfjzpfonf/ vi /etc/hosts

xdk file wGif rdrdpuf IP address &dkufoGif;um rdrday;vdkaom &dkufoGif;&ygrnf/ xdkodkYjyKvkyfNyD;ygu wq command jzifhxGufNyD; configure vkyf&ygrnf/

domain name send mail

udk twGuf

vi /etc/mail/sendmail.cf

xdkodkY &dkufoGif;ygu vi Editor wGif send mail configuration xdkYaemuf atmufygtwdkif; &dkufoGif;vdkufygu SMTP &SmawGUEdkifrnfjzpfonf/

file

ay:vmrnf jzpfonf/ daemon option udk

/127.0.0.1

xdkpmaMumif;onf pmaMumif;a& 264 vdkif;ajrmufwGif rsm;aomtm;jzifhwnf&Sdaernf jzpfonf/ xdkpmaMumif;tm; yy jzifh copy ul;,lNyD; p jzifh past vkyf&ygrnf/ NyD;aemuf copy ul;xm;aom pmaMumif;\ 127.0.0.1 ae&mwGif rdrdpuf IP address udk &dkufoGif;&ygrnf/ wq jzifh save NyD;vsif service sendmail restart command jzifh sendmail service

74 udk pwif&ygrnf/ netstat -an | grep 25 jzifhMunfhrnf qdkygu sendmail tvkyfvkyfaeaMumif; awGUEkdifrnf jzpfonf/ txufygtwdkif; Mail transfer agent twGuf configure vkyfNyD;ygu MDA twGuf configure vkyf&OD;rnfjzpfonf/ vi /etc/xinetd.d/ipop3 command jzifh ipop3 file udk configure vkyf&ygrnf/ vi editor wGif disable=no rS yes ajymif;vJay;ygu ipop3 service on oGm;rnfjzpfonf/ xdkYaemuf service xinetd restart command jzifh service tm;vkH;udk restart vkyf&ygrnf/ NyD;aemuf netstat -an | grep 110 command jzifh Munfhrnf qdkygu MDA service onf port 110 wGif service ay;aeonfudk awGUEdkifayvdrfhrnf/ xdkYaemuf MUA jzpfonfh mail client software jzifh mail tydkY^tzrf; aqmif&GufEdkifNyD jzpfonf/ Linux support File System (NFS) Linux

vkyfay;aom file system rSm NFS jzpfonf/ SUN rS xkwfvkyfNyD; exportable jzpfaom file system jzpfonf/ exportable qdkonfrSm file system tm; network ay:odkY export vkyfvkdufaomtcgwGif network ay:wGif xdk file onf virtually available jzpfvmjcif;udk qdkvdkonf/ wenf;tm;jzifh ajym&aomf NFS qdkonfrSm file share ay;jcif;jzpfonf/ NFS system pwif&eftwGuf atmufygtqifhrsm;twdkif; aqmif&Guf&rnf jzpfonf/ wGif

support

vi /etc/exports

xdkodkY&dkufEdkyfaom tcgwGif pmwpfaMumif;rQr&Sdaom exports file udkawGUEdkifrnf jzpfonf/ vi editor wGif rdrd share ay;vdkaom directory udk ae&mtwdtusay;&rnf/ xdkYtjyif rdrday;vdkaom IP address udk &dkufoGif;&rnf/ Oyrm-

/usr/local

192.168.0.200 (ro)

/home

192.168.0.30

(rwx)

xdkodkYay;vdkufygu share ay;NyD; jzpfayvdrfhrnf/ xdkYtjyif share ay;vdkygu atmufygtwdkif; &dkufoGif;&rnf/ /usr/local

network group

wpfckvkH;tm;

192.168.0.0/255.255.255.0 (ro)

ponfwdkYonf permission rsm;jzpfaMumif; od&SdEdkifonf/ xdkodkY share ay;xm;aom share rsm;udk tokH;jyKvdkvsif smb oifcef;pmwGif windows rS share tm; tokH;jyKonfhtwdkif; share tokH;jyKEdkifonf/

(ro),

(rw)

75

X Windows System X windows system

qdkonfrSm

Unix

GUI support

ay;Edkif&eftwGuf wDxGifcJhjcif;jzpfNyD; truely client, server architecher jzifh tvkyfvkyfonf/ layer wpfcktaeESifh yg&SdwmjzpfNyD; X version 11 release 5 wGif X free 86 project ESifhtwl Linux twGuf support vkyfay;cJhonf/ layer wpfcktaeESifh wnf&SdaomaMumifh X windows twGuf components rsm;yg&Sdonf/ ¤if;wdkYrSm atmufygtwdkif; jzpfonfX server (or) display server windows manager Desktop Environment X-client

tm;

Related Documents

Linux Os Myanmar
May 2020 8
Installasi Os Linux
May 2020 11
Os-selain-linux
October 2019 13
Myanmar
October 2019 39
Myanmar
August 2019 39

More Documents from "Alexander Krivov"