2005ǯ12

ƥ:

CentOSdzΥǤ褦ˤޤˤ礷ƥδǤޤ̵LAN롼ͤ˥¸̤ξʤΤ⳰¸褦ˤǤ礦

¾Υޥ󤫤Υˤ1սѹޤ

# vi /etc/sysconfig/syslog

SYSLOGD_OPTIONS="-m 0 -r"-r
ä

ȿǤ뤿syslogɤޤ

# service syslog reload

LinuxФǤвΤ褦@Ȥä¸ΥФǤޤ

# vi /etc/syslog.conf
authpriv.*                               /var/log/secure
authpriv.*                               @cent_os_server

̵LAN롼ΥꤷޤȤȥ롼ΥϤƤޤ͡

# tail /var/log/messages
Dec 30 11:45:46 router udhcpc: Sending renew...
Dec 30 11:45:46 router udhcpc: got ACK
Dec 30 11:45:46 router udhcpc: Lease of 2.11.18.14 obtained, lease time 3600
Dec 30 11:50:01 cent_os_server crond(pam_unix)[27982]: session opened for user root by (uid=0)

ƥ:

squidƥץФȤޤ󥹥ȡϴñǤ

# yum -y install squid

IP(192.168.0.0/24)ѤǽˤݡȤ8080ȥ顼åܸȤ¤Ǥ

# vi /etc/squid/squid.conf

acl CONNECT method CONNECT
acl tempest_local src 192.168.0.0/255.255.255.0 ɲ

http_access allow tempest_local ɲ
http_access deny all β˽񤯤̵ˤʤ

http_port 8080 ɲ
error_directory /usr/share/squid/errors/Japanese ɲ

ưޤ

# service squid start

֥饦˥ץԤѤơsquidΥɽʤǤ礦

# tail /var/log/squid/access.log

˥򸫤䤹뤿WebalizerDzϤޤApacheѤե򥳥ԡƻȤޤ

# cp /etc/webalizer.conf /etc/webalizer_squid.conf

ϤȤꤢ3ꤹФϤ

# vi /etc/webalizer_squid.conf

LogFile        /var/log/squid/access.log
LogType        squid
OutputDir      /var/www/usage/squid

ѤΥǥ쥯ȥޤ

# mkdir /var/www/usage/squid
# chown webalizer /var/www/usage/squid
# chcon system_u:object_r:httpd_sys_content_t /var/www/usage/squid

եꤷWebalizer¹Ԥޤ

# webalizer -c /etc/webalizer_squid.conf

ƥ֥饦http:///usage/squid/򳫤ƤߤȡApacheη̤ΤޤޤʤǤɡġեǧƤְäƤʤ

ʤ

webalizer_squid.conf򸫤Ƥߤ2굤ˤʤȤ

HistoryName     /var/lib/webalizer/webalizer.hist
IncrementalName /var/lib/webalizer/webalizer.current

˲ΥǡĤäƤߤʤΤǡΤ褦˽񤭴ޤ

HistoryName     /var/lib/webalizer/webalizer_squid.hist
IncrementalName /var/lib/webalizer/webalizer_squid.current

ƺWebalizer¹Ԥȡá̵ǤޤȤ/etc/cron.dailyˤ륷륹ץȤ򥳥ԡѤФǤ礦

# cp /etc/cron.daily/00webalizer /etc/cron.daily/00webalizer_squid
# vi /etc/cron.daily/00webalizer_squid

if [ -s /var/log/squid/access.log ] ; then
    /usr/bin/webalizer -c /etc/webalizer_squid.conf
fi

ƥ:

⤦ɤ

ɥ館ǽáؤΤ󡢽Ͻä

ƥ:

GoogleΥѡʥ饤 ۡǤΥƥĤϤɤäɲäΤȻפäƤäѤꤢޤޤȤڡ

Google Modules

Google˥󤷤ơURLŽդʤΤǤʤݤǤϤʤǤ礦ꤷ褦ȤȤGoogleΥ⥸塼ǤϤޤ󡢤ɽƤäȾǤޤ

ϤȤꤢiTunes Top 10ƤߤޤYahoo MailʤƤΤ⤢ޤ

ƥ:

ϻŻäƤ饸ءȥȥ졼˥󥰤򽪤˥󥰥ޥءλ21ľä

ޥˤϥƥӤꡢϥإåɥեʹȤǤ롣ä˴ѤȤʤäȤ⤢ꡢȤꤢեƥΥޥݤ

ФƤ̿Ūʥߥ򤷤Ȥ˵Ĥ21Ϥޤɥޤͽή줿ΥɥޤȤϡ1åȥס

ΥɥޡξҲDzİλҤβİۤäΤäƤΤǺޤ򤱤ƤΤäѤ㤤Ƥޤ˷ޤäƤ롣ƤꡢοͤΥ֥ˤ󤳤Υɥޤǹ㤹Ƚ񤤤Ƥä

ƤΥɥޤϤޤäƤޤǽ

˥󥰥ޥǤʤ顢ɥޤ򸫤Ƶ㤯30ˡɤͤƤ⳨ˤʤʤ

ɤ롢ޥѤ뤫ݡġȤȤDz̤ͥȤѤ뤳Ȥн褷Ф餯ƥɥޤϻϤޤä˲ʤȤ鸫ƤᤷϤʤʤä̵˥ȥ졼˥󥰤λ롣

äϥ㥰ǴήƤθϵٷƼΥեäߤʤ鿷ʹɤΤ֤Ǥ롣¤ϤˤƥӤΤޤϺãΥɥޤѤƤ櫓ϤʤȻפäƤ

ٷƼ˹ԤȡήƤΤϤ1åȥޡסƤդ꤬롣ï⤤ʤХͥѤ뤬̵

