
Small Memory mini-HOWTO

Todd Burgess

tburgess@uoguelph.ca

JF Project - 擔杮岅栿

JF@linux.or.jp

2000-12-12
Revision History                                                       
Revision 0.1          2000-12-01           Revised by: tb              

儊儌儕梕検偑彮側偄僔僗僥儉忋偱 Linux 傪摦偐偡曽朄

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

Table of Contents
1. 僀儞僩儘僟僋僔儑儞
2. Linux 僇乕僱儖
3. 壖憐僐儞僜乕儖
4. 僨乕儌儞僾儘僙僗
    4.1. inetd
    4.2. lpd
    4.3. nfsd 偲 mountd
    4.4. portmap
    4.5. sendmail
    4.6. others
   
   
5. 偁偲偑偒
6. 擔杮岅栿偵偮偄偰
    6.1. Red Hat/Caldera/Debian 偱偺僨乕儌儞偺婲摦偺巭傔曽(帺屓棳)
    6.2. 栿幰偍傛傃幱帿
   
   

1. 僀儞僩儘僟僋僔儑儞

儊儌儕傪攦偭偰捛壛偡傞偲偄偆庤傕偁傝傑偡偑丄偦傟埲奜偵傕 Linux 偑徚旓偡
傞儊儌儕偺検傪愡栺偡傞曽朄偼偨偔偝傫偁傝傑偡丅

儊儌儕徚旓偺娤揰偐傜偡傞偲丄僀儞僗僩乕儖偟偨捈屻偺僨傿僗僩儕價儏乕僔儑
儞偱偼丄偨偄偰偄旕忢偵柍懯偺懡偄儊儌儕偺巊偄曽傪偟偰偄傑偡丅傢偨偟偨偪
偺戝晹暘偑巊偄傕偟側偄傛偆側僒乕價僗傗婡擻偑摦偄偰偄傞偺偱偡丅偦偆偟偨
夁忚側僒乕價僗偺懡偔傪嶍彍偡傞偙偲偱丄悢 MB 偺幚儊儌儕傪夝曻偱偒傑偡丅

挊幰帺恎偺僔僗僥儉偼丄486DX2 66MHz 偺 CPU 偲 12 MB 偺暔棟儊儌儕丄偍傛傃
12 MB 偺僗儚僢僾僗儁乕僗偲偄偆娐嫬偱偡丅偙傟偱偙偙 3 擭娫側傫偺晄枮傕側
偔 Linux 傪摦偐偟偰偄傑偡丅偨傇傫丄偁偲悢擭偼偙偺傑傑 Linux 傪摦偐偟懕
偗傞偱偟傚偆丅 :)
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

2. Linux 僇乕僱儖

僨傿僗僩儕價儏乕僔儑儞晅懏偺僇乕僱儖偼丄偳傟傕旍戝偟偡偓偱偁傝丄扤傕巊
傢側偄傛偆側婡擻傑偱晅壛偝傟偰偄傑偡丅偙傟傑偱僇乕僱儖傪嵞僐儞僷僀儖偟
偨偙偲偑側偄偲偟偰傕丄偙偺嵺丄惀旕傗偭偰傒傞偙偲傪偍偡偡傔偟傑偡丅僇乕
僱儖偺嵞僐儞僷僀儖偺曽朄偼偙偺暥彂偺斖醗傪墇偊傑偡偑丄偦傟偵偮偄偰挌擩
偵夝愢偝傟偨桪傟偨 Linux 杮傗僈僀僪偼偨偔偝傫偁傝傑偡丅

僇乕僱儖傪嵞僐儞僷僀儖偡傞応崌偼丄昁梫側婡擻埲奜偼堦愗慻傒崬傑側偄偲偄
偆曽恓傪朰傟側偄偱偔偩偝偄丅偨偲偊偽丄撉幰偺偆偪丄僇乕僱儖偺 PLIP 僒億
乕僩傪昁梫偲偡傞傂偲偑偳傟偩偗偄傞偱偟傚偆偐丠偦偺婡擻傪慻傒崬傫偩偲偟
偰丄幚嵺偵巊偆傂偲偑偳傟偩偗偄傑偡偐丠僇乕僱儖傪彫偝偔偡傟偽丄儘乕僪帪
娫偑抁偔側傝丄儊儌儕偺徚旓偼尭彮偟丄CPU 僒僀僋儖傕抁弅偝傟傑偡丅

