Top Page: ¥á¥¤¥ó
Previous Archive: Other
Next Archive: Travel

¥Ö¥í¥°°Üž¤Î¤ªÃΤ餻

¤·¤ó¤Á¤ã¤ó¤Îº£Æü¤Ï¤¦¡¼¤¿¤ó¤Î¾®Éô²°¤È̾¤òÊѤ¨¥ê¥Ë¥å¡¼¥¢¥ë¤¹¤ë¤³¤È¤Ë¤·¤Þ¤·¤¿¡£
¿·¤·¤¤¥µ¥¤¥È¤ÎURL¤Ïhttp://kaju.jp/¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¤è¤í¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£

RSS¤Ç¹¹¿·¾ðÊó¤ò¼èÆÀ¤·¤Æ¤¤¤ëÊý¤ÏRSS¤ÎÊѹ¹¤â¤ª´ê¤¤¤·¤Þ¤¹¡£
¿·¤·¤¤RSS¤Ïhttp://kaju.jp/feed¤Ë¤Ê¤ê¤Þ¤¹¡£

NTP 4.2.4p3

NTP 4.2.4p3¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎNTP¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.4p3.tar.gz
$ tar xvzf ntp-4.2.4p3.tar.gz
$ cd ntp-4.2.4p3
$ ./configure
$ make
# make install

# /sbin/service ntpd restart
ntpd ¤òÄä»ßÃæ:                                             [  OK  ]
ntpd: »þ´Ö¥µ¡¼¥Ð¤ÈƱ´üÃæ:                                  [  OK  ]
ntpd ¤òµ¯Æ°Ãæ:                                             [  OK  ]

fmlÉÔ¶ñ¹ç

fml¤Ë¤è¤ë¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤¬¤¦¤Þ¤¯ÇÛÁ÷¤Ç¤­¤Ê¤¤»ö¾Ý¤¬È¯À¸¤·¤¿¡£
fml¤äPostfix¡¢SpamAssassin¤Î¥í¥°¤ò¸«¤ë¸Â¤ê¤ÏError¤äWarning¤Ï½Ð¤Æ¤¤¤Ê¤¤¤¬¡¢Àµ¾ï¤ËÇÛÁ÷¤·¤Æ¤¤¤¿¤È¤­¤ÈÈæ¤Ù¤ë¤È½Ð¤ë¤Ù¤­¥í¥°¤¬½Ð¤Æ¤¤¤Ê¤¤¡£
SpamAssassin¤¬¥á¡¼¥ë¤ò¼õ¤±¤Æ½èÍý¤ò½ª¤¨¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¡£
¤Ä¤Þ¤ê°Ê²¼¤Î¤è¤¦¤Ê´¶¤¸¡£

¡ûÀµ¾ï»þ
fml¢ªPostfix¢ªSpamAssassin¢ªPostfix¢ª³°ÉôMTA

¡ûº£²ó
fml¢ªPostfix¢ªSpamAssassin

ÌäÂêȯÀ¸Á°¸å¤ÇSpamAssassin¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤ò¹Ô¤Ã¤¿¤Î¤¬¸¶°ø¤Ã¤Ý¤¤¡£
¼è¤êµÞ¤®3.2.1¤«¤é3.1.9¤Ë¥Ð¡¼¥¸¥ç¥ó¥À¥¦¥ó¤·¤Æ¤ß¤¿¤È¤³¤íÉüµì¤·¤¿¡£

°µ½Ì

Web¥«¥á¥é¤Ç¤Î¥­¥ã¥×¥Á¥ã¤ò1ʬ´Ö³Ö¤Ë¤·¤Æ¤¤¤ë¤¿¤á1Æü¤Ç1440Ëç¡¢Ìó20MBÄøÅ٤ˤʤäƤ¤¤ë¡£
¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤Ç1Æüʬ¤Î²èÁü¥Õ¥¡¥¤¥ë¤ò1¤Ä¤Î¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Æ¤¤¤ë¤¬¡¢¤³¤ì¤ò°µ½Ì¤¹¤ë¤³¤È¤Ë¤¹¤ë¡£
º£²ó¤Ï°Ê²¼¤Î2¤Ä¤Î·Á¼°¤ÇÈæ³Ó¡£
¡¡¡¦gzip
¡¡¡¦bzip2

­¡gzip
# time gzip > 070701.tar.gz < 070701.tar
real    0m29.332s
user    0m13.713s
sys     0m0.705s
­¢bzip2
# time bzip2 > 070701.tar.bz2 < 070701.tar
real    1m44.150s
user    0m58.555s
sys     0m1.205s
¤½¤ì¤¾¤ì¤Î¥Õ¥¡¥¤¥ë¥µ¥¤¥º¡£
# ls -al
-rw-r--r--   1 root   root   19988480  7·î  2 11:39 070701.tar
-rw-r--r--   1 root   root   17127839  7·î  2 11:46 070701.tar.bz2
-rw-r--r--   1 root   root   17677857  7·î  2 11:43 070701.tar.gz

gzip¤ÏÌó30ÉäÇ88.44%¤Î°µ½ÌΨ¡¢bzip2¤ÏÌó104ÉäÇ85.69%¤Î°µ½ÌΨ¤È¤¤¤¦·ë²Ì¤Ë¤Ê¤Ã¤¿¡£
¸µ¤¬²èÁü¥Õ¥¡¥¤¥ë¤Ç¤¢¤Þ¤ê°µ½Ì¤ò¤«¤±¤ì¤Ê¤¤¤Î¤ÇÊý¼°¤¬°ã¤Ã¤Æ¤â°µ½ÌΨ¤Ï¤¢¤Þ¤êÊѤï¤é¤Ê¤¤¤³¤È¤¬¤ï¤«¤Ã¤¿¡£
¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤Ç¤Ïgzip¤ò»È¤Ã¤Æ°µ½Ì¤ò¤¹¤ë¤³¤È¤Ë¤¹¤ë¡£

SpamAssassin 3.2.1

SpamAssassin¤ò3.1.x¤«¤é3.2.x¤Ë¥¢¥Ã¥×¥°¥ì¡¼¥É¤¹¤ë¡£
$ wget http://ftp.kddilabs.jp/infosystems/apache/spamassassin/source/Mail-SpamAssassin-3.2.1.tar.bz2
$ tar xvjf Mail-SpamAssassin-3.2.1.tar.bz2
$ cd Mail-SpamAssassin-3.2.1
$ perl Makefile.PL PREFIX=/usr/local/

REQUIRED module out of date: HTML::Parser
optional module missing: Mail::SPF
optional module missing: IP::Country
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: IO::Socket::SSL
optional module missing: Compress::Zlib
optional module missing: Mail::DomainKeys
optional module missing: Mail::DKIM
optional module missing: Archive::Tar
optional module missing: IO::Zlib
optional module missing: Encode::Detect

