´ÙÀ½ ÀÌÀü Â÷·Ê

9. ±âº»ÀûÀÎ ³×Æ®¿öÅ·ÀÇ ¼³Á¤

9.1 Netkit-base ¼³Ä¡Çϱâ

./configure
make; make install
cd etc.sample; cp services protocols /etc
mv /usr/bin/ping /bin
 

9.2 Net-toolsÀÇ ¼³Ä¡

make; make install
mv /usr/bin/netstat /bin
cd /usr/sbin; mv ifconfig route /sbin
 

/etc/init.d/localnet ºÎÆ®½ºÅ©¸³Æ® ¸¸µé±â

#!/bin/sh
# Begin /etc/init.d/localnet
 
check_status()
{
  if [ $? = 0 ]
  then
    echo "OK"
  else
    echo "FAILED"
  fi
}
 
echo -n "Setting up loopback device..."
/sbin/ifconfig lo 127.0.0.1
check_status
 
echo -n "Setting up hostname..."
/bin/hostname --file /etc/hostname
check_status
 
# End /etc/init.d/localnet
 

±ÇÇÑ°ú ½Éº¼¸¯ ¸µÅ©ÀÇ ¼³Á¤

/etc/hostname ÆÄÀÏ ¸¸µé±â

/etc/hostname ÆÄÀÏÀ» »õ·Î ¸¸µé¾î È£½ºÆ® À̸§À» ±× ¾È¿¡ Áý¾î³Ö´Â´Ù. ÀÌ ¸®À½Àº FQDN(Fully Qualified Domain Name)Àº ¾Æ´Ï´Ù. ¿©·¯ºÐÀÌ ³×Æ®¿÷ »ó¿¡¼­ ¿©·¯ºÐÀÇ ÄÄÇ»Å͸¦ ºÎ¸£°í ½ÍÀ» ¶§ ¾µ À̸§ÀÌ´Ù.

/etc/hosts ÆÄÀÏÀÇ »ý¼º

¸¸¾à ³×Æ®¿÷ Ä«µå¸¦ ¼³Á¤ÇÏ°í ½Í´Ù¸é /etc/hosts ÆÄÀÏ ¾È¿¡¼­ ¾µ IP ÁÖ¼Ò¿Í FQDN, °¡´ÉÇÏ´Ù¸é ¾Ë¸®¾Æ½º µéÀ» °áÁ¤ÇØ¾ß ÇÑ´Ù. ¾Æ·¡´Â ÇÑ ¿¹Á¦ÀÌ´Ù:

<myip> myhost.mydomain.org aliases
 

IP ÁÖ¼Ò°¡ »ç¼³ ¸ÁÀÇ IP ÁÖ¼Ò ¹üÀ§ ¾È¿¡ ÀÖµµ·Ï Çضó. °¡´ÉÇÑ °ªÀº ´ÙÀ½°ú °°´Ù:

Class Networks
A     10.0.0.0
B     172.16.0.0 through 172.31.0.0
C     192.168.0.0 through 192.168.255.0
 

°¡´ÉÇÑ IP ÁÖ¼Ò´Â 192.168.1.1ÀÏ ¼ö ÀÖ´Ù. ÀÌ IP¿¡ ´ëÇÑ FQDNÀº me.linuxfromscratch.orgÀÏ ¼ö ÀÖ´Ù.

¸¸¾à ¿©·¯ºÐÀÌ ³×Æ®¿÷ Ä«µå¸¦ »ç¿ëÇÏÁö ¾ÊÀ» ¿¹Á¤ÀÏ Áö¶óµµ ¿©ÀüÈ÷ FQDNÀÌ ÇÊ¿äÇÏ´Ù. ÀÌ´Â Sendmail °°Àº ÇÁ·Î±×·¥µéÀÌ Á¤»óÀûÀ¸·Î ÀÛµ¿ÇÏ´Â µ¥ ÇÊ¿äÇÏ´Ù (½ÇÁ¦·Î SendmailÀº FQDNÀ» °áÁ¤ÇÏÁö ¸øÇϸé ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù).

¾Æ·¡´Â ¿©·¯ºÐÀÌ ³×Æ®¿÷ Ä«µå¸¦ ¼³Á¤ÇÏÁö ¾Ê´Â °æ¿ìÀÇ /etc/hosts ÆÄÀÏÀÌ´Ù:

# Begin /etc/hosts (no network card version)
127.0.0.1 me.lfs.org <contents of /etc/hostname> localhost
# End /etc/hosts (no network card version)
 

¾Æ·¡´Â ³×Æ®¿÷ Ä«µå¸¦ ¼³Á¤ÇÏ´Â °æ¿ìÀÇ /etc/hosts ÆÄÀÏÀÌ´Ù:

# Begin /etc/hosts (network card version)
127.0.0.1 localhost
192.168.1.1 me.lfs.org <contents of /etc/hostname>
# End /etc/hosts (network card version)
 

¹°·Ð, 192.168.1.1°ú me.lfs.orgÀ» ¿©·¯ºÐÀÇ ±âÈ£¿¡ ¸Â°Ô(ȤÀº ¿©·¯ºÐÀÌ ³×Æ®¿÷/½Ã½ºÅÛ °ü¸®ÀڷκÎÅÍ IP ÁÖ¼Ò¸¦ ÇÒ´ç¹Þ¾Ò°í ÀÌ ¸Ó½ÅÀ» ±× ³×Æ®¿÷¿¡ ¿¬°áÇÒ °èȹÀ̶ó¸é °Å±â¿¡ ¸Â°Ô) ¹Ù²Û´Ù.

/etc/init.d/ethnet ÆÄÀÏÀÇ »ý¼º