傕偆傂偲偮丄儌僕儏乕儖偺栤戣偑偁傝傑偡丅儌僕儏乕儖偼埖偄偑傗偭偐偄偩偲
巚偭偰偄傞偺偱丄屄恖揑偵偼巊偭偰偄傑偣傫丅偟偐偟丄傕偟巊偭偰傒偰摿偵栤
戣偩偲姶偠側偄側傜丄乽僇乕僱儖偺旍戝壔乿傪梷偊傞偵偼岠壥揑偱偡丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3. 壖憐僐儞僜乕儖

壖憐僐儞僜乕儖偺悢傪尭傜偡偲丄巊梡儊儌儕傪戝暆偵愡栺偱偒傑偡丅戝晹暘偺
Linux 僨傿僗僩儕價儏乕僔儑儞偱偼丄弶婜忬懺偱 6 屄偺壖憐僐儞僜乕儖偑嶌摦
偟偰偄傑偑丄 6 屄偺壖憐僐儞僜乕儖傪嶌摦偝偣傞偲丄偩偄偨偄暯嬒偱丄栺 4MB
偺儊儌儕傪徚旓偟傑偡丅偙偺悢傪尭傜偣偽丄悢 MB 扨埵偱儊儌儕傪愡栺偱偒傑
偡丅偨偄偰偄偺儐乕僓偼丄 3 屄偐 4 屄偱廩暘偱偡丅偄偔偮傑偱尭傜偡偐偼巊
偆恖偺岲傒偵傕傛傝傑偡偑丄壖憐僐儞僜乕儖偺悢傪尭傜偣偽尭傜偡偩偗丄偦偺
暘傾僾儕働乕僔儑儞偑巊梡偱偒傞儊儌儕偺検偑憹偊傞偲偄偆偙偲傪朰傟側偄偱
偔偩偝偄丅

壖憐僐儞僜乕儖傪偄偔偮摦嶌偝偣傞偐偼丄/etc/inittab 偵婰弎偝傟偰偄傑偡丅
壖憐僐儞僜乕儖偺悢傪尭傜偡偵偼丄師偺傛偆偵偟偰偔偩偝偄丅

 1. 僥僉僗僩僄僨傿僞偱丄/etc/inittab 傪奐偒傑偡丅
   
 2. 師偺傛偆偵彂偐傟偰偄傞峴傪尒偮偗傑偡(愭摢偑 c1 偱巒傑偭偰偄傞偲偙傠
    偑億僀儞僩偱偡)丅
   
      c1:12345:respawn:/sbin/getty tty1 38400 linux             
   
    偙偺傛偆側峴偺偆偪丄堦斣戝偒側悢帤偱巒傑傞峴(偨偲偊偽丄c6 )偺峴摢偵
    # 傪彂偒崬傫偱僐儊儞僩傾僂僩偟傑偡(嵍懁偵嬻敀傪偄傟側偄傛偆偵偟偰偔
    偩偝偄)丅偙偺嶌嬈傪昁梫側夞悢偩偗孞傝曉偟偰偔偩偝偄丅1 峴僐儊儞僩傾
    僂僩偡傞偛偲偵丄婲摦偡傞僐儞僜乕儖偑傂偲偮尭傝傑偡丅
   
 3. 僔僗僥儉傪嵞婲摦偡傞偲丄愝掕偑桳岠偵側傝傑偡丅
   

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4. 僨乕儌儞僾儘僙僗

懡偔偺 Linux 僨傿僗僩儕價儏乕僔儑儞偱偼丄傢偨偟偨偪偺傎偲傫偳偑巊偄傕偟
側偄傛偆側僨乕儌儞偑婲摦偡傞傛偆偵側偭偰偄傑偡丅偦偆偟偨僨乕儌儞偺戝晹
暘偼丄僗僋儕僾僩偵傛偭偰儘乕僪偝傟偰偄傑偡丅偨偩丄偦偺僗僋儕僾僩偺柤慜
傗抲偐傟偰偄傞埵抲偼丄僨傿僗僩儕價儏乕僔儑儞偵傛偭偰堎側偭偰偄傑偡丅
Slackware 偺応崌偩偲丄僙僢僩傾僢僾僗僋儕僾僩偼 /etc/rc.d/rc.* 偵偁傝傑
偡 (栿拲丗Red Hat/Caldera/Debian 偱偺僨乕儌儞偺巭傔曽偼丄擔杮岅栿偵偮偄
偰傪偛棗偔偩偝偄)丅

偙偙偐傜偺愢柧偵偍偄偰偼丄Unix 僔僃儖僗僋儕僾僩丒僾儘僌儔儈儞僌偺抦幆偑
偁傞偲旕忢偵栶偵棫偪傑偡丅偲偼偄偊丄Unix 僔僃儖僗僋儕僾僩傪彂偄偨偙偲偑
側偄傂偲偺偨傔偵丄埲壓偵娙扨偱偼偁傝傑偡偑丄僔僃儖僗僋儕僾僩偺徯夘傪偟
傛偆偲巚偄傑偡丅

師偺僔僃儖僗僋儕僾僩傪偛棗偔偩偝偄丅

  #!/bin/sh                                                            
  echo "hello world"                                                   
  #echo "good bye cruel world"                                         

忋婰偺僐乕僪偼丄"hello world" 偲偄偆暥帤楍傪昞帵偡傞傕偺偱偡丅僔僃儖僗
僋儕僾僩偵偼丄傑偢師偺傛偆側婰弎偑丄嵟弶偺峴偺愭摢偵娷傑傟偰偄側偗傟偽
側傝傑偣傫丅

  #!/bin/sh                                                            

偦傟偵懕偔偡傋偰偺峴偱偼丄幚峴偵愭棫偭偰偁傜偐偠傔僉乕儃乕僪忋偱懪偪崬
傫偱偍偄偨僐儅儞僪偑偦偺傑傑堦峴偯偮幚峴偝傟傑偡(椙偔偱偒偨僉乕儃乕僪儅
僋儘偺傛偆側傕偺偲峫偊偰偔偩偝偄)丅

'#' 偱巒傑傞峴偼丄僔僃儖偵傛偭偰幚峴偝傟側偄偺偱丄僐儊儞僩偲側傝傑偡丅
僨乕儌儞傪儘乕僪偡傞応崌丄婲摦僗僋儕僾僩偺傎偲傫偳偼師偺傛偆側偐偨偪偵
側偭偰偄傑偡丅

  if somecondition                                                     
    do something                                                       
    fi                                                                 

昁梫側偺偼丄師偺婰弎偱巒傑傝丄

  if                                                                   

師偺婰弎偱廔傢傞峴丄

  fi                                                                   

偙偆偟偨峴傪偡傋偰僐儊儞僩傾僂僩偡傞偙偲偱偡丅

摿掕偺僨乕儌儞偑偳偙偱婲摦偝傟偰偄傞偐抦傝偨偄応崌偼丄偦偺僨乕儌儞偺柤
慜傪弶婜壔僗僋儕僾僩撪偱扵偟偰偔偩偝偄丅偨偲偊偽丄inetd 偑 Slackware 偺
偳偙偐傜儘乕僪偝傟傞偺偐抦傝偨偄応崌丄傢偨偟側傜師偺傛偆偵偟傑偡丅

  $ cd /etc/rc.d                                                       
  $grep -n inetd rc.*                                                  
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4.1. inetd

inetd 偼丄telnet 傗 ftp 僐儅儞僪傪巊偭偨傝丄偁側偨偺儅僔儞偵 talk 儕僋
僄僗僩傪憲偭偨傝偱偒傞傛偆偵偡傞僨乕儌儞偱偡丅帺暘偺儅僔儞傪僒乕僶偲偟
偰巊偭偨傝丄儕儌乕僩偱傾僋僙僗偟偨傝偡傞昁梫偑側偄側傜丄inetd 偼嶍彍偟
偰偐傑偄傑偣傫丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4.2. lpd

lpd 偼丄lpr 僐儅儞僪傪巊偭偰丄僼傽僀儖傪僾儕儞僞偱報嶞偡傞嵺偵巊梡偟傑
偡丅偍庤尦偺 Linux 偱報嶞傪偟側偄応崌偼丄lpd 傪嶍彍偟偰偐傑偄傑偣傫丅偨
偩丄傕偟偍巊偄偺僾儕儞僞乕偑 HP Deskjet ?? 僾儕儞僞偱偁傝丄偦傟偱報嶞傪
偡傞偺偱偁傟偽丄 dj-printcap 偲偄偆僷僢働乕僕傪偍偡偡傔偟傑偡丅偙偺僷僢
働乕僕偼埲壓偺応強偱擖庤偱偒傑偡丅