warning: some functionality may not be available,
please read the above report before continuing!
¤³¤ó¤Ê´¶¤¸¤Ë¤Ê¤Ã¤¿¡£
HTML::Parser¤Î¥Ð¡¼¥¸¥ç¥ó¤¬¸Å¤¤¤é¤·¤¤¡£
HTML::Parser¤ÏRPM¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤ë¤Î¤Ç³Îǧ¤¹¤ë¡£
# rpm -qa |grep perl-HTML-Parser
perl-HTML-Parser-3.35-6
¤¢¤é¤é¡£
SpamAssassin-3.2.1¤ÏHTML::Parser¤Ï3.43°Ê¾å¤ÎɬÍפ¬¤¢¤ë¤Î¤Ç¥À¥á¤À¡£
CPAN¤«¤éºÇ¿·ÈǤÎHTML::Parser¤ò»ý¤Ã¤Æ¤¯¤ë¡£
$ wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTML-Parser-3.56.tar.gz
$ tar xvzf HTML-Parser-3.56.tar.gz
$ cd HTML-Parser-3.56
$ perl Makefile.PL
$ make
# make install
ºÆÅÙSpamAssassin¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
$ perl Makefile.PL PREFIX=/usr/local/
$ make
# make install
spamd¤Î¥×¥í¥»¥¹¤ÎºÆµ¯Æ°¤Ç´°Î»¡£
# /sbin/service spamd restart
spamd ¤òÄä»ßÃæ:                                            [  OK  ]
spamd ¤òµ¯Æ°Ãæ:                                            [  OK  ]

Unison Part1

¥Õ¥¡¥¤¥ëƱ´ü¥½¥Õ¥È¤Ç¤¢¤ëUnison¤òƳÆþ¤¹¤ë¡£
º£²ó¤ÏWindows¤ÈLinux¤Ç¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Æ¤ß¤ë¡£

¤Þ¤º¤ÏLinux¦¤ËUnison¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
$ wget https://svn.cis.upenn.edu/svnroot/unison-contributed-binaries/linux/unison-2.17.1-linux-text.bz2
$ bunzip2 -d unison-2.17.1-linux-text.bz2
# chmod 755 unison-2.17.1-linux-text
# cp unison-2.17.1-linux-text /usr/local/bin/unison
¼¡¤ËWindows¦¤Ë¤âUnison¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
Unison¤ÎWindows¥Ð¥¤¥Ê¥ê¤òD:\unisonÇÛ²¼¤ËÊݸ¤¹¤ë¡£
¤µ¤é¤ËÄÌ¿®¤Î°Å¹æ²½¤òSSH¤ò»È¤Ã¤Æ¹Ô¤¦¤¿¤áplink.exe¤âÆþ¼ê¤·¤Æ¤ª¤¯¡£
SSH¤Ç½é²ó¥¢¥¯¥»¥¹»þ¤Ë¤Ï¥Õ¥£¥ó¥¬¡¼¥×¥ê¥ó¥È¤Î³Îǧ¤¬É¬ÍפʤΤǤ³¤ÎÃʳ¬¤Ç³Îǧ¤·¤Æ¤ª¤¯¡£
D:\unison>plink.exe user@10.33.xx.yy -P 22 -pw password -ssh /usr/local/bin/unison -version
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 aa:11:bb:22:cc:33:dd:44:ee:55:ff:66:gg:77:hh:88
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
unison version 2.17.1

NTP 4.2.4p2

NTP 4.2.4p2¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎNTP¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.4p2.tar.gz
$ tar xvzf ntp-4.2.4p2.tar.gz
$ cd ntp-4.2.4p2
$ ./configure
$ make
# make install

# /sbin/service ntpd restart
ntpd ¤òÄä»ßÃæ:                                             [  OK  ]
ntpd: »þ´Ö¥µ¡¼¥Ð¤ÈƱ´üÃæ:                                  [  OK  ]
ntpd ¤òµ¯Æ°Ãæ:                                             [  OK  ]

Web¥«¥á¥é Part3

¥­¥ã¥×¥Á¥ã¥½¥Õ¥È¤Ç¤¢¤ëxawtv¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
$ wget http://dl.bytesex.org/releases/xawtv/xawtv-3.95.tar.gz
$ ./configure
$ make
# make install
¥¤¥ó¥¹¥È¡¼¥ë»þ¤Ë¤¤¤í¤¤¤í¥¨¥é¡¼¤¬½Ð¤¿¡£
°ì¤ÄÌÜ¡£
$ ./configure
¡Ê¾Êά¡Ë
checking for jpeg_start_compress in -ljpeg... no
Oops:   jpeg library not found.  You need this one, please install.
Note:   to compile stuff just the library packages are not enougth,
        you need also the *-devel packages.
¤³¤ì¤Ïlibjpeg-devel¥Ñ¥Ã¥±¡¼¥¸¤¬¤Ê¤¤¤¿¤á¡£
libjpeg-devel¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³¤È¤ÇÂбþ²Äǽ¡£
# yum install -y libjpeg-devel
Æó¤ÄÌÜ¡£
$ make

  CC      console/dump-mixers.o
  LD      console/dump-mixers
  CC      console/record.o