ҤȤϥƥӤ򤸤äȴѤƤơ⤦ҤȤϿʹɤߤʤȴѤƤ롣ҤäȤƤΤդϲȤǤϤäѤʤ顢ˤΤġ

ɤ롩٤ߤʹɤߤ

ƻ϶ˤɥޤ̵뤷ƿʹɤ⤦ȤΤǤ롣ϲԡήƤ롣ǤƤΤմݤҤ͸μɤ륷󤬻ϤޤȤǤä

֤͡ġפȤ椬ɤ߾夲롣̵뤷ʤ30äۤɤѤ줺ʹ֤ٷƼФʤåΥ٥äࡣɤä٤ळȤϽʤä1ũޤήˤ

ʤʤϴǤäѤ͡

ƥ:

ߥޥեȤϤƤ餷ΤWindows LiveޤϤޤäФBETAȤʤäƤޤѤäȸǤGoogleѡʥ饤 ۡƱǡߤΥӥͳ¤٤줿ꤷޤήԤAJAXǤ͡

ǡ򤤤ΤGadget(ġ)Microsoft Gadget饤󥹥ȡǤޤϳȯԤͳ˺뤳ȤνΤǡ֥饦ǻפ䥲बꥢ륿ưΤ桹̣ΤǤ

ޤȤ䤹Ȥϸʤ֤ǤᤤܸǤΥӥϤޤ褦ʤΤǡ˴Ԥޤ礦

ƥ:

ƥȱѤƤCentOSޥäʤ褦ʤΤǽŤNetBSDΥޥǡܤCGIʤɤΥץθڤפä֤äѡ

Ȥꤢ̥ǥڡ­Ǻޤ줺˺ѤȻפ礷ȤǤϤʤ¿ǯۤġ

ƥ:

CD鵯ưȤKNOPPIX(Linux)ͭ̾ǤFreeBSDǤΤäϤʹȤϤäƤ⺣ޤǰ٤ƤޤǤ

򤹤뤳ȤФ餯ȯ̾FreeSBIEեꥹӡؤޯ͡ġ

ȤFreeBSD 5.3CD餵ä굯ưޤDocumentation˥꡼󥷥åȤޤǥܡɤǤ񤷤ʤǤ

θˤenvironment֤Ȥ͡CUIGUIѤǿʤߤޤ

Ȥꤢ1ƤƤХ󥹥ȡƥȤʤɤλǤ礦

ƥ:

ޤȤꤢApacheϤäư񤯤ȤʤȻפĤġȤꤢDocumentRoot桼Υۡǥ쥯ȥhtdocsѹƤ

Ȥꤢindex.htmläƳȤȡ顼(Forbidden)

# tail /var/log/httpd/error_log
[Tue Dec 13 15:45:50 2005] [error] [client 192.168.0.194] (13)Permission denied: access to /index.html denied

졢ߥȤǤϤʤϤǥ쥯ȥΥѡߥå󤫤ȻפƤߤʤǤդȻפФSELinux

# ls -ldZ /var/www/html /home/john/htdocs
drwxr-xr-x  john     beatles  user_u:object_r:user_home_t      /home/john/htdocs
drwxr-xr-x  root     root     system_u:object_r:httpd_sys_content_t /var/www/html

2ĤΥǥ쥯ȥϳΤ˥ƥƥȤۤʤäƤޤ͡ˤSELinuxǤϤͤ줿ΤǤ

chconޥɤǽޤ

# chcon root:object_r:httpd_sys_content_t  htdocs
# chcon root:object_r:httpd_sys_content_t  htdocs/index.html

̵htmlե뤬褦ˤʤޤƤͤˤѤʺȤ͡ʤߤcgi-binǥ쥯ȥϤޤ̤λǤ

# ls -ldZ /var/www/cgi-bin
drwxr-xr-x  root     root     system_u:object_r:httpd_sys_script_exec_t /var/www/cgi-bin

饤ɥ硼

ƥ:

Wedding

뺧˹ԤޤƤäȼ̿μȤȤǡ̿ɤǤ

դôǤΤ⤵ˤä뤤Τǡڤ˥ǥȤޤġޤθ¤겿⻣ޤ餤Ǥ礦

äƤPCǸȤʤ˳ڤ̿Ǥ

ơμ̿ɤΤCD˾ƤۤФΤǤ¿οͤˤȤäƤJPGե򳫤ȤȤϷ빽ݤʤȤʤǤ͡ȤȤǡ饤ɥ硼Ƥߤ뤳Ȥˤޤ

ΤޥեPhoto Sotry̵ǤڤդΤޤʤߤWindows XPȤäƤʤȥɤǤʤ褦Ǥ

饤ɥ硼κϤۤ񤷤ʤǤѤ̿¤ؤơѤڤmp3ե뤫֡Ƥߤʬޤμ̿ⲻڤĤȲɥޥåˡġϥꥫͤശǽ夬äƤޤ

ƥȽλ塢ä̿ѤƤߤȤäĹʤäƤޤ̵̤ĹΤǿͤŵŪѥȤȤʬǤ褯ʬޤȤȤǽʣ褦ʼ̿ȼ͸ʳμ̿ϤäǤäꡣ

Ǹ˥եWMVǽ񤭽ФƽλCD-R˾ƤäƤߤޤ͡ǤʤääȤ᡼뤬褽Ǥɡ

ȲڤǤХ顼ɤȤȤȤߤꤷ᤮ΤǤᤷޤƤʬʤγڥݥåפ̵Ǥ礦

̿20Ȥäϥ饤ɥ硼򤼤һƤߤޤ礦Ʊ̿ޤä̤˸ޤ衪

ΥڡΥȥåץ

Ф