ftp://sunsite.unc.edu/pub/Linux/system/Printing/dj-printcap.tar.gz
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4.3. nfsd 偲 mountd

偙傟傜傆偨偮偺僨乕儌儞偼丄NFS 僒乕僶傪壱摥偝偣傞嵺偵巊梡偟傑偡丅偍巊偄
偺 Linux 僔僗僥儉傪 NFS 僒乕僶偲偟偰棙梡偟側偄偺偱偁傟偽丄偙偺傆偨偮偺
僨乕儌儞偼嶍彍偟偨傎偆偑埨慡偱偡丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4.4. portmap

portmap 僨乕儌儞偼丄RPC 僒乕價僗傪張棟偡傞嵺偵巊梡偟傑偡丅NFS 僒乕僶傗
偦偺懡偺 RPC 僾儘僌儔儉傪壱摥偝偣側偄側傜丄 portmap 偼嶍彍偟偰偐傑偄傑
偣傫丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4.5. sendmail

sendmail 傕偐側傝懡偔偺儊儌儕傪徚旓偡傞僨乕儌儞偱偡丅偍庤尦偺 Linux 偱
憲怣儊乕儖傪拞宲偟偨傝丄憲怣偝傟偨儊乕儖傪庤尦偺 Linux 偱捈愙庴怣偟偨傝
偟側偄偺偱偁傟偽丄sendmail 偼嶍彍偟偰偐傑傢側偄偱偟傚偆丅庤尦偺 Linux
偐傜儊乕儖傪憲怣偡傞応崌偼丄偨偄偰偄 (僾儘僶僀僟摍偑採嫙偡傞)暿偺儊乕儖
僒乕僶傪巊偭偰儊乕儖憲怣偑壜擻側傛偆偵丄儊乕儖僋儔僀傾儞僩傪愝掕偱偒傞
傛偆偵側偭偰偄傑偡丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4.6. others

僔僗僥儉忋偱婲摦偝傟傞僨乕儌儞偺側偐偵偼丄懠偵傕晄昁梫側傕偺偑偁傞偲巚
偄傑偡丅晄梫偩偲巚偭偨傜嶍彍偟偰偟傑偄傑偟傚偆丅嶍彍偟偰偼偄偗側偄僨乕
儌儞偼丄 syslogd 偲 klogd 偺傆偨偮偱偡丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

5. 偁偲偑偒

偙傟傑偱愢柧偟偨偙偲偼丄傢偨偟偑帺暘偺 Linux 儅僔儞偺儊儌儕巊梡検傪偱偒
傞尷傝愡栺偡傞偨傔偵偲偭偨曽朄偱偡丅Linux 儅僔儞偺儊儌儕巊梡検傪梷偊傞
偨傔偺曽朄偵偮偄偰丄偪傚偭偲偟偨嶲峫偵側傟偽偝偄傢偄偱偡丅Good luck and
happy hacking!
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

6. 擔杮岅栿偵偮偄偰

6.1. Red Hat/Caldera/Debian 偱偺僨乕儌儞偺婲摦偺巭傔曽(帺屓棳)

栿幰偼 RedHat 4.2 傪巊偭偰偄傞偨傔丄偙偺暥彂偵偁傞僨乕儌儞偺婲摦傪巭傔
傞偨傔偺庤弴傪偦偺傑傑揔梡偡傞偙偲偼偱偒傑偣傫偱偟偨丅偙偙偱丄巹偺偲偭
偨庤弴傪徯夘偟偰偍偒傑偡丅(Debian 偼怗偭偨偙偲偼偁傝傑偣傫偑丄PCMCIA
HOWTO 偵傛傞偲 System V 棳偺傛偆側偺偱丄偙偺庤偑巊偊傞偺偱偼側偄偱偟傚
偆偐) 埲壓偺曽朄偼儀僗僩偱偼側偄偺偐傕偟傟傑偣傫偑丄彮側偔偲傕嵟埆偺曽
朄偱偼側偄偲怣偠偰偄傑偡丅^^;

(Debian 偱偼僨傿儗僋僩儕攝抲偑懡彮堎側傞応崌偑偁傝傑偡偑丄曽朄偼摨偠偱
偡丅y.s.)

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆                              Caution                               劆
劌劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆拲堄!!丗偙偺曽朄偵娭偟偰婲偒傞偄偐側傞懝奞傕栿幰偼堦愗偦偺愑擟偼偲傞劆
劆偙偲偼偱偒傑偣傫丅*帺暘偺愑擟* 偵偍偄偰峴偭偰偔偩偝偄偹丅           劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

仢庤弴

 1. /etc/rc.d 偵堏摦偟丄root 尃尷偱 cp -pdr rc3.d rc3.d.backup 偲擖椡丅
    僆儕僕僫儖偺僶僢僋傾僢僾傪偲偭偰偍偔丅(埲屻偺憖嶌傕 root 尃尷偱丅)
    側偍丄僆僾僔儑儞偼惓妋偵偄傟偰偔偩偝偄両
   
 2. /etc/rc.d/rc3.d 偵堏摦偟丄巭傔偨偄傕偺傪擖傟傞僨傿儗僋僩儕傪嶌惉偡傞
    (偙偙偱偼 mkdir stop 偲偟傑偡)丅
   
 3. /etc/rc.d/rc3.d 偵偁傞偺偑屄乆偺僨乕儌儞傪婲摦偡傞偨傔偵巊梡偝傟傞僼
    傽僀儖側偺偱丄晄梫偲巚傢傟傞柤慜偺傕偺傪 2.偱嶌惉偟偨僨傿儗僋僩儕偵
    堏摦偡傞丅 (椺: mv S60n* stop)
   
       
        拲堄 1: 寛偟偰徚偝側偄傛偆偵丅偁偔傑偱傕堏摦偱偡丅
       
        拲堄 2: 廫暘側抦幆側偟偵堦搙偵偄偔偮傕堏摦偡傞偲丄栤戣偑婲偙傞
        偐傕偟傟傑偣傫丅1夞偱堏摦偡傞僼傽僀儖偼嵟彫尷偵偟偰堦曕堦曕恑傒
        傑偟傚偆丅
   
 4. 儕僽乕僩偡傞丅
   

偙傟傜堦楢偺嶌嬈傪峴偆慜偵丄婲摦捈屻偺儊儌儕偺忬懺傪 cat /proc/meminfo
摍偱挷傋偰偍偄偰丄嶌嬈屻偺抣偲斾妑偡傞偲岾偣偵側傟傞偐傕偟傟傑偣傫丅

偙偺曽幃偺棙揰偼丄

 1. 尰嵼偺忬懺偐傜 1偮 1偮曄峏偟偰偄偗傞偺偱丄栤戣偑婲偙偭偨帪偺尨場偺敾
    暿偑偟傗偡偄丅
   
 2. 傕偟棫偪忋偑傜側偔側偭偰傕丄僽乕僩僼儘僢僺乕偐傜僽乕僩偟偰丄嵟屻偵堏
    摦偟偨僼傽僀儖傪尦偺僨傿儗僋僩儕 (/etc/rc.d/rc3.d) 偵僐僺乕偡傞偩偗
    偱 1偮慜偺忬懺偵栠偣傞丅
   
 3. 偵偭偪傕偝偭偪傕偄偐側偔側偭偨帪偼丄僽乕僩僼儘僢僺乕偐傜僽乕僩偟丄
    1.偱偲偭偨僶僢僋傾僢僾偱 rc3.d 傪抲偒姺偊偰傗傟偽丄 (cp -pdrf
    rc3.d.backup rc3.d) 堦斣嵟弶偵栠傟傞丅
   
 4. mkdir 偲 cp 偲 mv 偟偐巊傢側偄丅(儕僇僶儕乕傕妝)
   

偲偄偆傢偗偱丄巹偺傛偆側挻弶怱幰偵偼偄偄偺偱偼側偄偐偲巚偄傑偡丅
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

6.2. 栿幰偍傛傃幱帿

東栿丗拞栰惓崉(1998/03/28)

擔杮岅斉偺幱帿: 偙偺暥彂偺嶌惉偵摉偨偭偰偼丄桳塿側偛彆尵傪偄偨偩偄偨愳
娸椙帯偝傫丄拞栰晲梇偝傫傎偐丄JF 偺奆偝傫偵姶幱偄偨偟傑偡丅

峏怴丗愮扷桾巌(2001/03/17)

(Red Hat/Caldera/Debian 偱偺僨乕儌儞偺婲摦偺巭傔曽偼丄拞栰惓崉偝傫偑嶌
惉偟偰偄傑偡丅)