console/record.c:9:20: curses.h: ¤½¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤ä¥Ç¥£¥ì¥¯¥È¥ê¤Ï¤¢¤ê¤Þ¤»¤ó
console/record.c: In function `tty_raw':
¤³¤ì¤Ïncurses-devel¥Ñ¥Ã¥±¡¼¥¸¤¬¤Ê¤¤¤¿¤á¡£
ncurses-devel¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³¤È¤ÇÂбþ²Äǽ¡£
# yum install -y ncurses-devel
º£²ó»ÈÍѤ¹¤ëwebcam¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¡£
¡¡¡¦¥­¥ã¥×¥Á¥ã²èÁü¤Ï¥í¡¼¥«¥ë¤ËÊݸ
¡¡¡¦ÆüÉÕ̾¤Î²áµî¥Ç¡¼¥¿¤òÊݸ
¡¡¡¦ºÇ¿·¤Î¥Õ¥¡¥¤¥ë̾¤Ïwebcam.jpg
/usr/local/etc/webcamrc
[grab]
device = /dev/video0
text = "%Y-%m-%d %H:%M:%S"
#infofile = filename
fg_red = 255
fg_green = 255
fg_blue = 255
width = 320
height = 240
delay = 3
wait = 0
#input = composite1
norm = pal
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 75
trigger = 0
once = 0
archive = /usr/local/apache2/htdocs/webcam/%y%m%d%H%M.jpg

[ftp]
#host = www
#user = webcam
#pass = xxxxxx
dir  = /usr/local/apache2/htdocs/webcam
file = webcam.jpg
tmp  = uploading.jpg
passive = 1
debug = 0
auto = 0
local = 1
ssh = 0
²èÁü¤ÎÊݸÀè¤òºîÀ®¤·¤Æ¤«¤éwebcam¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¡£
# /usr/local/bin/webcam /usr/local/etc/webcamrc
reading config file: /usr/local/etc/webcamrc
ioctl: VIDIOC_QUERYCAP(driver="";card="";bus_info="";version=0.0.0;capabilities=0x0 []): Unknown error 515
video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr
grabber config:
  size 320x240 [24 bit TrueColor (LE: bgr)]
  input (null), norm pal, jpeg quality 75
  rotate=0, top=0, left=0, bottom=240, right=320
write config [ftp]:
  local transfer /usr/local/apache2/htdocs/webcam/uploading.jpg => /usr/local/apache2/htdocs/webcam/webcam.jpg
²èÁü¤¬¥­¥ã¥×¥Á¥ã¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ¤¹¤ë¡£
# ls -al /usr/local/apache2/htdocs/webcam/
¹ç·× 40
drwxr-xr-x  2 root   root    4096  6·î 18 12:57 .
drwxr-xr-x  7 apache apache  4096  6·î 18 12:08 ..
-rw-r--r--  1 root   root   13409  6·î 18 12:57 0706181257.jpg
-rw-r--r--  1 root   root    7517  6·î 18 12:59 0706181259.jpg
-rw-r--r--  1 root   root   13569  6·î 18 13:00 0706181300.jpg
-rw-r--r--  1 root   root   13569  6·î 18 13:00 webcam.jpg
¥í¥°¤ò¸«¤ë¤È²¿¤ä¤éÂçÎ̤Υ¨¥é¡¼¤¬¡¦¡¦¡¦
# tail /var/log/messages
Jun 18 12:57:45 bruna kernel: quickcam: frame lost
Jun 18 12:57:45 bruna kernel: quickcam: frame lost
Jun 18 12:57:45 bruna kernel: quickcam: frame lost
Jun 18 12:57:45 bruna kernel: quickcam: frame lost
¡Ê°Ê²¼¾Êά¡Ë
¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤òÀ©¸æ¤¹¤ëÊýË¡¤¬¤¢¤Ã¤¿¡£ ¤³¤ì¤Ç¥¨¥é¡¼¤¬½Ð¤Ê¤¯¤Ê¤ë¡£
# /usr/local/bin/qcset debug=0 2&>1 /dev/null

Web¥«¥á¥é Part2

Web¥«¥á¥éÍѤΥɥ饤¥Ð¤Ï°Ê²¼¤Î¥µ¥¤¥È¤«¤éÆþ¼ê¤¹¤ë¤³¤È¤¬²Äǽ¡£
http://qce-ga.sourceforge.net/

¥É¥é¥¤¥Ð¤Î¥³¥ó¥Ñ¥¤¥ë¤Ë¤Ï¥«¡¼¥Í¥ë¥½¡¼¥¹¤¬É¬Íפˤʤë¤Î¤Çkernel-devel¥Ñ¥Ã¥±¡¼¥¸¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
# yum install -y kernel-devel
¥É¥é¥¤¥Ð¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
$ wget http://jaist.dl.sourceforge.net/sourceforge/qce-ga/qc-usb-0.6.5.tar.gz
$ tar xvzf qc-usb-0.6.5.tar.gz
$ cd qc-usb-0.6.5
$ export PATH=$PATH:/sbin
$ make
$ make all
# make install
¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿¥É¥é¥¤¥Ð¤Î¾ðÊó¤ò³Îǧ¤¹¤ë¡£
# /sbin/modinfo /lib/modules/2.6.9-55.EL/misc/quickcam.ko
filename:       /lib/modules/2.6.9-55.EL/misc/quickcam.ko
parm:           qcdebug:Sets the debug output (bitfield)
parm:           keepsettings:Keep picture settings across one open to another (0-1)
parm:           settle:Maximum number of frames to wait picture brightness to settle (0-255)
parm:           subsample:Sets subsampling (0-1)
parm:           compress:Enable compressed mode (0-1)
parm:           frameskip:How frequently capture frames (0-10)
parm:           quality:Sets the picture quality (0-5)
parm:           adaptive:Automatic adaptive brightness control (0-1)
parm:           equalize:Equalize image (0-1)
parm:           userlut:Apply user-specified lookup-table (0-1)
parm:           retryerrors:Retry if image capture fails, otherwise return error code (0-1)
parm:           compatible:Enable workaround for bugs in application programs (bitfield)
parm:           video_nr:Set videodevice number (/dev/videoX)
description:    Logitech QuickCam USB driver
author:         See README
license:        GPL
vermagic:       2.6.9-55.EL 686 REGPARM 4KSTACKS gcc-3.4
depends:        videodev
alias:          usb:v046Dp0840dl*dh*dc*dsc*dp*ic*isc*ip*
alias:          usb:v046Dp0850dl*dh*dc*dsc*dp*ic*isc*ip*
alias:          usb:v046Dp0870dl*dh*dc*dsc*dp*ic*isc*ip*
¥É¥é¥¤¥Ð¤ÎÀßÄê¤ò¹Ô¤¦¡£
/etc/modprobe.conf
alias eth0 e100
alias eth1 8139too
alias usb-controller uhci-hcd

# Turn off IPv6
alias net-pf-10 off
alias ipv6 off

# QC-30
alias camera quickcam
¥É¥é¥¤¥Ð¤òǧ¼±¤µ¤»¤ë¡£
# /sbin/modprobe videodev
# /sbin/modprobe quickcam

# /sbin/lsmod
Module                  Size  Used by
quickcam               74660  0
videodev               10049  1 quickcam
autofs4                28101  0
dm_mirror              30789  0
dm_mod                 65401  1 dm_mirror
uhci_hcd               31705  0
8139too                26177  0
e100                   33861  0
mii                     5313  2 8139too,e100
floppy                 58609  0
ata_piix               15173  0
libata                111645  1 ata_piix
scsi_mod              125517  1 libata
ext3                  117193  7
jbd                    71769  1 ext3
¥í¥°¤Ë¥¨¥é¡¼¤¬½Ð¤Æ¤¤¤Ê¤¤¤«³Îǧ¤¹¤ë¡£
# tail /var/log/messages
Jun 15 10:06:16 bruna kernel: Linux video capture interface: v1.00
Jun 15 10:07:14 bruna kernel: quickcam: QuickCam USB camera found (driver version QuickCam USB 0.6.5 $Date: 2006/10/23 22:06:39 $)
Jun 15 10:07:14 bruna kernel: quickcam: Kernel:2.6.9-55.EL bus:1 class:FF subclass:FF vendor:046D product:0870
Jun 15 10:07:14 bruna kernel: quickcam: Sensor HDCS-1000/1100 detected
Jun 15 10:07:14 bruna kernel: quickcam: Registered device: /dev/video0
Jun 15 10:07:14 bruna kernel: usbcore: registered new driver quickcam

Web¥«¥á¥é Part1

°ÊÁ°¥µ¡¼¥Ðµ¡¤Ë¼è¤êÉÕ¤±¤Æ¤¤¤¿USBÀܳ¤ÎWeb¥«¥á¥é¤ò³°¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤¿¤Î¤ÇºÆÅÙ¹½ÃÛ¤¹¤ë¡£
Web¥«¥á¥é¤Ï¥í¥¸¥¯¡¼¥ë¤Î¡ÖQcam Express¡×¤È¤¤¤¦¤«¤Ê¤ê¸Å¤¤¤â¤Î¤ò»ÈÍѤ¹¤ë¡£
¤Þ¤º¤ÏUSB¤ËÀܳ¤·¥Ç¥Ð¥¤¥¹¾ðÊó¤ò³Îǧ¤¹¤ë¡£
ǧ¼±¤Ï¤·¤Æ¤¤¤ëÍͻҡ£
# tail /var/log/messages
Jun 14 00:52:00 bruna kernel: usb 1-2: new full speed USB device using address 2

# /sbin/lsusb
Unknown line at line 5959
Unknown line at line 5960
Unknown line at line 5961
Unknown line at line 5962
Unknown line at line 5963
Unknown line at line 5964
Unknown line at line 5965
Unknown line at line 5966
Unknown line at line 5967
Unknown line at line 5968
Unknown line at line 5969
Unknown line at line 5970
Bus 001 Device 002: ID 046d:0870 Logitech, Inc. QuickCam Express
Bus 001 Device 001: ID 0000:0000

OpenSSH 4.6p1

KAJUKAJU.net¤Ç¤ÏRPM¤Ç¤ÎOpenSSH¤¬Æ°¤¤¤Æ¤¤¤¿¤Î¤À¤¬¥½¡¼¥¹¤ÎOpenSSH¤ËÊѹ¹¤·¤¿¡£
Êѹ¹¼ê½ç¤Ï°Ê²¼¤ÎÄ̤ꡣ
¡¡£±¡¥¥½¡¼¥¹¤ÇOpenSSH¤ò¥¤¥ó¥¹¥È¡¼¥ë¡õÀßÄê
¡¡£²¡¥µ¯Æ°¥¹¥¯¥ê¥×¥È¤ò¥½¡¼¥¹¤ÎOpenSSH¤¬µ¯Æ°¤¹¤ë¤è¤¦¤ËÊѹ¹
¡¡£³¡¥OpenSSH¤ÎºÆµ¯Æ°
¡¡£´¡¥Àܳ³Îǧ
¡¡£µ¡¥RPM¤ÎOpenSSH¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë

¤Þ¤º¤Ï¥½¡¼¥¹¤ÎOpenSSH¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
¥æ¡¼¥¶¤ÏRPM¤ÎOpenSSH¤ÇºîÀ®¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤ò¤½¤Î¤Þ¤Þ»ÈÍѤ¹¤ë¡£
$ wget ftp://ftp.kddlabs.co.jp/OpenBSD/OpenSSH/portable/openssh-4.6p1.tar.gz
$ tar xvzf openssh-4.6p1.tar.gz
$ cd openssh-4.6p1
$ ./configure --prefix=/usr/local/openssh \
  --with-privsep-user=sshd \
  --with-privsep-path=/var/empty/sshd \
  --without-zlib-version-check
µ¯Æ°¥¹¥¯¥ê¥×¥È¤ÎÊѹ¹¡£¡Ê¢¨Êѹ¹²Õ½ê¤Î¤ß¡Ë
/etc/rc.d/init.d/sshd
# Some functions to make the below more readable
KEYGEN=/usr/local/bin/ssh-keygen
SSHD=/usr/local/sbin/sshd
RSA1_KEY=/usr/local/etc/ssh_host_key
RSA_KEY=/usr/local/etc/ssh_host_rsa_key
DSA_KEY=/usr/local/etc/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
OpenSSH¤ÎºÆµ¯Æ°¡£
# /sbin/service sshd restart
sshd ¤òÄä»ßÃæ:                                             [  OK  ]
sshd ¤òµ¯Æ°Ãæ:                                             [  OK  ]
¥í¡¼¥«¥ë¤ä¥ê¥â¡¼¥È¤«¤éSSH¤ÇÀܳ¤Ç¤­¤ë¤«³Îǧ¤¹¤ë¡£
²Ôư¥Ð¡¼¥¸¥ç¥ó¤Ë¤Ä¤¤¤ÆTelnet¤ÇÀܳ¤·¤Æ³Îǧ¤¹¤ë¡£
$ telnet 10.33.77.xx 22
Trying 10.33.77.xx...
Connected to bruna.kajukaju.net (10.33.77.xx).
Escape character is '^]'.
SSH-2.0-OpenSSH_4.6

Protocol mismatch.
Connection closed by foreign host.
RPM¤ÎOpenSSH¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë»þ¤Ëµ¯Æ°¥¹¥¯¥ê¥×¥È(/etc/rc.d/init.d/sshd)¤È¥Ç¥£¥ì¥¯¥È¥ê(/var/empty/sshd)¤¬ºï½ü¤µ¤ì¤Æ¤·¤Þ¤¦¤Î¤ÇÃí°Õ¤¹¤ë¡£
# yum remove openssh

Postfix 2.4.3

Postfix 2.4.3¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎPostfix¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://mirror.postfix.jp/postfix-release/official/postfix-2.4.3.tar.gz
$ tar xvzf postfix-2.4.3.tar.gz
$ cd postfix-2.4.3
$ make
# make upgrade

# /sbin/service postfix restart
postfix ¤òÄä»ßÃæ:                                          [  OK  ]
postfix ¤òµ¯Æ°Ãæ:                                          [  OK  ]

PHP 5.2.3

PHP 5.2.3¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎPHP¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://jp.php.net/get/php-5.2.3.tar.bz2/from/this/mirror
$ tar xvjf php-5.2.3.tar.bz2
$ cd php-5.2.3
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-zlib --with-gd --enable-mbstring --enable-mbregex --disable-ipv6
$ make
# make install
¥¤¥ó¥¹¥È¡¼¥ë¸å¤ËApache¤òºÆµ¯Æ°¤¹¤ë¡£
# /sbin/service httpd restart
httpd ¤òÄä»ßÃæ:                                            [  OK  ]
httpd ¤òµ¯Æ°Ãæ:                                            [  OK  ]

Apcupsd WindowsÂбþ

KAJUKAJU.net¤Î¥µ¡¼¥Ð¤ÏLinux¤ÇUPS¤È¤Ï¥·¥ê¥¢¥ë¥±¡¼¥Ö¥ë¤ÈÀܳ¤µ¤ì¤Æ¤¤¤ë¤Î¤ÇϢưºÑ¤ß¤Ê¤Î¤Ç¤¹¤¬¡¢Windows¥Þ¥·¥ó¤Ï¼«Æ°¤Ç¥·¥ã¥Ã¥È¥À¥¦¥ó½èÍý¤ò¹Ô¤¨¤Þ¤»¤ó¡£
Apcupsd¤Ë¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤òÄ̤¸¤ÆUPS¾ðÊó¤òÏ¢·È¤·¼«Æ°¤Ç¥·¥ã¥Ã¥È¥À¥¦¥ó¤Þ¤Ç¹Ô¤Ã¤Æ¤¯¤ì¤ëµ¡Ç½¤¬¤¢¤ë¤Î¤Ç¡¢Âбþ¤¹¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£
¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤Ã¤ÆÏ¢·ÈÊýË¡¤¬°ã¤¦¤Î¤ÇLinux¤ÈWindows¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëApcupsd¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¤½¤í¤¨¤Æ¤ª¤­¤Þ¤¹¡£
¤Ê¤ª¡¢º£²ó¤ÏApcupsd 3.14.1¤ò»È¤¤¤Þ¤·¤¿¡£

Linux¦¤ÎÀßÄê
/etc/apcupsd/apcupsd.conf
UPSCABLE smart
UPSTYPE apcsmart
DEVICE /dev/ttyS0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
UPSCLASS standalone
UPSMODE disable
Windows¦¤ÎÀßÄê
C:\apcupsd\etc\apcupsd\apcupsd.conf
UPSCABLE ether
UPSTYPE net
DEVICE 10.33.77.11:3551 
NETSERVER off
UPSCLASS standalone
UPSMODE disable

¤³¤ì¤ÇOK¤Ç¤¹¡£
Windows¦¤ÇApcupsd¥µ¡¼¥Ó¥¹¤òµ¯Æ°¤·¡¢¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼¤ËÅŸ»¥¢¥¤¥³¥ó¤¬½Ð¤ì¤ÐÀ®¸ù¤Ç¤¹¡£

FastCGI¤Ç¥¨¥é¡¼ Part2

Á°²ó¤Þ¤Ç¤ÎÀßÄê¤ÇMovableType¤ò»È¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤¬¡¢¤¿¤Þ¤ËInternal Server Error¤¬½Ð¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤ë¡£
¤³¤Î¤È¤­¤âApache¤Î¥¨¥é¡¼¥í¥°¤Ë¥¨¥é¡¼¤¬½ÐÎϤµ¤ì¤Æ¤¤¤ë¡£
# tail -f error.log
[Wed May 30 16:30:53 2007] [warn] mod_fcgid: read data timeout in 40 seconds
¤É¤¦¤ä¤éFastCGI¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç40Éäǥ¿¥¤¥à¥¢¥¦¥È¤·¤Æ¤·¤Þ¤¦¤è¤¦¤À¡£
¤¦¤Á¤Î¤è¤¦¤Ë¥¹¥Ú¥Ã¥¯¤ÎÄ㤤¥Þ¥·¥ó¤À¤È40ÉäÀ¤È¤Á¤ç¤Ã¤Èû¤¤¤Î¤«¤â¡£
¥¿¥¤¥à¥¢¥¦¥È»þ´Ö¤òŤ¯¤·¤ÆÂн褹¤ë¤³¤È¤Ë¤·¤¿¡£
/usrl/local/apache2/conf/httpd.conf
<IfModule mod_fcgid.c>
SocketPath /tmp/fcgid_sock/
AddHandler fcgid-script .fcgi
IPCCommTimeout 120
</IfModule>

FastCGI¤Ç¥¨¥é¡¼ Part1

MovableTypeÍÑ¤ËÆ³Æþ¤·¤¿FastCGI¤Ç¤¹¤¬mt.fcgi¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤ÈInternal Server Error¤¬½Ð¤Æ¤·¤Þ¤Ã¤Æ¤¦¤Þ¤¯Æ°¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£
Apache¤Î¥¨¥é¡¼¥í¥°¤ò¸«¤ë¤È¸¶°ø¤È»×¤ï¤ì¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤·¤¿¤è¡£
[Wed May 30 16:01:28 2007] [notice] Apache/2.2.4 (Unix) configured -- resuming normal operations
Can't locate FCGI.pm in @INC (@INC contains: /usr/local/MT/mt-bin/extlib lib 
¡Ê¾Êά¡Ë
BEGIN failed--compilation aborted at /usr/local/MT/mt-bin/extlib/CGI/Fast.pm line 22.
Compilation failed in require at lib/MT/Bootstrap.pm line 51.
BEGIN failed--compilation aborted at /usr/local/MT/mt-bin/mt.fcgi line 11.
[Wed May 30 16:02:14 2007] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed May 30 16:02:17 2007] [notice] mod_fcgid: process /usr/local/MT/mt-bin/mt.fcgi(3996) exit(communication error), terminated by calling exit(), return code: 2
¤É¤¦¤ä¤éFCGI.pm¤¬¸«¤Ä¤«¤Ã¤Æ¤¤¤Ê¤¤Íͻҡ£
perl-FCGI¥Ñ¥Ã¥±¡¼¥¸¤¬É¬ÍפΤ褦¤Ç¤¹¡£
Áᮥ¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤·¤¿¡£
# yum install perl-FCGI

º£Å٤ϤÁ¤ã¤ó¤È´ÉÍý²èÌ̤˥¢¥¯¥»¥¹¤Ç¤­¤Þ¤·¤¿¡£

MySQL 5.0.41

MySQL 5.0.41¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎMySQL¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/
$ tar xvzf mysql-5.0.41.tar.gz
$ cd mysql-5.0.41
$ ./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql --with-charset=ujis --with-extra-charsets=all --with-mysqld-user=mysql
$ make
# make install
MySQL¤òºÆµ¯Æ°¡£
# /sbin/service mysql restart
Shutting down MySQL... SUCCESS!
Starting MySQL. SUCCESS!

MovableType¡¡FastCGIÂбþ

KAJUKAJU.net¤Çư¤¤¤Æ¤¤¤ëMovableType¤Ï¥Á¥å¡¼¥Ë¥ó¥°¤ò¤·¤Æ¤¤¤Ê¤¤¤Î¤ÇÉáÃʤαÜÍ÷»þ¤Ïµ¤¤¬¤Ä¤«¤Ê¤¤¤¬¡¢¿·µ¬Åê¹Æ¤ä¥³¥á¥ó¥ÈÅê¹Æ»þ¤Îưºî¤¬ÃÙ¤¤¡£
¥Á¥å¡¼¥Ë¥ó¥°ÊýË¡¤È¤·¤Æ¤Ïcgi¤Î¹â®²½¤¬¤¢¤ë¡£
¡¡¡¦mod_perl2
¡¡¡¦SpeedyCGI
¡¡¡¦FastCGI

MovableType¤Ï3.4°Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó¤ÇFastCGI¤ÎÂбþ¤¬¤µ¤ì¤¿¤é¤·¤¤¡£
º£²ó¤ÏFas£ôCGI²½¤Ë¥Á¥ã¥ì¥ó¥¸¤¹¤ë¡£
FastCGI¤ÏApache¤Î¥â¥¸¥å¡¼¥ë¤È¤·¤ÆÁȤ߹þ¤à¤Î¤Ç¸õÊä¤Ï¡Ömod_fastcgi¡×¤È¡Ömod_fcgid¡×¡£
Á°¼Ô¤Ï¤«¤Ê¤êÁ°¤«¤é¥¢¥Ã¥×¥Ç¡¼¥È¤·¤Æ¤¤¤Ê¤¤¤Î¤Ç¸½ºß¤Ç¤â¹¹¿·¤µ¤ì¤Æ¤¤¤ëmod_fcgid¤ò»È¤¦¡£
¤Á¤Ê¤ß¤ËWeb¥µ¡¼¥Ð¤ÏApache 2.2.4¤Ç¤¹¡£

¤Þ¤º¤Ïmod_fcgid¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£
¢¨Apache¤¬/usr/local/apache2¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤ÏMakefile¤òÊÔ½¸¤¹¤ëɬÍפ¬¤¢¤ë¡£
$ wget http://nchc.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.1.tar.gz
$ tar xvzf mod_fcgid.2.1.tar.gz
$ cd mod_fcgid.2.1
$ make
# make install
Apache¤ÎÀßÄêÊѹ¹¤ò¤¹¤ë¡£
/usr/local/apache2/conf/httpd.conf
LoadModule fcgid_module       modules/mod_fcgid.so

<IfModule mod_fcgid.c>
SocketPath /tmp/fcgid_sock/
AddHandler fcgid-script .fcgi
</IfModule>
FastCGI¤¬¼Â¹Ô¤µ¤ì¤ë¾ì½ê¤ò½àÈ÷¤¹¤ë¡£
# mkdir /tmp/fcgid_sock
# chmod 777 /tmp/fcgid_sock
MovableType¤ÎÀßÄê¤òÊѹ¹¤¹¤ë¡£
/usr/local/MovableType/mt-config.cgi
##### FastCGI #####
AdminScript     mt.fcgi
CommentScript   mt-comments.fcgi
TrackbackScript mt-tb.fcgi
SearchScript    mt-search.fcgi
XMLRPCScript    mt-xmlrpc.fcgi

LaunchBackgroundTasks 0
FastCGIÂбþ¤µ¤»¤ë¥Õ¥¡¥¤¥ë¤ò¥ê¥Í¡¼¥à¤¹¤ë¡£
# mv mt-config.cgi mt-config.fcgi
# mv mt-comments.cgi mt-comments.fcgi
# mv mt-tb.cgi mt-tb.fcgi
# mv mt-search.cgi mt-search.fcgi
# mv mt-xmlrpc.cgi mt-xmlrpc.fcgi

¤³¤ì¤Çhttpd¤òºÆµ¯Æ°¤¹¤ì¤ÐOK¡£

Postfix 2.4.1

Postfix 2.4.1¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎPostfix¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://mirror.postfix.jp/postfix-release/official/postfix-2.4.1.tar.gz
$ tar xvzf postfix-2.4.1.tar.gz
$ cd postfix-2.4.1
$ make
# make upgrade

# /sbin/service postfix restart
postfix ¤òÄä»ßÃæ:                                          [  OK  ]
postfix ¤òµ¯Æ°Ãæ:                                          [  OK  ]

PHP 5.2.2

PHP 5.2.2¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎPHP¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://jp.php.net/get/php-5.2.2.tar.bz2/from/this/mirror
$ tar xvjf php-5.2.2.tar.bz2
$ cd php-5.2.2
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-zlib --with-gd --enable-mbstring --enable-mbregex --disable-ipv6
$ make
# make install
¥¤¥ó¥¹¥È¡¼¥ë¸å¤ËApache¤òºÆµ¯Æ°¤¹¤ë¡£
# /sbin/service httpd restart
httpd ¤òÄä»ßÃæ:                                            [  OK  ]
httpd ¤òµ¯Æ°Ãæ:                                            [  OK  ]

BIND 9.4.1

BIND 9.4.1¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤Î¤ÇKAJUKAJU.net¤ÎBIND¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://ftp.isc.org/isc/bind9/9.4.1/bind-9.4.1.tar.gz
$ tar xvzf bind-9.4.1.tar.gz
$ ./configure --disable-ipv6 --sysconfdir=/etc
$ make
# make install

# /sbin/service named restart
named ¤òÄä»ßÃæ:                                            [  OK  ]
named ¤òµ¯Æ°Ãæ:                                            [  OK  ]

fml¤ÇWarning

ML¤Ë¥á¡¼¥ë¤ò½Ð¤¹¤¿¤Ó¤Ëfml¤Î¥í¥°¤ËWarning¤¬½Ð¤Æ¤¤¤ë¡£
ÆâÍÆ¤ÏFrom¤ÈReturn-Path¤¬Æ±¤¸¤«¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤¤¤ëÉôʬ¤Ê¤ó¤À¤±¤ÉFrom¤ò½ñ¤­´¹¤¨¤Æ¤¤¤ë¤¿¤á°ÕÌ£¤¬¤Ê¤¤¡£

# tail /var/spool/fml/mkname/log
07/05/02 10:00:49 MTI[1517]: Warning; Return-Path:<owner-mlname¡÷kajukaju.net> != From: (¥á¡¼¥ë¥¢¥É¥ì¥¹)

fml¤ÎÀßÄê¤Ç¤³¤Î¥Á¥§¥Ã¥¯¤ò̵¸ú¤Ë¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£

# vi /usr/local/fml/libmti.pl
    ## additonal checks
    ## 1 check the consistency between Return-Path: and From:
    #if ($rp && $From_address && !&AddressMatch($rp, $From_address)) {
    #   &Log("MTI[$$]: Warning; Return-Path:<$rp> != From:");
    #}

fml

¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¥µ¡¼¥Ð¤òfml¤Ç¹½ÃÛ¤·¤Þ¤·¤¿¡£
¼ç¤Ë·ÈÂÓÅÅÏäǤΤä¤ê¤È¤ê¤Ê¤Î¤Ç·ÈÂÓÍѤÎÀßÄê¤òÄɲ䷤ƹ½ÃÛ¡£
Ä̾ï¤ÎMLºîÀ®¤Î¸å¤Ëconfig.ph¤Ë¤¤¤¯¤Ä¤«Äɵ­¤¹¤ë¤Î¤¬¥Ý¥¤¥ó¥È¤Ç¤¹¡£
¤³¤¦¤¹¤ë¤³¤È¤ÇFrom¥¢¥É¥ì¥¹¤¬½ñ¤­´¹¤¨¤é¤ì¤ë¤Î¤Ç·ÈÂӤǤÎÊÖ¿®Æ°ºî¤â²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£

$ vi /var/spool/fml/mlname/config.ph

# YOU CAN EDIT MANUALLY AFTER HERE.

# FOR SECURITY, Disable user to retrieve member list
# fml 3.0 style
# @DenyProcedure = ('member','active','members','actives','status','stat');
#
# fml 4.0 style
&DENY_PROCEDURE('member');  # _this_line_is_added_by_makefml_
&DENY_PROCEDURE('active');  # _this_line_is_added_by_makefml_
&DENY_PROCEDURE('members'); # _this_line_is_added_by_makefml_
&DENY_PROCEDURE('actives'); # _this_line_is_added_by_makefml_
&DENY_PROCEDURE('status');  # _this_line_is_added_by_makefml_
&DENY_PROCEDURE('stat');    # _this_line_is_added_by_makefml_

$START_HOOK = q#
        $Envelope{'Body'} = "From <". $From_address .">\n\n". $Envelope{'Body'};
        #;

$HEADER_ADD_HOOK = q#
        &DELETE_FIELD('X-ML-Info');
        &DELETE_FIELD('List-Id');
        &DELETE_FIELD('List-Software');
        &DELETE_FIELD('List-Post');
        &DELETE_FIELD('List-Owner');
        &DELETE_FIELD('List-Help');
        &DELETE_FIELD('List-Unsubscribe');
        #;

$SMTP_OPEN_HOOK = q#
        $Envelope{'fh:from:'} = $MAIL_LIST;
        $Envelope{'fh:reply-to:'} = $MAIL_LIST;
        #;

1;

CentOS 5

RHEL5¤Î¥ê¥ê¡¼¥¹¤Ëȼ¤Ã¤ÆCentOS5¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤¿¤é¤·¤¤¡£
yum¤ÇCentOS4¤«¤éCentOS5¤Ë¥¢¥Ã¥×¥°¥ì¡¼¥É¤·¤Æ¤ß¤è¤¦¤«¤Í¤§¡£

#rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-5-0.0.el5.centos.2.i386.rpm
# yum clean all
# yum --disablerepo=* --enablerepo=base --enablerepo=updates update yum* rpm*
# yum clean all
# yum --disablerepo=* --enablerepo=base --enablerepo=updates upgrade

SpamAssassin 3.1.8


ÀèÆü¤Î¥á¥â¥êÉÔ­¤Î·ï¤Ï¤É¤¦¤ä¤éSpamAssassin¤ÎÀȼåÀ­¤Ë¤è¤ë¤â¤Î¤é¤·¤¤¡£
SpamAssassin¤Î¥µ¥¤¥È¤Ë¾ðÊ󤬤¢¤Ã¤¿¡ÊCVE-2007-0451¡Ë¡£
¤³¤ì¤Ë¤è¤ë¤ÈŤ¤URL¤ò´Þ¤à¥á¡¼¥ë¤Î½èÍý¤ËÌäÂ꤬¤¢¤Ã¤ÆDoS¤ò°ú¤­µ¯¤³¤µ¤ì¤ë¤é¤·¤¤¡£
SpamAssassin¤ò3.18¤Ë¥¢¥Ã¥×¥Ç¡¼¥È¤·¤¿¡£

$ wget http://ftp.kddilabs.jp/infosystems/apache/spamassassin/source/Mail-SpamAssassin-3.1.8.tar.bz2
$ tar xvjf Mail-SpamAssassin-3.1.8.tar.bz2
$ perl Makefile.PL PREFIX=/usr/local/
$ make
# make install

# /sbin/service spamd restart
spamd ¤òÄä»ßÃæ:                                            [  OK  ]
spamd ¤òµ¯Æ°Ãæ:                                            [  OK  ]

¤³¤ì¤Ç¤·¤Ð¤é¤¯ÍͻҸ«¤«¤Ê¡£
¤Á¤Ê¤ß¤ËDoS¤¬È¯À¸¤·¤¿¤È¤­¤ÎMRTG¡Ê¾å¡§CPU¥í¡¼¥É¥¢¥Ù¥ì¡¼¥¸¡¢²¼¡§¥á¥â¥ê»ÈÍÑÎ̡ˡ£

http://spamassassin.apache.org/advisories/cve-2007-0451.txt

Out of Memory

º£Æü¤ÎͼÊý¤´¤í¥µ¡¼¥Ð¤Ç¥á¥â¥êÉÔ­¤¬È¯À¸¤·¤Æ¤¤¤í¤¤¤í¤Ê¥×¥í¥»¥¹¤¬¥À¥¦¥ó¤·¤¿Íͻҡ£
# cat /var/log/kernel.log
Apr 21 15:41:12 bruna kernel: Out of Memory: Killed process 18377 (httpd).
Apr 21 15:44:24 bruna kernel: oom-killer: gfp_mask=0x1d2
Apr 21 15:47:22 bruna kernel: Mem-info:
Apr 21 15:50:02 bruna kernel: DMA per-cpu:
Apr 21 15:51:45 bruna kernel: cpu 0 hot: low 2, high 6, batch 1
Apr 21 15:55:51 bruna kernel: cpu 0 cold: low 0, high 2, batch 1
Apr 21 15:58:38 bruna kernel: Normal per-cpu:
Apr 21 16:01:57 bruna kernel: cpu 0 hot: low 32, high 96, batch 16
Apr 21 16:05:33 bruna kernel: cpu 0 cold: low 0, high 32, batch 16
Apr 21 16:27:28 bruna kernel: HighMem per-cpu: empty
Apr 21 16:27:40 bruna kernel:
Apr 21 16:28:13 bruna kernel: Free pages:         716kB (0kB HighMem)
Apr 21 16:28:23 bruna kernel: Active:78523 inactive:41040 dirty:0 writeback:0 unstable:0 free:179 slab:3440 mapped:120491 pagetables:2484
Apr 21 16:28:24 bruna kernel: DMA free:20kB min:20kB low:40kB high:60kB active:10944kB inactive:176kB present:16384kB pages_scanned:1043258
 all_unreclaimable? yes
Apr 21 16:28:24 bruna kernel: protections[]: 0 0 0
Apr 21 16:28:24 bruna kernel: Normal free:696kB min:696kB low:1392kB high:2088kB active:303148kB inactive:163984kB present:507776kB pages_s
canned:20751918 all_unreclaimable? yes
Apr 21 16:28:24 bruna kernel: protections[]: 0 0 0
Apr 21 16:28:24 bruna kernel: HighMem free:0kB min:128kB low:256kB high:384kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unrec
laimable? no
Apr 21 16:28:24 bruna kernel: protections[]: 0 0 0
Apr 21 16:31:22 bruna kernel: DMA: 1*4kB 0*8kB 1*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 20kB
Apr 21 16:31:23 bruna kernel: Normal: 10*4kB 2*8kB 0*16kB 4*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 696kB
Apr 21 16:31:23 bruna kernel: HighMem: empty
Apr 21 16:31:23 bruna kernel: Swap cache: add 322507, delete 322506, find 568501/595776, race 0+46
Apr 21 16:31:23 bruna kernel: 0 bounce buffer pages
Apr 21 16:31:23 bruna kernel: Free swap:            0kB
Apr 21 16:31:23 bruna kernel: 131040 pages of RAM
Apr 21 16:31:23 bruna kernel: 0 pages of HIGHMEM
Apr 21 16:31:23 bruna kernel: 2182 reserved pages
Apr 21 16:31:23 bruna kernel: 24199 pages shared
Apr 21 16:32:32 bruna kernel: 1 pages swap cached
¤³¤ó¤Ê´¶¤¸¤Î¥í¥°¤¬¤ï¤é¤ï¤é½Ð¤Æ¤¤¤Þ¤·¤¿¡£ »à¤ó¤À¥×¥í¥»¥¹°ìÍ÷¡£
# cat /var/log/kernel.log |grep "Out of Memory"
Apr 21 15:41:12 bruna kernel: Out of Memory: Killed process 18377 (httpd).
Apr 21 16:32:32 bruna kernel: Out of Memory: Killed process 18378 (httpd).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18379 (httpd).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18380 (httpd).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18381 (httpd).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18388 (httpd).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18454 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18347 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18407 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18455 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18387 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18342 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18451 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18431 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18418 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18489 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18504 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18416 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18487 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18372 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18417 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18386 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18474 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18490 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18498 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18469 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18470 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18466 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18443 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18364 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18511 (mt-tb.cgi).
Apr 21 16:48:41 bruna kernel: Out of Memory: Killed process 18421 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18420 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18368 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18419 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18398 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18425 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18429 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18453 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18522 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18432 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18452 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18515 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18568 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18520 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18499 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18537 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18433 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18403 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18389 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18370 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18401 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18565 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18546 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18435 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18391 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18480 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18461 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18510 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18392 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18479 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18442 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18531 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18467 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18400 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18458 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18468 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18519 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18488 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18523 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18444 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 11822 (httpd).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18501 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18496 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18502 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18521 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18497 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18558 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18587 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18574 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18573 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18383 (mt-tb.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 8949 (spamd).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18665 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18663 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18664 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18667 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18666 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18662 (mobile.cgi).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 3670 (httpd).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18527 (smtpd).
Apr 21 16:48:42 bruna kernel: Out of Memory: Killed process 18529 (anvil).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18692 (mobile.cgi).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18685 (httpd).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18686 (httpd).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18687 (httpd).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18550 (pipe).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18514 (mrtg).
Apr 21 16:48:43 bruna kernel: Out of Memory: Killed process 18512 (crond).

BIND 9.4.0

2·î¤ËBIND¤¬¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤·¤Æ¤¤¤Þ¤·¤¿¡£
º£¹¹¤Ê¤¬¤éKAJUKAJU.net¤â¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¡£
$ wget http://ftp.isc.org/isc/bind9/9.4.0/bind-9.4.0.tar.gz
$ tar xvzf bind-9.4.0.tar.gz
$ ./configure --disable-ipv6 --sysconfdir=/etc
$ make
# make install

# kill -HUP ¥×¥í¥»¥¹ID

MRTG¤Ç¥á¥â¥ê»ÈÍÑÎ̼èÆÀ


Linux¤Î¥á¥â¥ê´ÉÍý¤ÏÊ£»¨¡ÊÍ¥½¨¡Ë¤Ç¥á¥â¥ê»ÈÍÑÎ̤òfree¥³¥Þ¥ó¥É¤Î½ÐÎÏ·ë²Ì¤Ç°ìȯɽ¼¨¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£¡Ê¢¨free¥³¥Þ¥ó¥É¤Îused¤Ç¤Ï¤Ê¤¤¡Ë
·×»»¼°¤È¤·¤Æ¤Ï¡Ö¥á¥â¥ê»ÈÍÑÎÌ¡átotal ¡Ý (free + buffers + cached)¡×¤È¤Ê¤ë¡£

¤³¤ì¤òMRTG¤Ç¼èÆÀ¤·¤è¤¦¤È¤·¤¿¾ì¹ç¡¢¸¡º÷¤¹¤ë¤È¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤Ç¤Î¼èÆÀÊýË¡¤¬½Ð¤Æ¤¯¤ë¤Î¤À¤¬¡¢MRTG¤ÏÀßÄê¥Õ¥¡¥¤¥ëÆâ¤Ç·×»»¼°¤ò½ñ¤¯¤³¤È¤¬¤Ç¤­¤ë¡£
¤Ä¤Þ¤ê¤ï¤¶¤ï¤¶¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò½ñ¤¯¤Þ¤Ç¤â¤Ê¤¯MRTG¤À¤±¤Ç´°·ë¤¹¤ë¤³¤È¤¬²Äǽ¡£
²Ã»»¼°¤Î¾ì¹ç¤Ï¼¡¤Î¤è¤¦¤Ë½ñ¤±¤Ð¤è¤¤¡£
OID_A&OID_B:community@host + OID_C&OID_D:community@host

¤³¤ì¤ò´ð¤ËMRTG¤Î¥³¥ó¥Õ¥£¥°¤òºîÀ®¤¹¤ë¡£
/usr/local/mrtg-2/conf/mrtg.cfg
Target[bruna_memory_used]:      .1.3.6.1.4.1.2021.4.3.0&.1.3.6.1.4.1.2021.4.5.0:public@192.168.x.y
    - .1.3.6.1.4.1.2021.4.4.0&.1.3.6.1.4.1.2021.4.6.0:public@192.168.x.y
    - .1.3.6.1.4.1.2021.4.1.0&.1.3.6.1.4.1.2021.4.14.0:public@192.168.x.y
    - .1.3.6.1.4.1.2021.4.1.0&.1.3.6.1.4.1.2021.4.15.0:public@192.168.x.y
Options[bruna_memory_used]:     growright,gauge
MaxBytes1[bruna_memory_used]:   265032
MaxBytes2[bruna_memory_used]:   515496
Unscaled[bruna_memory_used]:    dwmy
YLegend[bruna_memory_used]:     Memory Used
ShortLegend[bruna_memory_used]: byte
LegendI[bruna_memory_used]:     &nbsp;Swap
LegendO[bruna_memory_used]:     &nbsp;Real
Legend1[bruna_memory_used]:     ¥¹¥ï¥Ã¥×¥á¥â¥ê»ÈÍÑÎÌ
Legend2[bruna_memory_used]:     ¼Â¥á¥â¥ê»ÈÍÑÎÌ
kilo[bruna_memory_used]:        1024
kMG[bruna_memory_used]:         k,M,G,T,P
Colours[bruna_memory_used]:     LIGHTBLUE#61A0DF,DKBLUE#0000DD,DARKGREEN#006600,VIOLET#FF00FF
Title[bruna_memory_used]:       bruna --&gt; memory --&gt; used
PageTop[bruna_memory_used]:     <h1>bruna --&gt; memory --&gt; used</h1>

SpamAssassin

SpamAssassin¤ÈMySQL¤òÏ¢·È¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤¿¤Î¤Ç¥¨¥ó¥È¥ê¡¼¤òºîÀ®¤·¤Æ¤ß¤¿¡£
¹½ÃÛ¤·¤Æ¤«¤é2¥ö·î¤¯¤é¤¤¤¿¤Ä¤±¤É½çÄ´¤Ëư¤¤¤Æ¤¤¤ëÍͻҡ£

http://www.kajukaju.net/centos/spamassassin.php
http://www.kajukaju.net/centos/spamassassin_mysql.php

Postfix 2.4.0

ºÇ¶á¥µ¡¼¥Ð¤Î¥¢¥Ã¥×¥Ç¡¼¥ÈÂդäƤޤ·¤¿¡£
µ¤¤¬ÉÕ¤¤¤¿¤é¿§¡¹¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤·¤Æ¤¤¤ëÍͻҡ£

¤Þ¤º¤ÏPostfix
$ wget http://mirror.postfix.jp/postfix-release/official/postfix-2.4.0.tar.gz
$ tar xvzf postfix-2.4.0.tar.gz
$ cd postfix-2.4.0
$ make
# make upgrade

# /sbin/service postfix restart
postfix ¤òÄä»ßÃæ:                                          [  OK  ]
postfix ¤òµ¯Æ°Ãæ:                                          [  OK  ]

¥á¥â¥êÁýÀß

ÀèÆü¤ªË´¤¯¤Ê¤ê¤Ë¤Ê¤Ã¤¿¥µ¡¼¥Ð¤Î¥á¥â¥ê¤ò¸ò´¹¡£
KAJUKAJU.net¤Î¥µ¡¼¥Ð¥Þ¥·¥ó¤ÏºÇÂç¥á¥â¥êÍÆÎÌ256MB¤Ê¤Î¤Çº£¤Þ¤Ç¤Ï256MB¤Ç»È¤Ã¤Æ¤¤¤¿¤Î¤Ç¤¹¤¬¡¢¥Ð¥Ã¥Õ¥¡¥í¡¼¤Î¥µ¥¤¥È¤Ë¡¢¤Ê¤ó¤È512MB¤Þ¤ÇOK¤È½ñ¤¤¤Æ¤¢¤ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤«¡ª
¤Ã¤Æ¤³¤È¤Ç¤Á¤ç¤Ã¤ÈËÁ¸±¤ò¤·¤Þ¤¹¡£
¥ä¥Õ¥ª¥¯¤Ç256MB¤Î¥á¥â¥ê¤ò2¸ÄĴã¡£
Àè¤Û¤ÉÅþÃ夷¤¿¤Î¤ÇÁõÃ夷¤ÆÅŸ»ON¡£

¤½¤Î·ë²Ì¤³¤ó¤Ê´¶¤¸¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
$ free
             total       used       free     shared    buffers     cached
Mem:        515496     135464     380032          0       6396      51396
-/+ buffers/cache:      77672     437824
Swap:       265032          0     265032

̵»ö512MB¤Çư¤­½Ð¤·¤¿Íͻҡ£

Visitors