Title: ???????????? ????
1????????????????????
2??
- OS(Kernel)?????? RedHat????
- /etc/inittab
- /etc/rc.d/ ???????
- ????????????
- network
- portmap
- syslog
3Linux??????
4Linux??????
5???????
- ???????????????????????????.
- ???,Kernel??????????????????????.
6???????
??
- ??????????
- ?????
- ??????
- ??????
7????????????
- ?????????????.
- ??????????.
- ????,????????
- ?????????????????????????.
8init?????????
- Linux(Unix)?????????init??,???????????????????????
???????. - ???????????? ????(daemon) ?Linux????.
- ?????????????????,???????????????????.
- ? ?????????????
9???????
??(os2??)
- ?????????????????,??????????????????????.
- Linux?????2??????????????.
- ????0 Swapper, ????????????,????????????????.
- ????1 Init ??????????????????
10??????????
??(os2??)
- ????0
- main.c ? 1355???????
- sched.c ? 97??????1?????????.
- ????1
- main.c ?1441?????????.
- ???,1601??
- 1474??do_basic_setup ????,kflushd, kupdate,
kpiod, kswapd?,????????????????????,1536?????.
UID PID PPID C STIME TTY TIME
CMD root 1 0 0 Aug27 ?
000005 init root 2 1 0 Aug27 ?
000000 kflushd root 3 1 0
Aug27 ? 000001 kupdate root 4
1 0 Aug27 ? 000000 kpiod root
5 1 0 Aug27 ? 000004 kswapd
11/etc/inittab
- ???? init ???????????????????????.
inittab This file describes how the INIT
process should set up the system
in a certain run-level. ?? id3initdefault
System initialization. sisysinit/etc/rc.d/rc.sy
sinit l00wait/etc/rc.d/rc 0 ???
12runlevel
- OS??????????,init??????????6???????????.
- ??????? inittab???????.
Default runlevel. The runlevels used by RHS
are 0 - halt (Do NOT set initdefault to
this) 1 - Single user mode 2 - Multiuser,
without NFS (The same as 3, if you do not have
networking) 3 - Full multiuser mode 4 -
unused 5 - X11 6 - reboot (Do NOT set
initdefault to this) id3initdefault
??????3, ???????5????????.
13runlevel 3
- Full multiuser mode
- OS????????????????????????.
- ???,Window System ?????????.
- Linux?Window???????????.
- ???????????????????(?????)???,??????????????.
- ??????????????.
14runlevel 5
- Full multiuser mode with X11
- level 3???Window System(X11)???????.
- ???PC-Linux????????.
- Windows??????????.
- Window Sys.????????,?????????????????.
15/etc/rc.d/rc?.d/
- ?runlebel????????????????.
- ???????shell script???????????
- ?????????????
- S????
- ? S60lpd
- K????
- ? K51sshd
- ????UNIX????SVR4(Solaris)?????????????????.BSD
Unix????????.
16S/K?????????
- ?????runlevel????????????.
- level?5??,/etc/rc.d/rc5.d/ ??
- OS????,S?????????????????????.
- OS?????,K????????????????????.
- ?????,/etc/rc ??????????.
- SStart, KKill ??
17???????????
- shell script ???.
- ???????
- ?????,start ? stop ????????????????????????.
- S ???? start ??,K????stop???????.
18? (httpd)
Source function library. . /etc/rc.d/init.d/func
tions See how we were called. case "1" in
start) echo -n "Starting httpd "
daemon httpd touch /var/lock/subsys/httpd
stop) echo -n "Shutting down
http " killproc httpd rm -f
/var/lock/subsys/httpd rm -f
/var/run/httpd.pid ?? )
echo "Usage 0 startstoprestartreloadstatus
" exit 1 esac exit 0
19??????????????
20network
- ?????????????(ethernet?)?????????.
- ????????????????????????.
- ?????????,
- ????,???????(gateway)??????.
- ???????????????????????? (??,IP????,????)
- ifconfig???????????????????????????????.
- ????????????????,TCP/IP????????.
21portmap
- ???????????????(RPC)?????????.
- RPC?????????????????????,???????????.
- ???????????????????????????.
- www?80?,??????25??
- portmap?,??RPC??????????(map??)???,???????????????
?????.
22inet
- ??????????????,??????????????????????????.
- ???????????????,
- ?????????????????,
- ?????????????????,
- ????????????????????????.
- /etc/inetd.conf ??????.
- ????????????,????????.
23POP??
SMTP????(sendmail)????,??,????? ?????,inetd
??????????????.
24POP????????????
25??????????
UID PID PPID C STIME TTY TIME
CMD root 538 1 0 Aug27 ?
000000 inetd root 983 538 0 2322 ?
000000 in.rlogind root 984 983 0
2322 pts/1 000000 login -- kaiya
kaiya 985 984 0 2322 pts/1
000000 -bash kaiya 1012 985 3 2323
pts/1 000000 emacs Foo.java
????????????????
1??1????
????????
????????
????,??????????? ??????.???????????????.
inetd
in.rlogind
login
bash
emacs
26syslog
- ????????????????(??)???????????.
- ?????????????????????????????.
- syslog????????,??,/var/log/ ???????????????.
27lpd
- ??????????????.
- ??????????????????????????,?????????????,?????????
?????. - ?????????????????????????????.
28xntpd
- ?????????????????????.
- ?????????????????????????,??,?????.
- ??????,dns.cs. ??????(GPS????)????????????????????
?.
29cron
- ????????????????????.
- ???????????.
- UNIX???????.
- Win?????????????.
- ???? man cron ???
30????????????
- ??????4???????,
- ????4?
- ????6?
- ??7???6??
- ??9?
- ?????????.
???????, ?????????.
31??????????
- ?????????????????.
- ?,?????????????????.
32sshd
- ????????????????????????????.
- ??rshd?rlogind????.
33httpd
- ???????????.
- ??????????????,????????????????,??????????????????
??????. - httpd???????????,CGI??,??httpd?????????(perl??)???
????.
34httpd??????????
- ???????????? ???????????
- ??????????????,????????????????.
GET!
??? ??????
???? ???
???? (??httpd???)
?????? ?????
35?????? (UML??)
??????
????(UNIX?)
Web ????
httpd
???????
CGI ?????
36CGI?????????
????
httpd
URL??
CGI?????
??????
??????
??????
????(stdout)
??????
?????
???????
37FreeWnn, canna
- ????????????????.
- ????UNIX?OS??,????????????????????,???????????????
??????. - ????.?,??????????????,??????????????????????????
- Wnn, Canna?????????????????????????.
38sendmail, postfix
- MTA (Mail Transfer Agent) ????????????????????????
????. - ????Linux???,???MTA????,????(mail.cs?)?MTA????????
??????. - ??????.
39??
- MUA ?????????????
- OE???????????????????
- MTA ????????????????
- ??????????????????
- sendmail, qmail ??.
???????
mail.cs.shinshu-u.ac.jp
??? ???
MUA
MTA
MTA
MUA
mail.jaist.ac.jp
???????
40smb
- samba????????????????.
- Linux?Disk?Printer?Windows??????????????????????.
41Windows?????
- Linux??,???????????????.
- ?,??,??????????????????????.