ÀÌ ºÎºÐÀº ¿©·¯ºÐÀÌ ³×Æ®¿÷ Ä«µå¸¦ ¼³Á¤ÇÏ´Â °æ¿ì¿¡¸¸ ÇØ´çµÈ´Ù. ±×·¸Áö ¾Ê´Ù¸é ÀÌ ºÎºÐÀ» ¶Ù¾î³Ñ¾îµµ µÈ´Ù.

¾Æ·¡¸¦ Æ÷ÇÔÇϵµ·Ï /etc/init.d/ethnet ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:

#!/bin/sh
# Begin /etc/init.d/ethnet
 
check_status()
{
  if [ $? = 0 ]
  then
    echo "OK"
  else
    echo "FAILED"
  fi
}
 
/sbin/ifconfig eth0 <ipaddress>
check_status
 
# End /etc/init.d/ethnet
 

/etc/init.d/ethnetÀÇ ±ÇÇÑ°ú ½Éº¼¸¯ ¸µÅ©¸¦ ¼³Á¤ÇÑ´Ù.

³×Æ®¿÷ ¼³Á¤ÀÇ ½ÃÇè

ping <your FQDN>
ping <what you choose for hostname>
ping localhost
ping 127.0.0.1
ping 192.168.1.1 (only when you configured your network card)
 

ÀÌ ´Ù¼¸°³ÀÇ ping ¸í·ÉµéÀÌ ¸ðµÎ ½ÇÆÐ ¾øÀÌ ÀÛµ¿ÇØ¾ß ÇÑ´Ù. ±×·¸´Ù¸é ±âº»ÀûÀÎ ³×Æ®¿÷ÀÌ Àß ÀÛµ¿ÇÏ´Â °ÍÀÌ´Ù.

9.3 ½Ã½ºÅÛ °Ë»ç

ÀÌÁ¦ ¸ðµç ¼ÒÇÁÆ®¿þ¾î°¡ ¼³Ä¡µÇ¾ú°í ºÎÆ®½ºÅ©¸³Æ®µéÀÌ ¸¸µé¾îÁ³À¸¸ç Áö¿ª ³×Æ®¿÷µµ ¼³Á¤µÇ¾úÀ¸¹Ç·Î ¿©·¯ºÐÀÇ ÄÄÇ»Å͸¦ ¸®ºÎÆÃÇÏ¿© ÀÌ »õ ½ºÅ©¸³Æ®µéÀÌ ½ÇÁ¦·Î ÀÛµ¿ÇÏ´ÂÁö¸¦ º¸±â À§ÇØ °Ë»ç¸¦ ÇØ º¼ ½Ã°£ÀÌ´Ù. ¿ì¼±Àº /etc/init.d µð·ºÅ丮¿¡¼­ Á÷Á¢ ½ÇÇàÇÏ¿© °¡Àå ÈçÇÑ ¹®Á¦µé (¿ÀŸ³ª À߸øµÈ °æ·Î µî)À» °íÄ¡±æ ¹Ù¶ö °ÍÀÌ´Ù. ÀÌ ½ºÅ©¸³Æ®µéÀÌ Á÷Á¢ ½ÇÇà½ÃÄ×À» ¶§ Àß ÀÛµ¿ÇÑ´Ù¸é ½Ã½ºÅÛÀÇ ½ÃÀÛ°ú Á¾·á ½Ã¿¡µµ Á¤»óÀûÀ¸·Î ÀÛµ¿ÇØ¾ß ÇÑ´Ù. À̸¦ ½ÃÇèÇÏ´Â ¹æ¹ýÀº ¿ÀÁ÷ ÇϳªÀÌ´Ù. Áö±Ý shutdown -r ¸í·ÉÀ¸·Î ½Ã½ºÅÛÀ» Á¾·áÇÑ ÈÄ LFS·Î ÀçºÎÆà ÇÏ¿©¶ó. ÀçºÎÆà ÀÌÈÄ¿¡ ¿©·¯ºÐÀº ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­¿Í °°Àº º¸ÅëÀÇ ·Î±ä ÇÁ·ÒÇÁÆ®¸¦ º¸°Ô µÉ °ÍÀÌ´Ù (¿©·¯ºÐÀÌ XDMÀ̳ª ±âŸ ´Ù¸¥ Display Manager (XDMÀÇ KDE ÆÇÀÎ KDE °°Àº)¸¦ »ç¿ëÇÏÁö ¾Ê´Â´Ù¸é).

ÀÌ ½ÃÁ¡¿¡ ¿©·¯ºÐÀÇ ±âº»ÀûÀÎ LFS ½Ã½ºÅÛÀº »ç¿ëÇÒ Áغñ°¡ µÇ¾ú´Ù. Áö±ÝºÎÅÍ ³ª¿Ã °ÍµéÀº ¸ðµÎ ¼±ÅûçÇ×ÀÌ¸ç ¿©·¯ºÐÀÇ ÆÇ´Ü¿¡ µû¶ó ÆÐÅ°ÁöµéÀ» ¶Ù¾î³ÑÀ» ¼ö ÀÖ´Ù. ±×·¯³ª ¿©·¯ºÐÀÌ ÆÐÅ°ÁöµéÀÇ ¼³Ä¡¸¦ ¶Ù¾î³Ñ´Â´Ù¸é (ƯÈ÷ ¶óÀ̺귯¸®µé) ´Ù¸¥ ÆÐÅ°ÁöµéÀÇ ÀÇÁ¸¼ºÀ» ÇØÄ¥ ¼ö ÀÖ´Ù´Â °ÍÀ» ¸í½ÉÇØ¾ß ÇÑ´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê