¾Æ·¡¸¦ ½ÇÇàÇÏ¿© SendmailÀÌ ÇÊ¿ä·Î ÇÏ´Â groupµéÀ» ¸¸µç´Ù:
groupadd -g 1 bin groupadd -g 2 kmem groupadd -g 3 mail useradd -u 1 -g bin -d /bin -s /bin/sh bin
SendmailÀº ¹ÛÀ¸·Î ³ª°¡´Â ¸ÞÀÏÀ» /var/spool/mqueue µð·ºÅ丮¿¡ ³Ö¾îµÐ´Ù. µé¾î¿À´Â ¸ÞÀÏÀº Sendmail¿¡ ÀÇÇØ Procmail·Î µ¹·ÁÁö¹Ç·Î ¿ì¸®´Â /var/mail À̶ó´Â µð·ºÅ丮µµ ÇÊ¿äÇÏ´Ù. ÀÌ µð·ºÅ丮µéÀ» »ý¼ºÇÏ°í ¾Ë¸ÂÀº ±ÇÇÑÀ» ¼³Á¤ÇÑ´Ù:
mkdir /var/spool mkdir /var/mail cd /var/spool; ln -s ../mail mail chmod 700 /var/spool/mqueue chmod 775 /var/mail chgrp mail /var/mail chmod 1777 /tmp
cd src ./Build; ./Build install
SendmailÀ» ¼³Á¤ÇÏ´Â °ÍÀº ¾ÕÀÇ °Íµéó·³ ½±Áö´Â ¾Ê´Ù. SendmailÀ» ¼³Á¤ÇÏ´Â µ¿¾È ¿©·¯ºÐÀÌ °í·ÁÇØ¾ß ÇÒ »çÇ×ÀÌ ¸¹À¸¸ç ³»°¡ ±× ¸ðµç °ÍÀ» ¼³¸íÇÒ ¼ö´Â ¾ø´Ù. ÀÌ°ÍÀÌ ¿ì¸®°¡ Áö±ÝÀº ±âº»ÀûÀÌ°í Ç¥ÁØÀûÀÎ ¼³Á¤À» ÇÏ´Â ÀÌÀ¯ÀÌ´Ù. SendmailÀ» ¿©·¯ºÐÀÇ ±âÈ£¿¡ ¸Âµµ·Ï °íÄ¡°í ½Í´Ù¸é ÇÒ ¼ö ÀÖÁö¸¸ ÀÌ ¹®¼´Â ±× ÀÛ¾÷¿¡ ÀûÇÕÇÏÁö´Â ¾Ê´Ù. ¿©·¯ºÐÀÌ Æ¯Á¤ÇÑ ±â´ÉÀ» »ç¿ëÇÏ·Á ÇÑ´Ù¸é ÀÌ¹Ì Á¸ÀçÇÏ´Â /etc/sendmail.cf (ȤÀº /etc/mail/sendmail.cf) ÆÄÀÏÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù.
cf/lfs.mc
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
OSTYPE(LFS) FEATURE(nouucp) define(`LOCAL_MAILER_PATH', /usr/bin/procmail) MAILER(local) MAILER(smtp)
touch ostype/LFS.m4
¸¦ ½ÇÇàÇÏ¿© ºó ostype/LFS.m4
ÆÄÀÏÀ» ¸¸µç´Ù. m4 m4/cf.m4 cf/lfs.mc > cf/lfs.cf
¸¦ ½ÇÇàÇÏ¿© lfs.mc
ÆÄÀÏÀ» ÄÄÆÄÀÏÇÑ´Ù./etc/sendmail.cf
·Î º¹»çÇÑ´Ù.touch /etc/aliases
¸¦ ½ÇÇàÇÏ¿© ºó /etc/aliases ÆÄÀÏÀ» ¸¸µç´Ù.sendmail -v -bi
¸¦ ½ÇÇàÇÏ¿© ÀÌ (ºó) alias µ¥ÀÌŸº£À̽º¸¦
ÃʱâÈÇÑ´Ù.
make; make install; make install-suid
/etc/init.d/sendmail
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
#!/bin/sh # Begin /etc/init.d/sendmail check_status() { if [ $? = 0 ] then echo "OK" else echo "FAILED" fi } case "$1" in start) echo -n "Starting Sendmail..." start-stop-daemon -S -q -o -x /usr/sbin/sendmail -- -bd check_status ;; stop) echo -n "Stopping Sendmail..." start-stop-daemon -K -q -o -p /var/run/sendmail.pid check_status ;; reload) echo -n "Reloading Sendmail configuration file..." start-stop-daemon -K -q -s 1 -p /var/run/sendmail.pid check_status ;; restart) echo -n "Stopping Sendmail..." start-stop-daemon -K -q -o -p /var/run/sendmail.pid check_status sleep 1 echo -n "Starting Sendmail..." start-stop-daemon -S -q -o -x /usr/sbin/sendmail -- -bd check_status ;; *) echo "Usage: $0 {start|stop|reload|restart}" exit 1 ;; esac # End /etc/init.d/sendmail
chmod 755 /etc/init.d/sendmail
À» ½ÇÇàÇÏ¿© ¾Ë¸ÂÀº ±ÇÇÑÀ»
¼³Á¤ÇÑ´Ù.
cd /etc/init.d/rc2.d; ln -s ../init.d/sendmail S20sendmail cd ../rc0.d; ln -s ../init.d/sendmail K20sendmail cd ../rc6.d; ln -s ../init.d/sendmail K20sendmail
groupadd -g 65534 nogroup groupadd -g 4 ftp
useradd -u 65534 -g nogroup -d /home nobody useradd -u 4 -g ftp -s /bin/sh -m ftp
./configure make; make install
/etc/init.d/proftpd
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
#!/bin/sh # Begin /etc/init.d/proftpd check_status() { if [ $? = 0 ] then echo "OK" else echo "FAILED" fi } case "$1" in start) echo -n "Starting Pro FTP daemon..." start-stop-daemon -S -q -o -x /usr/sbin/proftpd check_status ;; stop) echo -n "Stopping Pro FTP daemon..." start-stop-daemon -K -q -o -x /usr/sbin/proftpd check_status ;; restart) echo -n "Stopping Pro FTP daemon..." start-stop-daemon -K -q -o -x /usr/sbin/proftpd check_status sleep 1 echo -n "Starting Pro FTP daemon..." start-stop-daemon -S -q -o -x /usr/sbin/proftpd check_status ;; *) echo "Usage: $0 {start|stop|restart}" ;; esac # End /etc/init.d/proftpd
chmod 755 /etc/init.d/proftpd
¸¦ ½ÇÇàÇÏ¿© ¾Ë¸ÂÀº ±ÇÇÑÀ»
¼³Á¤ÇÑ´Ù.
cd /etc/rc2.d; ln -s ../init.d/proftpd S40proftpd cd ../rc0.d; ln -s ../init.d/proftpd K40proftpd cd ../rc6.d; ln -s ../init.d/proftpd K40proftpd
./configure make; make install
¼³Á¤ÇÒ °ÍÀÌ ¸¹Áö´Â ¾Ê´Ù. ¿ì¸®°¡ ÇØ¾ß ÇÒ °ÍÀº ´ÜÁö /usr/apache/man °æ·Î¸¦ /usr/share/misc/man.conf¿¡ Ãß°¡ÇÏ´Â °Í »ÓÀÌ´Ù.
/etc/init.d/apache
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
#!/bin/sh # Begin /etc/init.d/apache case "$1" in start) echo -n "Starting Apache HTTP daemon..." /usr/apache/bin/apachectl start ;; stop) echo -n "Stopping Apache HTTP daemon..." /usr/apache/bin/apachectl stop ;; restart) echo -n "Restarting Apache HTTP daemon..." /usr/apache/bin/apachectl restart ;; force-restart) echo -n "Stopping Apache HTTP daemon..." /usr/apache/bin/apachectl stop sleep 1 echo -n "Starting Apache HTTP daemon..." /usr/apache/bin/apachectl start ;; *) echo "Usage: $0 {start|stop|restart|force-restart}" ;; esac # End /etc/init.d/apache
chmod 755 /etc/init.d/apache
¸¦ ½ÇÇàÇÏ¿© ¾Ë¸ÂÀº ±ÇÇÑÀ»
¼³Á¤ÇÑ´Ù.
cd /etc/rc2.d; ln -s ../init.d/apache S50apache cd ../rc0.d; ln -s ../init.d/apache K50apache cd ../rc6.d; ln -s ../init.d/apache K50apache
./configure make; make install
/etc/inetd.conf
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
# Begin /etc/inetd.conf telnet stream tcp nowait root /usr/sbin/in.telnetd # End /etc/inetd.conf
/etc/init.d/inetd
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
#!/bin/sh # Begin /etc/init.d/inetd check_status() { if [ $? = 0 ] then echo "OK" else echo "FAILED" fi } case "$1" in start) echo -n "Starting Internet Server daemon..." start-stop-daemon -S -q -o -x /usr/sbin/inetd check_status ;; stop) echo -n "Stopping Internet Server daemon..." start-stop-daemon -K -q -o -p /var/run/inetd.pid check_status ;; reload) echo -n "Reloading Internet Server configuration file..." start-stop-daemon -K -q -s 1 -p /var/run/inetd.pid check_status ;; restart) echo -n "Stopping Internet Server daemon..." start-stop-daemon -K -q -o -p /var/run/inetd.pid check_status sleep 1 echo -n "Starting Internet Server daemon..." start-stop-daemon -S -q -o -x /usr/sbin/inetd check_status ;; *) echo "Usage: $0 {start|stop|reload|restart}" ;; esac # End /etc/init.d/inetd
chmod 755 /etc/init.d/inetd
¸¦ ½ÇÇàÇÏ¿© ¾Ë¸ÂÀº ±ÇÇÑÀ»
¼³Á¤ÇÑ´Ù.
cd /etc/rc2.d; ln -s ../init.d/inetd S30inetd cd ../rc0.d; ln -s ../init.d/inetd K30inetd cd ../rc6.d; ln -s ../init.d/inetd K30 inetd
¿©·¯ºÐÀÌ ÀÎÅͳݿ¡ ¿¬°áµÇ±â Àü¿¡ Ä¿³ÎÀÌ ppp¸¦ Áö¿øÇØ¾ß ÇÑ´Ù. ÀÌ´Â Ä¿³Î ¾È¿¡ ppp Áö¿øÀ» Á÷Á¢ ³Ö¾î¼ ÄÄÆÄÀÏÇϰųª ppp µå¶óÀ̹ö¸¦ ÇÊ¿äÇÒ ¶§ ·ÎµåÇÒ ¼ö ÀÖ´Â ¸ðµâ·Î ¸¸µêÀ¸·Î½á °¡´ÉÇÏ´Ù. ¾î¶² ¹æ¹ýÀº ¼±ÅÃÇϵç ÇÊ¿äÇÏ´Ù¸é Áö±Ý Ä¿³ÎÀ» Àç ÄÄÆÄÀÏÇÏ¿© ÀÛ¾÷À» Ç϶ó. ÀÌ¹Ì ¿©·¯ºÐÀÇ LFS Ä¿³ÎÀÌ ppp¸¦ Áö¿øÇÑ´Ù¸é Ä¿³ÎÀ» Àç ¼³Á¤ÇÒ ÇÊ¿æ ¾ø´Ù.
groupadd -g7 daemon
À» ½ÇÇàÇÏ¿© damon groupÀ» ¸¸µç´Ù.
./configure make; make install
/etc/resolv.conf
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
# Begin /etc/resolv.conf nameserver <IP address of your ISP's primary DNS server> nameserver <IP address of your ISP's secundary DNS server> # End /etc/resolv.conf
/etc/ppp/peers
µð·ºÅ丮¸¦ ¸¸µç´Ù./etc/ppp/peers/provider
ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù:
# Begin /etc/ppp/peers/provider noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/provider" /dev/ttyS1 115200 defaultroute noipdefault # End /etc/ppp/peers/provider
/etc/chatscripts
µð·ºÅ丮¸¦ ¸¸µç´Ù./etc/chatscripts/provider
ÆÄÀÏÀ» »õ·Î
¸¸µç´Ù:
# Begin /etc/chatscripts/provider ABORT BUSY ABORT "NO CARRIER" ABORT VOICE ABORT "NO DIALTONE" ABORT "NO ANSWER" "" ATZ OK ATDT <ISP's phonenumber> TIMEOUT 35 CONNECT '' TIMEOUT 10 ogin: \q<username> TIMEOUT 10 assword: \q<mysecretpassword> # End /etc/chatscripts/provider
¿¹Á¦ ½ºÅ©¸³Æ®µé¿¡¼ º¸µíÀÌ (À̰͵éÀº ³»°¡ X¸¦ ¾²Áö ¾ÊÀ» ¶§ ½ÇÁ¦·Î »ç¿ëÇÏ´Â ½ºÅ©¸³Æ®µéÀÌ´Ù) À§¿¡¼ ³ª´Â ³» ISP·Î papÀ̳ª chapÀ» ÅëÇÑ ÀÎÁõ ´ë½Å chatscripts¸¦ ÀÌ¿ëÇÏ¿© Á¢¼ÓÇÏ¿´´Ù. ³» ISP°¡ pap¸¦ Áö¿øÇϱä ÇÏÁö¸¸ ³ª´Â ÀÌ Àå/´ÜÁ¡À» ¸ðµÎ °¡Áø ¾à°£ ´Ù¸¥ ¹æ½ÄÀ¸·Î Çϱâ·Î °áÁ¤ÇÏ¿´´Ù. ³» °æ¿ì¿¡ ÀåÁ¡ÀÌ ´ÜÁ¡º¸´Ù ¸¹´Ù. ÀÌ ¹æ½ÄÀ¸·Î ³ª´Â ³» Á¢¼Ó °úÁ¤¿¡ ´ëÇÑ ´õ ¸¹Àº Á¦¾î±ÇÀ» °¡Áú ¼ö ÀÖ°í ¾ðÁ¦ ¾î¶² ÀÏÀÌ ÀϾ´ÂÁö¸¦ ´õ ÀÚ¼¼È÷ ¾Ë ¼ö ÀÖ¾ú´Ù.
¿¹¸¦ µé¾î ³»°¡ Á¢¼ÓÇÒ ¶§ ´ëºÎºÐ ³ª´Â tail -f /var/log/syslog
¸¦ ½ÇÇàÇÏ´Â À©µµ¿ì¸¦ ¿¾î ³õ¾Æ¼ »ç¿ëÀÚ ¸íÀ̳ª ¾ÏÈ£°¡ º¸³»Áö´Â ½Ã±â
°°Àº °ÍµéÀ» Á÷Á¢ °üÂûÇÒ ¼ö ÀÖ´Ù.