aamall

LINUX

2011������09·���17������

CentOS5.7������squid�����ҏ�돩�\���\���\¹\������¼\���

CentOS5.7���̏��������������·�����ď��������¼ (���½�����Ï��������¹���������¼)

�����я�����������iso\���\���\���\���\���\���\���\������¼\������·�����������Ï�����»�ߏ����������ď����������я�����������»��Ώ��������������������·�����������Ï�¡�
�����������������я��폢�폢��

�����򏪿³�����ҏ��µ���·�����������Ώ����ď�����squid�����������������������·��������¡�
³����«������\���\�돢���ҏ��«�����ď�������­���̏�������������������������¡�

# tail -5 /usr/local/squid/var/logs/cache.log
2011/09/17 04:02:11| WARNING: preventing off_t overflow for http://ftp.***.jp/Linux/centos/5/isos/i386/CentOS-5.7-i386-bin-DVD-1of2.iso
2011/09/17 04:02:11| WARNING: preventing off_t overflow for http://ftp.***.jp/Linux/centos/5/isos/i386/CentOS-5.7-i386-bin-DVD-1of2.iso
2011/09/17 04:02:11| WARNING: preventing off_t overflow for http://ftp.***.jp/Linux/centos/5/isos/i386/CentOS-5.7-i386-bin-DVD-1of2.iso
2011/09/17 04:02:11| WARNING: preventing off_t overflow for http://ftp.***.jp/Linux/centos/5/isos/i386/CentOS-5.7-i386-bin-DVD-1of2.iso
2011/09/17 04:02:11| WARNING: preventing off_t overflow for http://ftp.***.jp/Linux/centos/5/isos/i386/CentOS-5.7-i386-bin-DVD-1of2.iso
#

��������squid¾��آ�·
# /usr/local/squid/sbin/squid -v
Squid Cache: Version 3.1.12
configure options: '--prefix=/usr/local/squid' '--enable-useragent-log' '--enable-referer-log' '--enable-linux-netfilter' '--enable-removal-policies=heap,lru' '--enable-storeio=diskd,ufs' '--disable-ipv6' '--disable-ident-lookups' '--disable-internal-dns' --with-squid=/usr/local/src/squid-3.1.12 --enable-ltdl-convenience
#

�����я�����������»��ӏ�����\���\���\���\���
# ./configure --help | grep -i large
--with-large-files Enable support for large files (logs etc).
POSIX_V6_ILP32_OFFBIG 32 bits with large file support
POSIX_V6_LPBIG_OFFBIG large pointers and files
XBS5_ILP32_OFFBIG 32 bits with large file support (legacy)
XBS5_LPBIG_OFFBIG large pointers and files (legacy)
#

�����я�����\��\���\��\������¼\���
./configure \
--prefix=/usr/local/squid \
--with-large-files \
--enable-large-cache-files \
--enable-useragent-log \
--enable-referer-log \
--enable-linux-netfilter \
--enable-removal-policies="heap,lru" \
--enable-storeio="diskd,ufs" \
--disable-ipv6 \
--disable-ident-lookups \
--disable-internal-dns && make && make install

�����я�����³��������¡�
# /usr/local/squid/sbin/squid -v
Squid Cache: Version 3.1.12
configure options: '--prefix=/usr/local/squid' '--with-large-files' '--enable-large-cache-files' '--enable-useragent-log' '--enable-referer-log' '--enable-linux-netfilter' '--enable-removal-policies=heap,lru' '--enable-storeio=diskd,ufs' '--disable-ipv6' '--disable-ident-lookups' '--disable-internal-dns' --with-squid=/usr/local/src/squid-3.1.12 --enable-ltdl-convenience
#

DL������������򏫳

tuzzy92 at 04:51����Permalink����Comments(0)����

2011������07·���18������

CentOS6.0������\���\���\¹\������¼\������·�����������Ώ����ď�¡�

���������������¹���̏��������µ�����я�¡�ryouji���µ������
\³\���\���\��������������̏����������Ï�𡭏������������������¹����

���������������¼������������������image������DL���·������\���\���\¹\������¼\������������������­���������·�����ď�¡�
�����������¼������𡭏����������я��������µ��������¡�

������������Scientific Linux����ޏ�����256MB������\���\���\�����������������¡�
���½�����я�����¾���µ�����������������������������������������������䏢���������������ď�¡�

��������������������������������������������¡�������¡�����������»��Џ����������������������я��������«��������������¡�
������������»��ӏ����������ӏ�������������������������¡�
»����������������������«������512MB�����������򏪢��Ώ��·������\���\���\¹\������¼\�����¡�

text\������¼\������µ�����������������������ď���
���½���·������ALT+F2�����������⏢������������𡯏��������������­����������������
�����Ï�����������²���¼��ҏ���������������swap��������돪�½���������\��Џ��¼\���\��\·\���\���
(/dev/sda1)���̏��������­�����������������������������я�¡�

# uname -a
Linux v-dev32.localhost 2.6.32-71.29.1.el6.i686 #1 SMP Mon Jun 27 18:07:00 BST 2011 i686 i686 i386 GNU/Linux

# cat /etc/issue
CentOS Linux release 6.0 (Final)
Kernel \r on an \m

#

# grep "@" anaconda-ks.cfg
@base
@core
@development
@server-policy
#

# fdisk -l

Disk /dev/sda: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007d3ae

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1436 11533312 83 Linux
/dev/sda2 1436 1567 1048576 82 Linux swap / Solaris
#

# getenforce
Enforcing
#

��OS\���\���\¹\������¼\������\���\��ӏ��¼\���������SELinux������¹¹������\���\���\��\���\�돢����½Ð���������³���������«�����������ď�¡�

RH�����Ρ�¹OS����������������������¼���������������������������я����������������Ï��«������¡�

tuzzy92 at 03:07����Permalink����Comments(0)����

2011������07·���17������

CentOS���������������µ

������������������������������������������������������������������������������▄▄▄██████▄
������������███▀������������█████████��������������▄▄▄▄█████▀▀������████▀▀
����������███▀����██������███▀����▄███▀������������������▀▀▀▀��������������███▀
��������██▀����▄███▀███▄▄▄███����������������������������������▄▄▄█▀
����▄███▄▄██▀����█▀������▀████��������������������������������������▀██▄
����▀▀▀▀███▄��������������▄██▀█▄▄������������������������������������███
����������██▀����███��������██▀������▀███▄▄������������������������������███
������▄████▀▀██����▄█▀▄▄��������▀█████▄▄������������������������███
������▀█▀▀������█▄▄█▀��������████▄������▀███▀▀▀��������������������███
▄��������███����▀███��������������▀▀▀��������������������������������������███
███������███������▀▀��������������������������������������������������������███
����███������▀������������������▀████▄����������������������������▄▄▄▄████
������▀������������������������������▀████����������������������������▀█████

��������������

����ޏ�����������RH�����Ρ�¹������Scientific Linux�����ҏ�����¾��⡭�����­(VMware \���\���\���256MB)������
\���\���\¹\������¼\������·�����������Ï�����»�ߏ����������ď��ޏ�������¡�\���\���\������̏��­�����������������������������������䏢���������������ď�����orz��¡�

����Scientific Linux
http://www.scientificlinux.org/

½Ð���µ������������(½Ð���»������������)���������������������������­���������·�����������Ώ��·����������CentOS

tuzzy92 at 05:36����Permalink����Comments(2)����

2011������02·���24������

lsyncd2.0

µ��������������������ď�����\���\���\������¼\Ð���¼\���\���\���\��\���\�ߏ��·�����������ď�¡�

����ޡ���䏪����������rsyncd¾������²�����������������������������������������Ώ����ď�������¡�

����lsyncd
http://code.google.com/p/lsyncd/

����lua
http://www.lua.org/

��򏪡�돪����
����ޡ���䏢�µ��¡�192.168.11.71:/usr/local/apache2/htdocs/sync/
����ޡ���䏪������¡�192.168.11.72:/usr/local/apache2/htdocs/sync/

���lsyncd
# wget http://lsyncd.googlecode.com/files/lsyncd-2.0.2.tar.gz
# tar xvzf lsyncd-2.0.2.tar.gz
# cd lsyncd-2.0.2 ; pwd

# ./configure

checking for LUA... configure: error: Package requirements (lua >= 5.1.3) were not met:

No package 'lua' found

lua���̏��������������������������µ

���lua
# cd ../ ; pwd
# wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
# tar xvzf lua-5.1.4.tar.gz
# cd lua-5.1.4 ; pwd
# make linux

In file included from lua.h:16,
from lua.c:15:
luaconf.h:275:31: error: readline/readline.h: No such file or directory
luaconf.h:276:30: error: readline/history.h: No such file or directory
lua.c: In function 'pushline':
lua.c:182: warning: implicit declaration of function 'readline'
lua.c:182: warning: assignment makes pointer from integer without a cast
lua.c: In function 'loadline':
lua.c:210: warning: implicit declaration of function 'add_history'
make[2]: *** [lua.o] Error 1
make[2]: Leaving directory `/usr/local/src/lua-5.1.4/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/local/src/lua-5.1.4/src'
make: *** [linux] Error 2

readline������\��\������¼���������������������µ

# yum install readline-devel.i386
# make linux

/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: Leaving directory `/usr/local/src/lua-5.1.4/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/local/src/lua-5.1.4/src'
make: *** [linux] Error 2

ncurses������\��\������¼���������������������µ

# yum install ncurses-devel.i386

# make linux
# make install
cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib /usr/local/man/man1 /usr/local/share/lua/5.1 /usr/local/lib/lua/5.1
cd src && install -p -m 0755 lua luac /usr/local/bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp /usr/local/include
cd src && install -p -m 0644 liblua.a /usr/local/lib
cd doc && install -p -m 0644 lua.1 luac.1 /usr/local/man/man1

# which lua
/usr/local/bin/lua

���lsyncd��돩�������
# cd ../lsyncd-2.0.2 ; pwd
/usr/local/src/lsyncd-2.0.2
# ./configure

checking for LUA... configure: error: Package requirements (lua >= 5.1.3) were not met:

No package 'lua' found

�����쏢���������쏢�������������������������������µ

# find / -type f -name "lualib.h"
/usr/local/include/lualib.h
/usr/local/src/lua-5.1.4/src/lualib.h
# find / -type f -name "liblua.a"
/usr/local/lib/liblua.a
/usr/local/src/lua-5.1.4/src/liblua.a

# export LUA_CFLAGS='-I/usr/local/include -lm -ldl'
# export LUA_LIBS='/usr/local/lib/liblua.a'

# ./configure
# make
# make install

# which lsyncd
/usr/local/bin/lsyncd
#

���/etc/lsyncd.conf
settings = {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status",
nodaemon = true,
}

sync{
default.rsync,
source="/usr/local/apache2/htdocs/sync/",
target="[email protected]:/usr/local/apache2/htdocs/sync/",
rsyncOps="-Hax",
}

���µ��������\¹\���\���\��\���
#!/bin/bash
#
# lsyncd
#
# chkconfig: - 99 20
# description: lsyncd auto start script

. /etc/rc.d/init.d/functions

start() {
pid=`pidof lsyncd`
if [ $? -eq 0 ]; then
echo "lsyncd (pid $pid) is running..."
exit
fi

/usr/local/bin/lsyncd /etc/lsyncd.conf &

pid=`pidof lsyncd`
if [ $? -eq 0 ]; then
echo "Starting lsyncd (pid $pid)"
else
echo "Error lsyncd is not running"
fi
}

stop() {
echo "Stopping lsyncd"
/bin/kill -9 `/sbin/pidof lsyncd`
until [ -z $(/sbin/pidof lsyncd) ]; do :; done
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
pid=`pidof lsyncd`
if [ $? -eq 0 ]; then
echo "lsyncd (pid $pid) is running..."
else
echo "lsyncd is not running"
fi
;;
*)
echo "Usage: lsyncd {start|stop|restart|status}"
exit 1
esac

exit $?

���\���\��\������¼\������¼\���
/etc/logrotate.d/syslog ������������²���

���³������
# pwd
/usr/local/apache2/htdocs/sync
# mkdir -p dir_01/dir_02 && touch dir_01/01.txt && touch dir_01/dir_02/02.txt

����\���\��
Wed Feb ** **:**:** 2011 Normal: Calling rsync with filter-list of new/modified files/dirs
/dir_01/***
/dir_01/
/
/dir_01/dir_02/***
/dir_01/dir_02/
/dir_01/01.txt
/dir_01/dir_02/02.txt
Wed Feb ** **:**:** 2011 Normal: Finished a list = 0

���Ï���ޡ���䏪����
# pwd
/usr/local/apache2/htdocs/sync
# ls -R
dir_01

./dir_01:
01.txt dir_02

./dir_01/dir_02:
02.txt

tuzzy92 at 00:11����Permalink����Comments(1)����

2011������02·���23������

cbq.init�����������������������ѡ돫������폢����

�����²��я��������򏪳���������������¡�돫���¡������������폢��������³����«���������������·��������������¡�½��ԏ��¹����������������������»��ӏ���µ������³�����������ď�¡�

\µ���¼\���\¹������»���������\����¼\���������¹������������
���½�����Ï�����������������������\����¼\������������������������
\����¼\������������������ѡ돫������폢���������ҏ����Ώ��������·�����������Ώ����ď�¡�

���\¹\���\���\��\��������Ώ�����
# cp -ip /usr/share/doc/iproute-2.6.18/examples/cbq.init-v0.7.3 /etc/init.d/cbq.init
# chmod +x /etc/init.d/cbq.init

# chkconfig --add cbq.init
# chkconfig --list cbq.init
cbq.init 0:off 1:off 2:on 3:on 4:on 5:on 6:off
#

���80������\����¼\������������������ѡ돫�������50Kbit�����������폢�������¹�����������Ώ�����
# cd /etc/sysconfig/cbq/ ; pwd
/etc/sysconfig/cbq
#

���á���只����������\µ\���\��\���������������������������������
# mv -i cbq-0000.example .cbq-0000.example

���Ï����ď��¾µ�̏���� cbg-\���\������¼\�����������ď��»���.����̏��«���������������¹���������¾�����
# vi cbq-100.http
==============================
DEVICE=ppp0,100Mbit,10Mbit
RATE=50Kbit
WEIGHT=5Kbit
PRIO=5
RULE=\��\������¼\Ð\���IP\��\���\���\¹:80,
==============================

rate�����������폢����������������»���������
WEIGHT������rate������1/10�����ҏ����Ώ�������¡��������¼���«���������������������я�¡�
\���\���\��ď��¼\���\���\������̏��½�����Ï����������������������������ď�¡�

# /etc/init.d/cbq.init compile(�����ԏ���ߏ��������ޏ����������Ώ��������������������̏���̏��«������)
/sbin/tc qdisc del dev ppp0 root
/sbin/tc qdisc add dev ppp0 root handle 1 cbq bandwidth 100Mbit avpkt 3000 cell 8
/sbin/tc class change dev ppp0 root cbq weight 10Mbit allot 1514

/sbin/tc class add dev ppp0 parent 1: classid 1:100 cbq bandwidth 100Mbit rate 50Kbit weight 5Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 3000 bounded
/sbin/tc qdisc add dev ppp0 parent 1:100 handle 100 tbf rate 50Kbit buffer 10Kb/8 limit 15Kb mtu 1500
/sbin/tc filter add dev ppp0 parent 1:0 protocol ip prio 100 u32 match ip src \��\������¼\Ð\���IP\��\���\���\¹ match ip sport 80 0xffff classid 1:100

# /etc/init.d/cbq.init start

���³������
# /etc/init.d/cbq.init list

### eth0: queueing disciplines

qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

### eth1: queueing disciplines

qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

### ppp0: queueing disciplines

qdisc cbq 1: rate 100000Kbit (bounded,isolated) prio no-transmit
qdisc tbf 100: parent 1:100 rate 50000bit burst 10Kb lat 819.2ms

### ppp0: traffic classes

class cbq 1: root rate 100000Kbit (bounded,isolated) prio no-transmit
class cbq 1:100 parent 1: leaf 100: rate 50000bit (bounded) prio 5
class tbf 100:1 parent 100:

### ppp0: filtering rules

filter parent 1: protocol ip pref 100 u32
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:100
match 7901f9de/ffffffff at 12
match 00500000/ffff0000 at 20

# /etc/init.d/cbq.init stats
### eth0: queueing disciplines

qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 58221108459 bytes 137153302 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0

### eth1: queueing disciplines

qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 163878209113 bytes 173976400 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0

### ppp0: queueing disciplines

qdisc cbq 1: rate 100000Kbit (bounded,isolated) prio no-transmit
Sent 5668163 bytes 28005 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 0 overactions 0 avgidle 240 undertime 0
qdisc tbf 100: parent 1:100 rate 50000bit burst 10Kb lat 819.2ms
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0

### ppp0: traffic classes

class cbq 1: root rate 100000Kbit (bounded,isolated) prio no-transmit
Sent 5668215 bytes 28006 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 0 overactions 0 avgidle 240 undertime 0
class cbq 1:100 parent 1: leaf 100: rate 50000bit (bounded) prio 5
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 0 overactions 0 avgidle 1.36171e+07 undertime 0
class tbf 100:1 parent 100:


### ppp0: filtering rules

filter parent 1: protocol ip pref 100 u32
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:100 (rule hit 28007 success 0)
match 7901f9de/ffffffff at 12 (success 27998 )
match 00500000/ffff0000 at 20 (success 0 )

#

�񡯏��¾\µ���¼\Ð����������������̏����ӏ�����\���\���\���\���������wget���·�����������Ώ�����

0% [] 236,283 5.90K/s eta 13h 11m

���������������������

tuzzy92 at 02:13����Permalink����Comments(0)����

2011������02·���14������

PPPoE \«���¼\���\���\������¼\���

²���¼��ҏ��������������⏢����Linux������\������¼\���¹½�����叢�·�����������������я��������ޏ�����\¹\��ԏ��¼\������̏����������������������������������Ï����������ҏ��·�����ď�������¡�
PPPoE������\«���¼\���\���\������¼\�������������돢�«���·�����������Ώ����ď�������¡�����\��\���\Ð\���\¹�����ҏ����������������ď�¡�

��»²¾���µ­»���(Netscreen������������«������������)
http://blog.livedoor.jp/tuzzy92/archives/51815564.html#

\«���¼\���\���\������¼\���������������²��ď��폢�폢��
�������������������Џ����������я��«�����������Ï�������������������������¡񏪤���������µ��𡯏��������������Ð��¡�

³�돪���ԏ����䏪�³DEV /etc/sysconfig/network-scripts/ifcfg-ppp0 ������
²¼µ­µ­½��ҏ����ҏ�����µ­

LINUX_PLUGIN=/usr/lib/pppd/2.4.4/rp-pppoe.so
MTU=1452

��������¡�\���\���\���\������¼\�����돩�µ��������
��������¡�\��\���\»\¹³������

# ps ax | grep ppp
3288 ? S 0:00 /bin/bash /sbin/adsl-connect /etc/sysconfig/network-scripts/ifcfg-ppp0
3327 ? Ss 0:00 /usr/sbin/pppd ipparam ppp0 linkname ppp0 plugin /usr/lib/pppd/2.4.4/rp-pppoe.so eth0 noipdefault noauth default-asyncmap defaultroute hide-password nodetach mtu 1452 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user f.su4y-****@atson.net lcp-echo-interval 20 lcp-echo-failure 3

OK
��������¡����������������������������쏢����\���\������¼\���\Ð\���\��� \¹\��ԏ��¼\���\���\¹\���
http://www.bspeedtest.jp/ ������������\¹\��ԏ��¼\���\���\��\���\���

\µ���¼\Ð1[N] 65.6Mbps
\µ���¼\Ð2[S] 75.2Mbps
²¼������¼��؏�ď��������: 75Mbps(75.2Mbps,9.40MByte/s)
¾����������������ď��������: 81Mbps(81.6Mbps,10.2MByte/s)

�����������я��«�����������������������������������������������𡭢������������������я��������¹���ޏ��������

tuzzy92 at 04:26����Permalink����Comments(0)����

2011������01·���31������

\«\���6 10m������\���\���\�ޏ����ҏ��������������������­�����ď�����

NIC����\���\�̏��������Ð�ޏ�Џ��·���������������«�����������ď�������������
�����������䏪���������������������������������Ï�����������

# ifconfig -a eth1
eth1 Link encap:Ethernet HWaddr 00:0A:79:88:8C:12
inet addr:192.168.11.1 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::20a:79ff:fe88:8c12/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:685995174 errors:0 dropped:0 overruns:0 frame:0
TX packets:720061314 errors:0 dropped:0 overruns:2 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4028562739 (3.7 GiB) TX bytes:1311108297 (1.2 GiB)
Interrupt:201 Base address:0xf00
#

[ELECOM(\\\³\)] \²¼\Т돪\«\\\¼6½µLAN\ޏ¼\\ LD-GM/BK10

[ELECOM(\��\���\³\���)] \²���¼\��������Т������돪�\«\���\��\������¼6½���µ���LAN\�ޏ��¼\���\��� LD-GM/BK10
²���³�����¡�1,750�ޏ�Ώ���������¹��Џ�¡񏪡����������������



tuzzy92 at 23:15����Permalink����Comments(0)����

2011������01·���22������

squid \���\��\������¼\������¼\���������\���\��²��ҏ�����(squid-graph)

���»���������«���������������«������\­\���\���\·\���\���\���\�����¡�������³���������·�����ď���������
������������»��ӏ�����squid-graph

����squid-graph
http://squid-graph.sourceforge.net/

���
# wget http://downloads.sourceforge.net/project/squid-graph/squid-graph/3.2/squid-graph-3.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquid-graph%2Ffiles%2F&ts=1295629882&use_mirror=jaist
# tar xvfz squid-graph-3.2.tar.gz

������³«���·���������������­������\���\��\���\���\���\���������������squid-graph�����ҏ���̏����ӏ�����\���\��\���\���\���\���������mv���·������½��쏪�»

���squid \���\��\������¼\������¼\���
# /usr/local/squid/sbin/squid -k rotate

���\���\��²��ҏ�����
# /usr/local/bin/squid-graph \n--tcp-only --cumulative --start=����돩���䏢����0»���0�����0������ \n--output-dir=����̏����ӏ�����\���\��\���\���\���\��� < ²��ҏ��������о���\���\��

\������¼\������¼\���������\���\��²��ҏ�����������0»���0����̏�����cron������»���¹��Џ����������������������𡭢�������
�����䏩���䏢����\­\���\���\·\���\���\���\�����¡�������34.48%����³���������������ď���������ޏ�����\��⏢�¼\������Ð���������«���«�����ď��«�����������������¡��


�񡯏����쏢��������1
# /usr/local/squid/sbin/squid -k
/usr/local/squid/sbin/squid: option requires an argument -- k
Usage: squid [-cdhvzCFNRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal]
-a port Specify HTTP port number (default: 3128).
-d level Write debugging to stderr also.
-f file Use given config-file instead of
/usr/local/squid/etc/squid.conf
-h Print help message.
-k reconfigure|rotate|shutdown|interrupt|kill|debug|check|parse
Parse configuration file, then send signal to
running copy (except -k parse) and exit.
-s | -l facility
Enable logging to syslog.
-u port Specify ICP port number (default: 3130), disable with 0.
-v Print version.
-z Create swap directories
-C Do not catch fatal signals.
-D OBSOLETE. Scheduled for removal.
-F Don't serve any requests until store is rebuilt.
-N No daemon mode.
-R Do not set REUSEADDR on port.
-S Double-check swap during rebuild.
-X Force full debugging.
-Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.

�񡯏����쏢��������2
# squid-graph --help

Squid Graph 3.2 release Help (linux, perl 5.008008)

Usage examples:
squid-graph [options] < logfile.log
cat logfile.log | squid-graph [options]
tail -n 10000 logfile.log | squid-graph [options]

Command line options (options marked * are compulsary):

* --output-dir=output-dir (or -o=output-dir)
Specifies the directory which stores the output files.

--start=start-time (or -s=start-time)
Specifies the graph start time in seconds since 1970.
When not specified, 24 hours before the current time is
used as default.

--end=end-time (or -e=end-time)
Specifies the graph end time in seconds since 1970.
When not specified, the current time is used as default.

--title="report-title"
Specifies the report title. When not specified, "Squid
Graph Logfile Analysis Report" is used as default.

--tcp-only
Specifies that only TCP access and transfer graphs are
generated. When not specified, both TCP and UDP graphs
are generated.

--udp-only
Specifies that only UDP access and transfer graphs are
generated. When not specified, both TCP and UDP graphs
are generated.

--cumulative (or -c)
Enables generation of cumulative graphs instead of the
default histograms.

--no-transfer-duration (or -d)
Disables plotting of average transfer duration graph(s).

--no-console-log (or -n)
Disables logging of messages to console.

--help (or -h)
Displays this help message.

For more info, please visit http://squid-graph.sourceforge.net/

squid_log




tuzzy92 at 02:23����Permalink����Comments(0)����

2011������01·���21������

\���\³\���\³�����²���+squid

\µ���¼\о���������\���\³\���\³�����²������������²��������ҏ����򏪤���
²�����������������������������PC������\���\³\���\³�����²��������ҏ��«������������(Ž��Ρ�\Ž���)Ž³Ž���Ž��(�������½������)

# squid.conf������������
refresh_pattern -i \.(smilevideo|nicovideo)\.jp\/smile 25200 90% 50400 ignore-reload ignore-no-cache ignore-no-store ignore-private
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 1440 40% 4320 ignore-reload ignore-no-cache ignore-no-store ignore-private

cgi-bin/? ���½���·������\���\���\���\���\���������������¾���������µ­½��ҏ��¹������»��ӏ�������¡�
.(smilevideo|nicovideo).jp/smile ������\���\���\������·������URL���������������¹�����㏢����\­\���\���\·\������¹������(������������)��¡�

������������������������cache_dir������maximum_object_size������\µ\���\��돢���ҏ��������­�����������������Ώ��������·�����ď�¡�

store.log��������­������µ­½��ҏ�����
**********.*** SWAPOUT 00 00000817 C20C9C19251201F0740E464523D4AFF1 200 1295622230 1246547219 1308582230 video/mp4 32411692/32411692 GET http://smile-pcm12.nicovideo.jp/smile?

access.log��������­������µ­½��ҏ��̏����������«�����������Ï�����������������������������������(������»�ߏ�����)��¡�

**********.*** 4640 *.*.*.* TCP_HIT/200 25863485 GET http://smile-pso51.nicovideo.jp/smile? - NONE/- video/mp4

������������������²��ď����㏢�������«�����ď����������²������̏��«�����ӏ����ď�����������������»��ӏ���

tuzzy92 at 23:55����Permalink����Comments(0)����

2011������01·���18������

[���������������µ������] \���\«���¼������\­\���\���\·\���\µ���¼\Ð

�����������»��Џ�����������\­\���\���\·\���\µ���¼\Ð������¼��������Џ��­������µ�����������������������¡�
����ޏ���������������������¹\����Џ�ġ����������ď�����\���\���\¹\������¼\���

���Ï�����¼��HP
http://www.squid-cache.org/

���\���\���\¹\������¼\���
# wget http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.10.tar.gz
# tar xvfz squid-3.1.10.tar.gz
# cd squid-3.1.10 ; pwd

# ./configure \
--prefix=/usr/local/squid \
--enable-useragent-log \
--enable-referer-log \
--enable-linux-netfilter \
--enable-removal-policies="heap,lru" \
--enable-storeio="diskd,ufs" \
--disable-ipv6 \
--disable-ident-lookups \
--disable-internal-dns

# make
# make install

# touch /etc/sysconfig/squid

���\��\«\���\���\�����돫�����
# useadd -d /usr/local/squid -s /sbin/nologin squid
# chown -R squid:squid /usr/local/squid/var/

��������Ώ�����(¾��䏢돪㏢����/usr/local/squid/etc/squid.conf.documented������»²¾���)
# vi /usr/local/squid/etc/squid.conf

### ACL
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl homenet src 192.168.11.0/24
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow homenet
http_access allow localhost
http_access deny all

# Squid normally listens to port 3128
http_port 8080 transparent

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /usr/local/squid/var/cache 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /usr/local/squid/var/cache

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.index.(html|htm)$ 0 40% 10080
refresh_pattern -i \.(html|htm|css|js)$ 1440 40% 40320
refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 ignore-reload ignore-no-cache ignore-no-store ignore-must-revalidate ignore-private
refresh_pattern -i \.(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90% 43200 ignore-reload ignore-no-cache ignore-no-store ignore-must-revalidate ignore-private
refresh_pattern -i \.(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|tiff)$ 10080 90% 43200 ignore-reload ignore-no-cache ignore-no-store ignore-must-revalidate ignore-private
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 40% 40320

### SEQULITY
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access Cache-Control deny all

### USE
cache_effective_user squid
cache_effective_group squid

### CACHE
maximum_object_size_in_memory 512 KB
maximum_object_size 10240 KB
cache_dir ufs /usr/local/squid/var/cache 1024 16 256

### LOGS
access_log /usr/local/squid/var/logs/access.log squid
cache_store_log /usr/local/squid/var/logs/store.log squid

### PID
pid_filename /usr/local/squid/var/run/squid.pid

### MEMORY
memory_pools on
memory_pools_limit 256 MB

���µ��������
# vi /etc/init.d/squid

#!/bin/bash
# squid This shell script takes care of starting and stopping
# Squid Internet Object Cache
#
# chkconfig: - 90 25
# description: Squid - Internet Object Cache. Internet object caching is \
# a way to store requested Internet objects (i.e., data available \
# via the HTTP, FTP, and gopher protocols) on a system closer to the \
# requesting site than to the source. Web browsers can then use the \
# local Squid cache as a proxy HTTP server, reducing access time as \
# well as bandwidth consumption.
# pidfile: /usr/local/squid/var/run/squid.pid
# config: /usr/local/squid/etc/squid.conf

PATH=/usr/local/squid/sbin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PATH

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# don't raise an error if the config file is incomplete
# set defaults instead:
#SQUID_OPTS=${SQUID_OPTS:-"-D"}
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}

# determine the name of the squid binary
[ -f /usr/local/squid/sbin/squid ] && SQUID=/usr/local/squid/sbin/squid

prog="$SQUID"

# determine which one is the cache_swap directory
CACHE_SWAP=`sed -e 's/#.*//g' /usr/local/squid/etc/squid.conf | \
grep cache_dir | awk '{ print $3 }'`
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/usr/local/squid/var/cache

RETVAL=0

start() {

#check if the squid conf file is present
if [ ! -f /usr/local/squid/etc/squid.conf ]; then
echo "Configuration file /usr/local/squid/etc/squid.conf missing" 1>&2
exit 6
fi
. /etc/sysconfig/squid

# don't raise an error if the config file is incomplete.
# set defaults instead:
#SQUID_OPTS=${SQUID_OPTS:-"-D"}
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}

if [ -z "$SQUID" ]; then
echo "Insufficient privilege" 1>&2
exit 4
fi

for adir in $CACHE_SWAP; do
if [ ! -d $adir/00 ]; then
echo -n "init_cache_dir $adir... "
$SQUID -z -F -D >> /usr/local/squid/var/logs/squid.out 2>&1
fi
done
echo -n $"Starting $prog: "
$SQUID $SQUID_OPTS >> /usr/local/squid/var/logs/squid.out 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
timeout=0;

while : ; do
[ ! -f /usr/local/squid/var/run/squid.pid ] || break
if [ $timeout -ge $SQUID_PIDFILE_TIMEOUT ]; then
RETVAL=1
break
fi
sleep 1 && echo -n "."
timeout=$((timeout+1))
done
fi
[ $RETVAL -eq 0 ] && touch /usr/local/squid/var/run/squid.pid
[ $RETVAL -eq 0 ] && echo_success
[ $RETVAL -ne 0 ] && echo_failure
echo
return $RETVAL
}

stop() {
. /etc/sysconfig/squid

# don't raise an error if the config file is incomplete.
# set defaults instead:
SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}

echo -n $"Stopping $prog: "
$SQUID -k check >> /usr/local/squid/var/logs/squid.out 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
$SQUID -k shutdown &
timeout=0
while : ; do
[ -f /usr/local/squid/var/run/squid.pid ] || break
if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
echo
return 1
fi
sleep 2 && echo -n "."
timeout=$((timeout+2))
done
echo_success
echo
else
echo_failure
if [ ! -e /usr/local/squid/var/run/squid.pid ]; then
RETVAL=0
fi
echo
fi
return $RETVAL
}

reload() {
. /etc/sysconfig/squid
# don't raise an error if the config file is incomplete.
# set defaults instead:
#SQUID_OPTS=${SQUID_OPTS:-"-D"}

$SQUID $SQUID_OPTS -k reconfigure
}

restart() {
stop
start
}

condrestart() {
[ -e /usr/local/squid/var/run/squid.pid ] && restart || :
}

rhstatus() {
status $SQUID && $SQUID -k check
}

probe() {
return 0
}

case "$1" in
start)
start
;;

stop)
stop
;;

reload)
reload
;;

restart)
restart
;;

condrestart)
condrestart
;;

status)
rhstatus
;;

probe)
exit 0
;;

*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 2
esac

exit $?

# chmod 755 /etc/init.d/squid
# chkconfig --add squid
# chkconfig squid on

# /etc/init.d/squid start

# ps awwxu | grep squid
root 10534 0.0 0.0 4008 592 pts/5 R+ 00:58 0:00 grep squid
root 12031 0.0 0.1 6832 1304 ? Ss Jan17 0:00 /usr/local/squid/sbin/squid
squid 12033 0.6 9.8 104416 101488 ? S Jan17 1:15 (squid)
squid 12040 0.0 0.0 2880 812 ? S Jan17 0:00 (unlinkd)
squid 14944 0.0 0.1 3212 1220 ? S 00:22 0:00 (dnsserver)
squid 14945 0.0 0.1 3212 1204 ? S 00:22 0:00 (dnsserver)
squid 14946 0.0 0.1 3212 1208 ? S 00:22 0:00 (dnsserver)
squid 14947 0.0 0.1 3212 1208 ? S 00:22 0:00 (dnsserver)
squid 14948 0.0 0.1 3212 1204 ? S 00:22 0:00 (dnsserver)
[root@fw-tuzzy etc]#

���������²���\��\���\­\·�����Ώ�����
# iptables -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
# iptables -t nat -A POSTROUTING -o eth0-s $_MY_NETWORK -j MASQUERADE

��eth1=\���\���\��ď��¼\���\���������NIC eth0=\��\������¼\Ð\���������NIC

���\���\��³������
# tail -F /usr/local/squid/var/logs/access.log
TCP_HIT|TCP_MEM_HIT���̏�������������µ���»���������������������

tuzzy92 at 01:21����Permalink����Comments(0)����

2010������12·���06������

vnc��돪�¾���¹½������

���³����������������������������

vnc-server-4.1.2-14.el5_5.4.i386
xorg-x11-twm-1.0.1-3.1.i386
xterm-215-8.el5_4.1.i386

�����䏪���䏢���������Ώ��·���ޏ��������Ð���³������

fonts-japanese.noarch

����½���²���µ��������»��Џ�����\���\¹\������¼\��������Ώ�����
# vncserver

You will require a password to access your desktops.

Password:
Verify:

New 'v-admin.localhost:1 (root)' desktop is v-admin.localhost:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/v-admin.localhost:1.log

#

����³������
# netstat -nap | grep -i vnc
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN 2602/Xvnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 2602/Xvnc
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 2602/Xvnc
tcp 0 0 :::6001 :::* LISTEN 2602/Xvnc
unix 2 [ ACC ] STREAM LISTENING 11587 2602/Xvnc /tmp/.X11-unix/X1
unix 3 [ ] STREAM CONNECTED 11749 2602/Xvnc /tmp/.X11-unix/X1
unix 3 [ ] STREAM CONNECTED 11747 2602/Xvnc /tmp/.X11-unix/X1
unix 3 [ ] STREAM CONNECTED 11745 2602/Xvnc /tmp/.X11-unix/X1
unix 3 [ ] STREAM CONNECTED 11744 2609/vncconfig
#

����vnc\���\������¼\�����������䏪�³
vnc

tuzzy92 at 01:52����Permalink����Comments(0)����

2010������11·���16������

vmware \���\���\¹\������¼\���\���\��

# ./vmware-install.pl
Creating a new VMware Server installer database using the tar4 format.

Installing VMware Server.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]

What is the directory that contains the init scripts?
[/etc/rc.d/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware]

The path "/usr/lib/vmware" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the manual files?
[/usr/share/man]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware]

The path "/usr/share/doc/vmware" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware Server 2.0.2 build-203138 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall.pl".

Before running VMware Server for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config.pl". Do you want this
program to invoke the command for you now? [yes]

Making sure services for VMware Server are stopped.

Stopping VMware autostart virtual machines:
Virtual machines [FAILED]
Stopping VMware management services:
VMware Virtual Infrastructure Web Access
VMware Server Host Agent [FAILED]
Stopping VMware services:
VMware Authentication Daemon [ OK ]
Virtual machine monitor [ OK ]

You must read and accept the End User License Agreement to continue.
Press enter to display it.

NOTICE: BY DOWNLOADING AND INSTALLING, COPYING OR OTHERWISE USING THE
SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS VMWARE MASTER END
USER LICENSE AGREEMENT ("EULA"). IF YOU DO NOT AGREE TO THE TERMS OF
THIS EULA, YOU MAY NOT DOWNLOAD, INSTALL, COPY OR USE THE SOFTWARE, AND
YOU MAY RETURN THE UNUSED SOFTWARE TO THE VENDOR FROM WHICH YOU ACQUIRED
IT WITHIN THIRTY (30) DAYS AND REQUEST A REFUND OF THE LICENSE FEE, IF
ANY, ALREADY PAID UPON SHOWING PROOF OF PAYMENT. "YOU" MEANS THE
NATURAL PERSON OR THE ENTITY THAT IS AGREEING TO BE BOUND BY THIS EULA,
THEIR EMPLOYEES AND THIRD PARTY CONTRACTORS THAT PROVIDE SERVICES TO
YOU. YOU SHALL BE LIABLE FOR ANY FAILURE BY SUCH EMPLOYEES AND THIRD
PARTY CONTRACTORS TO COMPLY WITH THE TERMS OF THIS AGREEMENT.

1. DEFINITIONS

1.1 "Designated Administrative Access" means that access to the
standard user interfaces of a given instance of the Software
(designated in this section) that you may grant to a designated
third party (a) for which you have provided advance written notice
to VMware that you are providing outsourced services and (b) for
whose dedicated benefit you have licensed such instance of the
Software. Designated Administrative Access is applicable only
where you are 1) an IT outsourcing company that is providing
outsourced IT services to a client company and 2) applicable only
to the following Software: ESX Server, VMware Server and
VirtualCenter.

1.2 "GPL Software" means GPL software licensed to you under the GNU
General Public License as published by the Free Software Foundation
(GPL). A copy of the GPL is included on the media on which you
received the Software or included in the files you downloaded, if
you acquired the Software by electronic download.

1.3 "Guest Operating Systems" means instances of third-party operating
systems licensed by you and installed in a Virtual Machine and run
using the Software.

1.4 "Licensed Additional Module" means additional modules that may be
provided with and/or used in conjunction with the Software for
which you have paid the applicable license fee and accepted any
applicable additional license terms.

1.5 "Open Source Software" means various open source software
components licensed under the terms of applicable open source
license agreements included in the materials relating to such
software. Open Source Software is composed of individual software
components, each of which has its own copyright and its own
applicable license conditions. The Open Source Software licenses
can be found in the open_source_licenses.txt file, other materials
accompanying the software package, the documentation or
corresponding source files available at
http://www.vmware.com/download/open_source.html.

1.6 "Processor" means a single, physical chip that houses no more than
four (4) processor cores.


1.7 "Sample Programs" means sample client management programs or
scripts that may be distributed with the Software.

1.8 "Server" means a single physical computer of a type that meets the
specifications as set forth in the applicable product documentation
posted at http://www.vmware.com/support/pubs/. Multiple computers
that share processing power or operate in a networked configuration
as a single logical computer, such as a "server farm" or similar
arrangement, constitute multiple Servers for the purpose of this
EULA.

1.9 "Software" means software products that are licensed to you under
this EULA, including, but not limited to, any related components
purchased or provided with the Software, application programming
interfaces, associated media, printed materials, online or
electronic documentation, and any updates and maintenance releases
thereto.

1.10 "Software License Key" means, if applicable, a serial number issued
to you by VMware to activate and use the Software. A separate,
additional Software License Key may be required to activate and use
each Licensed Additional Module.

1.11 "VMware Tools" means a suite of utilities and drivers that may
enhance the performance and functionality of your Guest Operating
System. VMware Tools may include some or all of the following,
depending on your Guest Operating System: an SVGA driver, a mouse
driver, the VMware Tools control panel and support for features
such as shared folders, drag and drop in Windows guests, shrinking
virtual disks, time synchronization with the host, VMware Tools
scripts, and connection and disconnection of devices while the
virtual machine is running.

1.12 "Virtual Machine" means an instance of a Guest Operating System and
any application programs installed thereon, running on a computing
device on which the Software is installed, or suspended to disk or
any other storage media accessible by the computing device.



2. EVALUATION LICENSES

2.1 General. If available, the Software and each Licensed Additional
Module may be activated with no-cost evaluation Software License
Key(s). You acknowledge that Evaluation Software License Keys have
an expiration date ("Expiration Date") and that VMware is not
obligated to permit further use of the Software.

2.2 Evaluation License. If you activate the Software or any Licensed
Additional Module with an evaluation Software License Key
("Evaluation Product") you may use the Evaluation Product until the
Expiration Date only to evaluate the suitability of the Evaluation
Product for licensing on a for-fee basis. You may acquire
evaluation Software License Key(s) for Licensed Additional Modules.
In such case, the Licensed Additional Modules are licensed to you
subject to the terms of this "EVALUATION LICENSES" section.

2.3 Evaluation Product Warranty Disclaimer. During the use of the
Evaluation Product, the limited 90-day warranty referenced in
Section 7.1 below is not applicable to you. THE EVALUATION PRODUCT
IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER
EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. VMWARE AND ITS
LICENSORS BEAR NO LIABILITY FOR ANY DAMAGES RESULTING FROM USE (OR
ATTEMPTED USE) OF THE EVALUATION PRODUCT THROUGH AND AFTER THE
EXPIRATION DATE.

2.4 No Support. VMware has no duty to provide support to you during
your use of the Evaluation Product.

3. GRANT AND USE RIGHTS FOR SOFTWARE.

3.1 License. The Software is licensed, not sold. Subject to the terms
of this EULA, VMware hereby grants you a non-exclusive, non-
transferable license, without rights to sublicense, to use the
object code of the Software for the purpose as set forth in the
applicable documentation for the Software and to the extent
permitted by your payment of applicable license fees under a VMware
approved licensing model and/or your Software License Key subject
to the software product specific terms specified in this EULA.
Depending upon the model utilized to compute the applicable license
fees paid by you to use the Software (whether per Processor, per
Virtual Machine, per user, or any other VMware approved licensing
model), an applicable Software License Key may limit your usage of
the Software accordingly. You may use the documentation
accompanying the Software in connection with permitted uses of the
Software. If the Software is a version that you have converted or
exchanged from a valid licensed prior version, you agree that by
using the Software you will no longer use the prior version.
VMware reserves the right to require the certification of the
destruction of such previous version of the Software.


3.2 License Limitations. You may not copy the Software except for a
reasonable number of machine-readable copies of the Software for
backup or archival purposes and except as expressly permitted in
this EULA. You may not remove any titles, trademarks or trade
names, copyright notices, legends, or other proprietary markings on
the Software. You are not granted any rights to any trademarks or
service marks of VMware. VMware retains all rights not expressly
granted to you in this EULA.

3.3 Restrictions. You may not (i) sell, lease, license, sublicense,
distribute or otherwise transfer in whole or in part the Software
or the Software License Key to another party; (ii) provide,
disclose, divulge or make available to, or permit use of the
Software in whole or in part by, any third party (except Designated
Administrative Access) without VMware's prior written consent; or
(iii) modify or create derivative works based upon the Software.
Except to the extent expressly permitted by applicable law, and to
the extent that VMware is not permitted by that applicable law to
exclude or limit the following rights, you may not decompile,
disassemble, reverse engineer, or otherwise attempt to derive
source code from the Software, in whole or in part. You may use
the Software to conduct internal performance testing and
benchmarking studies, the results of which you (and not
unauthorized third parties) may publish or publicly disseminate;
provided that VMware has reviewed and approved of the methodology,
assumptions and other parameters of the study. Please contact
VMware at [email protected] to request such review.

3.4 GPL Software. You can redistribute and/or modify the GPL Software
under the terms of the GPL. You may obtain a copy of the source
code corresponding to the binaries for the GPL Software (the "GPL
Source Files") by downloading the GPL Source Files from VMware's
Web site at http://www.vmware.com/download/open_source.html, or by
sending a request, with your name and address, to Vmware at the
address specified under the heading "Contact Information" below, in
which case Vmware will mail a copy of the GPL Source Files to you
on a CD or equivalent physical medium. This offer to obtain a copy
of the GPL Source Files is valid for three years from the date you
acquired this Software product.

3.5 VMware Tools. You may distribute the VMware Tools to any third
party provided that (i) you do not modify the VMware Tools; (ii)
you distribute the VMware Tools in object code format only and
solely in conjunction with, and as part of, the Virtual Machine you
create with the Software; (iii) you do not use VMware's name, logo
or trademarks to market the Virtual Machine you create with the
Software and (iv) you agree to indemnify, hold harmless, and defend
VMware from and against any claims or lawsuits, including
attorneys' fees, that arise or result from the use or distribution
of the Virtual Machine you create. Notwithstanding the foregoing,
you may refer to VMware names, logos or trademarks to indicate that
the Virtual Machine you create with the Software are compatible
with or designed for use with the Software.

3.6 Licenses required for third-party software. The Software enables
you to run multiple instances of third-party guest operating
systems and application programs. You are responsible for obtaining
any licenses necessary to operate any such third-party software,
including Guest Operating Systems.

3.7 Sample Programs. The Software may include Sample Programs. You
may use and distribute Sample Programs under the terms set forth in
the applicable Sample Programs files. VMware does not provide
support services for Sample Programs.

3.8 VMware License Programs. VMware makes available VMware License
programs (for e.g., VMware Academic License). If you have received
the Software pursuant to these VMware License programs, the then-
current terms and conditions posted on
http://www.vmware.com/download/eula/vmtn.html
for that program shall apply for use of the products under such
VMware License programs.

3.9 Audit Rights. You will maintain accurate records as to your use of
the Software as authorized by this EULA, for at least two (2) years
from the last day on which support and subscription services
("Services") expired for the applicable Software. VMware, or
persons designated by VMware, will, at any time during the period
when you are obliged to maintain such records, be entitled to
inspect such records and your computing devices, in order to verify
that the Software is used by you in accordance with the terms of
this EULA and that you have paid the applicable license fees and
Services fees for the Software; provided that VMware may conduct no
more than one (1) audit in any twelve (12) month period. You shall
promptly pay to VMware any underpayments revealed by any such
audit. Any such audit will be performed at VMware's expense during
normal business hours, provided that you shall promptly reimburse
VMware for the cost of such audit and any applicable fees if such
audit reveals an underpayment by you of more than five percent (5%)
of the amounts payable by you to VMware for the period audited.

4. TITLE. VMware retains all right, title, and interest in and to the
Software and the Software License Key and in all related
copyrights, trade secrets, patents, trademarks, and any other
intellectual and industrial property and proprietary rights,
including registrations, applications, renewals, and extensions of
such rights.

5. SUPPORT AND SUBSCRIPTION SERVICES NOT INCLUDED

VMware will not provide any support services under this EULA. This
EULA does not give you any rights to any updates or upgrades to the
Software or to any extensions or enhancements to the Software
developed by VMware at any time in the future. VMware may offer
support and subscription services separately. If you have
purchased VMware support and subscription services with the
Software, these services are provided to you under the Support
Contract Terms and Conditions posted on VMware's Web site at
http://www.vmware.com/support/ and by accepting the terms of this
EULA you are accepting these Support Contract Terms and Conditions.
Any supplemental software code or related materials that VMware
provides to you as part of any support and subscription services
are to be considered part of the Software and are subject to the
terms and conditions of this EULA. VMware may use any technical
information you provide to VMware for any VMware business purposes
without restriction, including for product support and development.
VMware will not use information in a form that personally
identifies you.

6. TERMINATION

6.1 Termination. VMware may terminate this EULA immediately and
without notice if you fail to comply with any term of this EULA.

6.2 Effect of Termination. In the event of termination, you must
destroy all copies of the Software and Software License Key. In
addition you must remove all copies of the Software, including all
backup copies, from the Server and all computers and terminals on
which it is installed. From time to time, VMware may change the
terms of this EULA. VMware will notify you of such change. Your
continued use of the Software will indicate your agreement to the
change.

7. LIMITED WARRANTY AND LIMITATION OF LIABILITY

7.1 Limited Warranty. VMware warrants that the media, if any, on which
the Software is delivered will be free of defects and that the Software
will substantially conform to the description contained in the
applicable end user documentation with respect to the particular
Software licensed under this EULA in each case for a period of 90 days
after the date of shipment of the Software License Key to you ("Warranty
Period"). If during the Warranty Period the media is defective and the
version of that Software is still commercially available, your sole
remedy will be that VMware shall, at its option, repair or replace the
defective media returned to VMware within the Warranty Period. If you
are returning a defective media, please email VMware at [email protected]
to request a Return Authorization number (RMA) and further instructions.
If during the Warranty Period the Software does not substantially
conform to the description contained in the applicable end user
documentation, your sole remedy will be that VMware shall, at it option,
correct the defects in the Software or refund the license fees you paid,
if any, related to the Software provided that (a) the Software has been
properly installed and used at all times and in accordance with the
instructions in the applicable end user documentation; (b) no
modification, alteration or addition has been made to the Software
product by persons other than VMware or VMware's authorized
representative; and (c) VMware receives written notice of the non-
conformity within ninety (90) days following shipment. EXCEPT FOR THE
PRECEDING EXPRESS LIMITED WARRANTY, TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE MANDATORY LAW, VMWARE AND ITS LICENSORS PROVIDE THE SOFTWARE
WITHOUT ANY WARRANTIES OF ANY KIND, EXPRESS, IMPLIED, STATUTORY, OR IN
ANY OTHER PROVISION OF THIS EULA OR COMMUNICATION WITH YOU, AND VMWARE
AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

7.2 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE MANDATORY LAW, IN NO EVENT WILL VMWARE AND ITS LICENSORS BE
LIABLE FOR ANY LOST PROFITS OR BUSINESS OPPORTUNITIES, LOSS OF USE,
BUSINESS INTERRUPTION, LOSS OF DATA, OR ANY OTHER INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES UNDER ANY THEORY OF LIABILITY,
WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, PRODUCT LIABILITY, OR
OTHERWISE. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE
PRECEDING LIMITATION MAY NOT APPLY TO YOU. VMWARE AND ITS LICENSORS'
LIABILITY UNDER THIS EULA WILL NOT, IN ANY EVENT, EXCEED THE LICENSE
FEES, IF ANY, PAID BY YOU FOR THE SOFTWARE LICENSED TO YOU UNDER THIS
EULA. THE FOREGOING LIMITATIONS SHALL APPLY TO THE MAXIMUM EXTENT
PERMITTED BY APPLICABLE LAW, REGARDLESS OF WHETHER VMWARE OR ITS
LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND
REGARDLESS OF WHETHER ANY REMEDY FAILS OF ITS ESSENTIAL PURPOSE.

8. GENERAL

8.1 Entire Agreement. This Agreement sets forth VMware's entire
liability and your exclusive remedy with respect to the Software
and supersedes the terms of any purchase orders and any other
communications or advertising with respect to the Software. You
acknowledge that this Agreement is a complete statement of the
agreement between you and VMware with respect to the Software, and
that there are no other prior or contemporaneous understandings,
promises, representations, or descriptions with respect to the
Software.

8.2 Headings. Headings under this EULA are intended only for
convenience and shall not affect the interpretation of this EULA.

8.3 Waiver and Modification. No failure of either party to exercise or
enforce any of its rights under this EULA will act as a waiver of
those rights. This EULA may only be modified, or any rights under
it waived, by a written document executed by the party against
which it is asserted.

8.4 Severability. If any provision of this EULA is found illegal or
unenforceable, it will be enforced to the maximum extent
permissible, and the legality and enforceability of the other
provisions of this EULA will not be affected.

8.5 Governing Law. This EULA will be governed by California law and
the United States of America, without regard to its choice of law
principles. The United Nations Convention for the International
Sale of Goods shall not apply.

8.6 Government Restrictions. You may not export or re-export the Soft-
ware except in compliance with the United States Export
Administration Act and the related rules and regulations and
similar non-U.S. government restrictions, if applicable. The
Software and accompanying documentation are deemed to be
"commercial computer software" and "commercial computer software
documentation," respectively, pursuant to DFAR Section 227.7202 and
FAR Section 12.212(b), as applicable. Any use, modification,
reproduction, release, performing, displaying, or disclosing of the
Software by the U.S. Government shall be governed solely by the
terms of this EULA.

8.7 Contact Information. If you have any questions about this EULA, or
if you want to contact VMware for any reason, please direct all
correspondence to: VMware, Inc., 3401 Hillview Avenue, Palo Alto,
CA 94304, United States of America or email [email protected].

8.8 Other. VMware and VMTN are trademarks and/or registered trademarks
of VMware, Inc. in the United States and/or various jurisdictions.


9. SOFTWARE PRODUCT SPECIFIC TERMS AND CONDITIONS

In addition to the above, the following Software products shall also be
subject to the following terms and conditions set forth below. In the
event of any conflict between the following product-specific terms and
conditions and the preceding sections, the product-specific terms and
conditions shall control.

9.1 VMware Server:
(a) Additional Definitions:
"Redistributable Components" means the Programming API library that may
be provided in conjunction with the Software and licensed under the
Redistributable Components product specific terms and conditions.
"VirtualCenter Server Software" is a proprietary component of the
Software which includes, without limitation, the management agent
software that is installed on each managed Server and a proprietary Web
Service Interface.
"VMware Virtual Infrastructure Client Software" is a proprietary client
component of the Software that provides the user interface and enables
management of the Software.
"VMware WebAccess" is a proprietary component that provides console
access to and management of Virtual Machines created with the Software.
"Web Service Interface" means a programmatic interface to perform
management operations on Servers that are activated for management by
the VirtualCenter Server Software through software programs written by
you or a third party.
(b) Additional License Terms:
VMware grants you a nonexclusive, nontransferable license, without
rights to sublicense, to (i) install or have installed a single instance
of the Software and each Licensed Additional Module on a single Server,
unless permitted by VMware to have multiple instances on a single Server
or to have multiple instances on multiple Servers; (ii) use the Software
and each Licensed Additional Module solely for information processing
and computing purposes, including the hosting of computer application-
based services from a Virtual Machine and provision of such services via
an internal or external network, provided such services may not consist
of services to a third party that provide primarily computing or
processing power (such as utility computing or grid computing) or any
computer application-based service that is traded, rented, leased or
sold on a Virtual Machine basis; and (iii) use and reproduce the VMware
Virtual Infrastructure Client Software or VMware WebAccess (in object
code form only) for the purposes of installation and operation on an
unlimited number of your own internal computers or terminals solely for
the purpose of accessing the Server on which the Software is installed;
(iv) internally use and reproduce the Redistributable Components to
create programs that interface with the Redistributable Components to
manage Virtual Machines ("Your Management Programs"); and (v) internally
use Your Management Programs solely for the purpose of managing Virtual
Machines operated on VMware software products installed on your own
internal Servers and computers. Subject to the above, each copy of the
Software may not be used by any other person, whether or not such person
is employed by or otherwise associated with your entity.
Distributing the Software. VMware Server is intended for your personal
non-commercial use only. If you are interested in distributing the
Software for internal or external use, promotion, review or as part of a
solution, please apply now at http://www.vmware.com/go/distribution.





Do you accept? (yes/no)yes

Thank you.

The bld-2.6.18-8.el5-i686smp-RHEL5 - vmmon module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5 - vmci module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5 - vsock module loads perfectly into the
running kernel.

Do you want networking for your virtual machines? (yes/no/help) [yes]

Configuring a bridged network for vmnet0.

Please specify a name for this network.
[Bridged]

The following bridged networks have been defined:

. vmnet0 is bridged to eth0

All your ethernet interfaces are already bridged.

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes]

Configuring a NAT network for vmnet8.

Please specify a name for this network. [NAT]

Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes]

Probing for an unused private subnet (this can take some time)...

The subnet 172.16.201.0/255.255.255.0 appears to be unused.

The following NAT networks have been defined:

. vmnet8 is a NAT network on private subnet 172.16.201.0.

Do you wish to configure another NAT network? (yes/no) [no]

Do you want to be able to use host-only networking in your virtual machines?
[yes]

Configuring a host-only network for vmnet1.

Please specify a name for this network.
[HostOnly]

Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes]

Probing for an unused private subnet (this can take some time)...

The subnet 172.16.127.0/255.255.255.0 appears to be unused.

The following host-only networks have been defined:

. vmnet1 is a host-only network on private subnet 172.16.127.0.

Do you wish to configure another host-only network? (yes/no) [no]

The bld-2.6.18-8.el5-i686smp-RHEL5 - vmnet module loads perfectly into the
running kernel.

Please specify a port for remote connections to use [902]

Please specify a port for standard http connections to use [8222]

Please specify a port for secure http (https) connections to use [8333]

The current administrative user for VMware Server is ''. Would you like to
specify a different administrator? [no]

Using root as the VMware Server administrator.

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines] /Virtual

Please enter your 20-character serial number.

Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: A0N4M-FYL2T-UF3FM-4K135

Creating a new VMware VIX API installer database using the tar4 format.

Installing VMware VIX API.

In which directory do you want to install the VMware VIX API binary files?
[/usr/bin]

In which directory do you want to install the VMware VIX API library files?
[/usr/lib/vmware-vix/lib]

The path "/usr/lib/vmware-vix/lib" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the VMware VIX API document pages?
[/usr/share/doc/vmware-vix]

The path "/usr/share/doc/vmware-vix" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware VIX API 1.6.2 build-203138 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl".

Enjoy,

--the VMware team

Starting VMware services:
Virtual machine monitor [ OK ]
Virtual machine communication interface [ OK ]
VM communication interface socket family: [ OK ]
Virtual ethernet [ OK ]
Bridged networking on /dev/vmnet0 [ OK ]
Host-only networking on /dev/vmnet1 (background) [ OK ]
DHCP server on /dev/vmnet1 [ OK ]
Host-only networking on /dev/vmnet8 (background) [ OK ]
DHCP server on /dev/vmnet8 [ OK ]
NAT service on /dev/vmnet8 [ OK ]
VMware Server Authentication Daemon (background) [ OK ]
Shared Memory Available [ OK ]
Starting VMware management services:
VMware Server Host Agent (background) [ OK ]
VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
Virtual machines [ OK ]

The configuration of VMware Server 2.0.2 build-203138 for Linux for this
running kernel completed successfully.

#

tuzzy92 at 22:26����Permalink����Comments(0)����

2010������11·���01������

mail from smartd �������½������3����

¹¹������������𡯏�����

--------------------- Smartd Begin ------------------------

Currently unreadable (pending) sectors detected:
/dev/hdd - 48 Time(s)
2 unreadable sectors detected

Offline uncorrectable sectors detected:
/dev/hdd - 48 Time(s)
4 offline uncorrectable sectors detected

---------------------- Smartd End -------------------------

tuzzy92 at 19:45����Permalink����Comments(0)����

2010������10·���12������

mail from smartd �������½������2����

������𡯏�����

--------------------- Smartd Begin ------------------------


Currently unreadable (pending) sectors detected:
/dev/hdd - 48 Time(s)
2 unreadable sectors detected

Offline uncorrectable sectors detected:
/dev/hdd - 48 Time(s)
3 offline uncorrectable sectors detected

---------------------- Smartd End -------------------------

tuzzy92 at 01:14����Permalink����Comments(0)����

2010������09·���29������

mail from smartd

�����������̏����ď�����������������\���\���\»���¼\���

���µ������������²��ď�����»����������«����

--------------------- Smartd Begin ------------------------


Currently unreadable (pending) sectors detected:
/dev/hdd - 48 Time(s)
2 unreadable sectors detected

Offline uncorrectable sectors detected:
/dev/hdd - 48 Time(s)
2 offline uncorrectable sectors detected

---------------------- Smartd End -------------------------

tuzzy92 at 00:17����Permalink����Comments(0)����

2010������07·���26������

LVM������»����·�����������Ώ�����

�����叢���я����������������ď�ԏ�����HDD������\¹\���\������¼\�������������������»��ӏ����ҏ��·�����ď��«�����������ď������������̏�����¡�


���\��Џ��¼\���\��\·\���\���¾��؏�����
Disk /dev/hdd: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 1 36483 293049666 8e Linux LVM

���PV(�����쏪����\���\���\������¼\���)��돫�����
# pvcreate /dev/hdd1
# pvdisplay
--- Physical volume ---
PV Name /dev/hdd1
VG Name HDD
PV Size 279.47 GB / not usable 1.31 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 71545
Free PE 7545
Allocated PE 64000
PV UUID XOzpWn-3cZr-KqDr-4Cmx-U0sz-6FLR-B3LKfX

���VG(\���\���\������¼\���\��\������¼\��)��돫�����
# vgcreate HDD /dev/hdd1
# vgdisplay
--- Volume group ---
VG Name HDD
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 279.47 GB
PE Size 4.00 MB
Total PE 71545
Alloc PE / Size 64000 / 250.00 GB
Free PE / Size 7545 / 29.47 GB
VG UUID FYDF2B-VzfF-IlS8-QG1f-O0m0-VTOC-GFwmuC

���LV(������������\���\���\������¼\���)��돫�����
# lvcreate -n MEDIA --size 5G HDD
# lvcreate -n BACKUP --size 200G HDD

# lvdisplay
--- Logical volume ---
LV Name /dev/HDD/MEDIA
VG Name HDD
LV UUID Yk1s2d-CTbG-39vq-RItQ-Cqmp-vhK5-dwrU6B
LV Write Access read/write
LV Status available
# open 1
LV Size 5.00 GB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/HDD/BACKUP
VG Name HDD
LV UUID Qwtp5z-G2cY-SWP4-u7I7-5BYt-TZZX-A2esD3
LV Write Access read/write
LV Status available
# open 1
LV Size 200.00 GB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

���\���\���\���\���\·\¹\���\�����돩�������������\���\���\���\���
# mkfs.ext3 /dev/HDD/MEDIA
# mkfs.ext3 /dev/HDD/BACKUP

# mkdir /MEDIA
# mkdir /BACKUP

# mount -t ext3 /dev/HDD/MEDIA /MEDIA
# mount -t ext3 /dev/HDD/BACKUP /BACKUP

��fstab
/dev/HDD/MEDIA /MEDIA ext3 defaults 1 2
/dev/HDD/BACKUP /BACKUP ext3 defaults 1 2

���³������\(5G���10G) ��\���\���\���\���\���OK
# lvextend -L +5G /dev/HDD/MEDIA
Extending logical volume MEDIA to 10.00 GB
Logical volume MEDIA successfully resized

# resize2fs /dev/HDD/MEDIA 10G
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/HDD/MEDIA is mounted on /MEDIA; on-line resizing required
Performing an on-line resize of /dev/HDD/MEDIA to 2621440 (4k) blocks.
The filesystem on /dev/HDD/MEDIA is now 2621440 blocks long.

# lvdisplay
--- Logical volume ---
LV Name /dev/HDD/MEDIA
VG Name HDD
LV UUID Yk1s2d-CTbG-39vq-RItQ-Cqmp-vhK5-dwrU6B
LV Write Access read/write
LV Status available
# open 1
LV Size 10.00 GB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/HDD/BACKUP
VG Name HDD
LV UUID Qwtp5z-G2cY-SWP4-u7I7-5BYt-TZZX-A2esD3
LV Write Access read/write
LV Status available
# open 1
LV Size 200.00 GB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

���½���¾���(10G���5G) ��\���\���\���\���\��я�����������������
# umount /MEDIA/
# resize2fs /dev/HDD/MEDIA 5G
resize2fs 1.39 (29-May-2006)
Please run 'e2fsck -f /dev/HDD/MEDIA' first.

# e2fsck -f /dev/HDD/MEDIA
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/HDD/MEDIA: 97/1310720 files (63.9% non-contiguous), 149272/2621440 blocks
# resize2fs /dev/HDD/MEDIA 5G
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/HDD/MEDIA to 1310720 (4k) blocks.
The filesystem on /dev/HDD/MEDIA is now 1310720 blocks long.

#

# lvreduce -L 5G /dev/HDD/MEDIA
WARNING: Reducing active logical volume to 5.00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce MEDIA? [y/n]: y
Reducing logical volume MEDIA to 5.00 GB
Logical volume MEDIA successfully resized
#

# lvdisplay
--- Logical volume ---
LV Name /dev/HDD/MEDIA
VG Name HDD
LV UUID Yk1s2d-CTbG-39vq-RItQ-Cqmp-vhK5-dwrU6B
LV Write Access read/write
LV Status available
# open 0
LV Size 5.00 GB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/HDD/BACKUP
VG Name HDD
LV UUID Qwtp5z-G2cY-SWP4-u7I7-5BYt-TZZX-A2esD3
LV Write Access read/write
LV Status available
# open 1
LV Size 200.00 GB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

#

# mount -t ext3 /dev/HDD/MEDIA /MEDIA/

tuzzy92 at 21:42����Permalink����Comments(0)����

2010������06·���22������

µ�ߏ��·�����ӏ�����������LVS�����Ώ��������·�����ď�����������������������������»���

��򏢱µ������µ­½���
virtual=192.168.11.200:80
real=192.168.11.71:80 gate 1
real=192.168.11.72:80 gate 1
scheduler=wrr
protocol=tcp

# /etc/init.d/ldirectord status
Error [10079] reading file /etc/ha.d/ldirectord.cf at line 8: Unknown command real=192.168.11.71:80 gate 1

��ha-log(��������)
ResourceManager[4859]: 2010/06/22_18:57:32 ERROR: Return code 2 from /etc/ha.d/resource.d/ldirectord


���½������µ(\���\��ӏ�����²���)
virtual=192.168.11.200:80
[tab]real=192.168.11.71:80 gate 1
[tab]real=192.168.11.72:80 gate 1
[tab]scheduler=wrr
[tab]protocol=tcp

²���·���
����돢�«���������³�����Ï����������������ď��������ޏ���



tuzzy92 at 19:49����Permalink����Comments(0)����

2010������04·���20������

zabbix����½�������䏪���Ώ����������ԏ���

����zabbix������¼��HP
http://www.zabbix.com/

����zabbix�����я�����¼��HP
http://www.zabbix.jp/


001


²��ď�����¹�����𡯏����돢��������¼���������¡�


002


����I agree��¡ߏ�����\���\��\���\������·����������¼���������¡�


003


���������������ok��¡ߏ���������������³���������·����������¼���������¡�


004


����Test cennection��¡ߏ�����\���\���\���\������·����������ok��¡ߏ���������������¼���������¡�


005


\���\���\���\���\�����������������������¼���������¡�


006


³���������·����������¼���������¡�


007


����Configuration file: ok��¡ߏ�����³���������·����������¼���������¡�


008


���돪�»���쏢���쏪�������������������������·�����ď�¡�

tuzzy92 at 01:25����Permalink����Comments(0)����

2010������04·���18������

zabbix����\�����¼\���\��\���\��������ԏ���

����zabbix������¼��HP
http://www.zabbix.com/

����zabbix�����я�����¼��HP
http://www.zabbix.jp/

���\���\���\¹\������¼\���������������(CentOS FreeBSD����Ï�����)
# wget http://prdownloads.sourceforge.net/zabbix/zabbix-1.6.9.tar.gz
# tar xvfz zabbix-1.6.9.tar.gz
# cd zabbix-1.6.9 ; pwd
# ./configure --prefix=/usr/local/zabbix --enable-agent && make
# make install

���CentOS
���\��\«\���\���\�����돫�����
# useradd zabbix -d /usr/local/zabbix -s /sbin/nologin

��Ï����Ώ�����
# cp -ip /usr/local/src/zabbix-1.6.9/misc/conf/zabbix_agentd.conf /usr/local/zabbix/etc/zabbix_agent.conf
# vi /usr/local/zabbix/etc/zabbix_agent.conf

Server=127.0.0.1(\������¼\«\���������¾���¹���)
Server=192.168.11.61(\���\������¼\���������¾���¹���)
Timeout=3
PidFile=/usr/local/zabbix/var/run/zabbix_agent.pid
LogFile=/usr/local/zabbix/var/log/zabbix_agent.log

# mkdir -p /usr/local/zabbix/var/run/
# mkdir /usr/local/zabbix/var/log
# chown -R zabbix:zabbix /usr/local/zabbix/var

���µ��������\¹\���\���\��\���
# cp -ip /usr/local/src/zabbix-1.6.9/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/.
# vi /etc/init.d/zabbix_agentd

# diff /usr/local/src/zabbix-1.6.9/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/.
19c19
< BASEDIR=/opt/zabbix
---
> BASEDIR=/usr/local/zabbix
25c25,28
< FULLPATH=$BASEDIR/bin/$BINARY_NAME
---
> FULLPATH=$BASEDIR/sbin/$BINARY_NAME
>
> # Conf file
> CONFFILE=$BASEDIR/etc/zabbix_agent.conf
28c31
< PIDFILE=/var/tmp/$BINARY_NAME.pid
---
> PIDFILE=$BASEDI/var/run/$BINARY_NAME.pid
68c71
< action $"Starting $BINARY_NAME: " $FULLPATH
---
> action $"Starting $BINARY_NAME: " $FULLPATH -c $CONFFILE

# chkconfig --add zabbix_agentd
# chkconfig zabbix_agentd on
# chkconfig --list zabbix_agentd
zabbix_agentd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
#

���FreeBSD
���\��\«\���\���\�����돫�����
# pw useradd zabbix -d /usr/local/zabbix -s /sbin/nologin

��Ï����Ώ�����
# mkdir /etc/zabbix
# vi /etc/zabbix/zabbix_agentd.conf
# cat /etc/zabbix/zabbix_agentd.conf
Server=192.168.11.61
Timeout=3
PidFile=/usr/local/zabbix/var/run/zabbix_agent.pid
LogFile=/usr/local/zabbix/var/log/zabbix_agent.log

# mkdir -p /usr/local/zabbix/var/run/
# mkdir /usr/local/zabbix/var/log
# chown -R /usr/local/zabbix/var

���µ��������\¹\���\���\��\���
# cp -ip /usr/local/src/zabbix-1.6.9/misc/init.d/freebsd/zabbix_agentd /usr/local/etc/rc.d/zabbix_agentd
# cat /usr/local/etc/rc.d/zabbix_agentd

#!/bin/sh

. /etc/rc.subr

name="zabbix_agentd"
load_rc_config ${name}
rcvar=`set_rcvar`
command="${prefix:-"/usr/local/zabbix"}/sbin/${name}"

run_rc_command "$1"

tuzzy92 at 23:55����Permalink����Comments(0)����

2010������04·���14������

zabbix����\µ���¼\Ð�����ԏ���

Xymon�����ҏ����䏪���ӏ��·��������������������ď��\«·�����
���ޏ����������쏢����2����䏢����»��������������������ď��³���������������·(���µ�����·���)zabbix������\µ���¼\Ð�����»��������ҏ��·�����������Ώ����ď�¡�

���Ï��ޏ����������쏢���я�����¼��HP
http://www.tbs.co.jp/anime/k-on/
==========

����zabbix������¼��HP
http://www.zabbix.com/

����zabbix�����я�����¼��HP
http://www.zabbix.jp/

���\���\���\¹\������¼\���������������
# pwd
/usr/local/src

# wget http://prdownloads.sourceforge.net/zabbix/zabbix-1.6.9.tar.gz
# tar xvfz zabbix-1.6.9.tar.gz
# cd zabbix-1.6.9 ; pwd
# # ./configure --prefix=/usr/local/zabbix \
--enable-server \
--with-mysql=/usr/local/mysql/bin/mysql_config \
--with-net-snmp=/usr/local/snmpd/bin/net-snmp-config
# make
# make install

���\��\«\���\���\�����돫�����
# useadd zabbix -d /usr/local/zabbix -s /sbin/nologin
# # id zabbix ; finger zabbix
uid=9002(zabbix) gid=9003(zabbix) groups=9003(zabbix)
Login: zabbix Name: (null)
Directory: /usr/local/zabbix Shell: /sbin/nologin
Never logged in.
No mail.
No Plan.

���MySQL¼��Џ�����
# /usr/local/mysql/bin/mysql
> create database zabbix;
> grant all privileges on zabbix.* to zabbixuser@localhost identified by '\���\¹\������¼\���';
> select host,user,password from mysql.user where user = 'zabbixuser';
+-----------+------------+-------------------------------------------+
| host | user | password |
+-----------+------------+-------------------------------------------+
| localhost | zabbixuser | *EB78EF437313CE03C5371F9E2D46CE0CCCFA2245 |
+-----------+------------+-------------------------------------------+

����½��������\������¼\��ď���·¹��Џ�����
# cd create/schema/ ; pwd
/usr/local/src/zabbix-1.6.9/create/schema
# cat mysql.sql | /usr/local/mysql/bin/mysql zabbix

# cd ../data/ ; pwd
/usr/local/src/zabbix-1.6.9/create/data
# cat images_mysql.sql | /usr/local/mysql/bin/mysql zabbix
cat data.sql | /usr/local/mysql/bin/mysql zabbix

���½��ԏ��¹�����Ώ�����
# mkdir /usr/local/zabbix/etc/
# mkdir -p /usr/local/zabbix/var/run/
# mkdir /usr/local/zabbix/var/log

# cp -ip /usr/local/src/zabbix-1.6.9/misc/conf/zabbix_server.conf /usr/local/zabbix/etc/.

# vi /usr/local/zabbix/etc/zabbix_server.conf
# cat /usr/local/zabbix/etc/zabbix_server.conf

SenderFrequency=30
DebugLevel=3
Timeout=5

PidFile=/usr/local/zabbix/var/run/zabbix_server.pid
LogFile=/usr/local/zabbix/var/log/zabbix_server.log
AlertScriptsPath=/usr/local/zabbix/bin

DBName=zabbix
DBUser=zabbixuser
DBPassword=\���\¹\������¼\���
DBSocket=/tmp/mysql.sock

����µ��������\¹\���\���\��\���
# cp -ip /usr/local/src/zabbix-1.6.9/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server
# vi /etc/init.d/zabbix_server

# diff /usr/local/src/zabbix-1.6.9/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server
19c19
< BASEDIR=/opt/zabbix
---
> BASEDIR=/usr/local/zabbix
25c25,28
< FULLPATH=$BASEDIR/bin/$BINARY_NAME
---
> FULLPATH=$BASEDIR/sbin/$BINARY_NAME
>
> # Conf file
> CONFFILE=$BASEDIR/etc/zabbix_server.conf
28c31
< PIDFILE=/var/tmp/$BINARY_NAME.pid
---
> PIDFILE=$BASEDIR/var/tmp/$BINARY_NAME.pid
68c71
< action $"Starting $BINARY_NAME: " $FULLPATH
---
> action $"Starting $BINARY_NAME: " $FULLPATH -c $CONFFILE
#

# chkconfig --add zabbix_server
# chkconfig zabbix_server on
# chkconfig --list zabbix_server
zabbix_server 0:off 1:off 2:on 3:on 4:on 5:on 6:off

���apache¼��Џ�����
# mkdir /usr/local/apache2/htdocs/zabbix/
# cp -ipR /usr/local/src/zabbix-1.6.9/frontends/php/* /usr/local/apache2/htdocs/zabbix/.
# vi /usr/local/apache2/htdocs/zabbix/include/db.inc.php

�񡯏�����¹¹������
if(!isset($DB)){
$DB = array();
if(isset($DB_TYPE)) $DB['TYPE'] = "MYSQL" ;
if(isset($DB_SERVER)) $DB['SERVER'] = "localhost" ;
if(isset($DB_PORT)) $DB['PORT'] = "3306" ;
if(isset($DB_DATABASE)) $DB['DATABASE'] = "zabbix" ;
if(isset($DB_USER)) $DB['USER'] = "zabbixuser" ;
if(isset($DB_PASSWORD)) $DB['PASSWORD'] = "\���\¹\������¼\���" ;
}

���³������
http://your.domain/zabbix/index.php

tuzzy92 at 03:21����Permalink����Comments(0)����

2009������12·���15������

Xymon�����������������������»���(���½������2 \���\���\���\��\���\��������Ώ�����)

��򏢱���¼��HP
����Xymon
http://hobbitmon.sourceforge.net/

���\��\«\���\���\�����돫�����(\·\��\���������»������ď��»����������̏���ߏ��̏��������������«�����������ԏ���������)
# groutadd -g 1000 xymon
# useradd -u 1000 -g 1000 -m -d /usr/local/habbit -s /bin/bash xymon
# passwd xymon

���xymon \���\���\���\��\���\���\���\���\¹\������¼\���
# wget http://downloads.sourceforge.net/project/hobbitmon/hobbitserver/4.2.2/xymon-4.2.2.tar.gz?use_mirror=jaist

# tar xvfz xymon-4.2.2.tar.gz
# cd xymon-4.2.2 ; pwd

��CentOS������¾���¹���
# ./configure --client

��FreeBSD������¾���¹���
# 'MAKE=gmake ./configure.client'

==================================================
Configuration script for Xymon client

This script asks a few questions and builds a Makefile to compile Xymon

Checking your make-utility

Xymon normally keeps all of the client configuration files
on the Xymon server. If you prefer, it is possible to use
a local client configuration file instead - if so, answer
'client' to the next question.
NB: Local configuration requires the PCRE libs on each host.

Server side client configuration, or client side [server] ?

Checking for Large File Support ...
Large File Support OK

What userid will be running Xymon [xymon] ?

Found passwd entry for user xymon:x:1000:1000::/usr/local/xymon:/bin/bash

Where do you want the Xymon installation [/usr/local/xymon] ?

OK, will configure to use /usr/local/xymon as the Xymon toplevel directory

What is the IP-address of your Xymon server [127.0.0.1] ?
192.168.11.73

Using Linux Makefile settings

Created Makefile with the necessary information to build Xymon
Some defaults are used, so do look at the Makefile before continuing.

Configuration complete - now run make (GNU make) to build the tools
==================================================

��CentOS������¾���¹���
# make && make install

��FreeBSD������¾���¹���
# gmake && gmake install

���µ��������\¹\���\���\��\��������Ώ�����
# cp -ip ./rpm/hobbit-client.init /etc/init.d/xymon-client
# chown root:root /etc/init.d/xymon-client
# chmod 755 /etc/init.d/xymon-client
# chkconfig --add xymon-client

# cat /etc/init.d/xymon-client
��½��ԏ��¹������¹¹(���µ���¹������µ��������\¹\���\���\��\������̏��¹���²���¼\���\�ޏ�����������������)

#! /bin/sh
#
# hobbit-client This shell script takes care of starting and stopping
# the hobbit client.
#
# chkconfig: 2345 80 20
# description: hobbit is a network monitoring tool that allows \
# you to monitor hosts and services. This client reports local \
# system statistics (cpu-, memory-, disk-utilisation etc) \
# to the Hobbit server.

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/xymon/client/runclient.sh
NAME=xymon
DESC=xymon

test -x $DAEMON || exit 0

CMD="$1"

# Include hobbit-client defaults if available
#DMNOPTS=""
#if [ -f /etc/default/hobbit-client ] ; then
# . /etc/default/hobbit-client
#else
# echo "Installation failure - missing /etc/default/hobbit-client"
# exit 1
#fi

#if [ "$HOBBITSERVERS" = "" ]; then
# echo "Please configure HOBBITSERVERS in /etc/default/hobbit-client"
# exit 1
#fi

#set $HOBBITSERVERS
#if [ $# -eq 1 ]; then
# echo "BBDISP=\"$HOBBITSERVERS\"" >/var/run/hobbitclient-runtime.cfg
# echo "BBDISPLAYS=\"\"" >>/var/run/hobbitclient-runtime.cfg
#else
# echo "BBDISP=\"0.0.0.0\"" >/var/run/hobbitclient-runtime.cfg
# echo "BBDISPLAYS=\"$HOBBITSERVERS\"" >>/var/run/hobbitclient-runtime.cfg
#fi

if [ "$CLIENTHOSTNAME" != "" ]; then
DMNOPTS="${DMNOPTS} --hostname=${CLIENTHOSTNAME}"
fi
if [ "$CLIENTOS" != "" ]; then
DMNOPTS="${DMNOPTS} --os=${CLIENTOS}"
fi

set -e

case "$CMD" in
start)
echo -n "Starting $DESC: "
su -c "$DAEMON $DMNOPTS start" - xymon
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
su -c "$DAEMON stop" - xymon
echo "$NAME."
;;
status)
su -c "$DAEMON status" - xymon
;;
restart)
echo -n "Restarting $DESC: "
su -c "$DAEMON stop" - xymon
su -c "$DAEMON $DMNOPTS start" - xymon
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|status|restart}" >&2
echo "Usage: $N {start|stop|status|restart}" >&2
exit 1
;;
esac

exit 0

���\µ���¼\Ð�����Ï����Ώ�����
/usr/local/xymon/server/etc/bb-hosts �������돪�²¼������²���

[ip\��\���\���\¹] [\���\¹\������¾]


tuzzy92 at 20:30����Permalink����Comments(0)����

2009������12·���14������

Xymon�����������������������»���(���½������1 \µ���¼\Ð�����Ώ�����)

��򏢱���¼��HP
����Xymon
http://hobbitmon.sourceforge.net/

����fping
http://www.fping.com/

���fping\���\���\¹\������¼\���
# wget http://fping.sourceforge.net/download/fping.tar.gz
# tar xvfz fping.tar.gz
# cd cd fping-2.4b2_to ; pwd
# ./configure && make && make install

���\��\«\���\���\�����돫�����(\·\��\���������»������ď��»����������̏���ߏ��̏��������������«�����������ԏ���������)
# groutadd -g 1000 xymon
# useradd -u 1000 -g 1000 -m -d /usr/local/habbit -s /bin/bash xymon
# passwd xymon

���xymon\���\���\¹\������¼\���
��What is the IP-address of this host [127.0.0.1] ? ���������ԏ���̡돪�³�돢����\���\���\���\���\���

# wget http://downloads.sourceforge.net/project/hobbitmon/hobbitserver/4.2.2/xymon-4.2.2.tar.gz?use_mirror=jaist
# tar xvzf xymon-4.2.2.tar.gz
# cd xymon-4.2.2 ; pwd
# ./configure

==================================================
Configuration script for Xymon
This script asks a few questions and builds a Makefile to compile Xymon

Checking your make-utility
Checking pre-requisites for building Xymon

Checking for fping ...
Hobbit has a built-in ping utility (hobbitping)
However, it is not yet fully stable and therefore it
may be best to use the external fping utility instead.
I found fping in /usr/local/sbin/fping
Do you want to use it [Y/n] ?
y
Checking to see if '/usr/local/sbin/fping 127.0.0.1' works ...
127.0.0.1 is alive
OK, will use '/usr/local/sbin/fping' for ping tests
NOTE: If you are using an suid-root wrapper, make sure the 'hobbit'
user is also allowed to run fping without having to enter passwords.
For 'sudo', add something like this to your 'sudoers' file:
hobbit: ALL=(ALL) NOPASSWD: /usr/local/sbin/fping

Checking for RRDtool ...
test-rrd.c: In function 'main':
test-rrd.c:30: error: too few arguments to function 'rrd_graph'
make: *** [test-compile] Error 1
Not RRDtool 1.0.x, checking for 1.2.x
Found RRDtool include files in /usr/include
Found RRDtool libraries in /usr/lib

Checking for PCRE ...
Found PCRE include files in /usr/include
Found PCRE libraries in /usr/lib

Checking for OpenSSL ...
Found OpenSSL include files in /usr/local/ssl/include
Found OpenSSL libraries in /usr/local/ssl/lib

Xymon can use the OpenSSL library to test SSL-enabled services
like POP3S, IMAPS, NNTPS and TELNETS. If you have the OpenSSL
library installed, I recommend that you enable this.

Do you want to be able to test SSL-enabled services (y) ?

Checking for LDAP ...
Found LDAP include files in /usr/include
Found LDAP libraries in /usr/lib

Xymon can use your OpenLDAP LDAP client library to test LDAP servers.

Do you want to be able to test LDAP servers (y) ?

Enable experimental support for LDAP/SSL (OpenLDAP 2.x only) (y) ?

Checking for Large File Support ...
Large File Support OK

Setting up for a Xymon server

What userid will be running Xymon [xymon] ?

Found passwd entry for user xymon:x:1000:1000::/usr/local/xymon:/bin/bash

Where do you want the Xymon installation [/usr/local/xymon] ?

OK, will configure to use /usr/local/xymon as the Xymon toplevel directory

What URL will you use for the Xymon webpages [/xymon] ?

Where to put the Xymon CGI scripts [/usr/local/xymon/cgi-bin] ?
(Note: This is the filesystem directory - we will get to the URL shortly)

What is the URL for the Xymon CGI directory [/xymon-cgi] ?
(Note: This is the URL - NOT the filesystem directory)

********************** SECURITY NOTICE ****************************
If your Xymon server is accessible by outsiders, then you should
restrict access to the CGI scripts that handle enable/disable of
hosts, and acknowledging of alerts. The easiest way to do this is
to put these in a separate CGI directory and require a password to
access them.
Even if your Xymon server is on a secured, internal network, you
may want to have some operations (like disabling a host) be password-
protected - that lets you see who disabled or acknowledged an alert.

Where to put the Xymon Administration CGI scripts [/usr/local/xymon/cgi-secure] ?
(Note: This is the filesystem directory - we will get to the URL shortly)

What is the URL for the Xymon Administration CGI directory [/xymon-seccgi] ?
(Note: This is the URL - NOT the filesystem directory)

** Note that you may need to modify your webserver configuration.
** After installing, see /usr/local/xymon/server/etc/hobbit-apache.conf for an example configuration.

To generate Xymon availability reports, your webserver
must have write-access to a directory below the Xymon
top-level directory. I can set this up if you tell me
what group-ID your webserver runs with. This is typically
'nobody' or 'apache' or 'www-data'

What group-ID does your webserver use [nobody] ?
daemon

Where to put the Xymon logfiles [/var/log/xymon] ?

What is the name of this host [v-03.localhost] ?

What is the IP-address of this host [127.0.0.1] ?
192.168.11.73

Where should I install the Xymon man-pages (/usr/local/man) ?

Using Linux Makefile settings

Created Makefile with the necessary information to build Xymon
Some defaults are used, so do look at the Makefile before continuing.

Configuration complete - now run make (GNU make) to build the tools
==================================================

# make && make install

���µ��������\¹\���\���\��\��������Ώ�����
# cp -ip ./rpm/hobbit-init.d /etc/init.d/xymon
# chown root:root /etc/init.d/xymon
# chmod 755 /etc/init.d/xymon

��½��ԏ��¹������¹¹(���µ���¹������µ��������\¹\���\���\��\������̏��¹���²���¼\���\�ޏ�����������������)

# cat /etc/init.d/xymon

#! /bin/sh
#
# hobbit This shell script takes care of starting and stopping
# hobbit(the Hobbit network monitor)
#
# chkconfig: 2345 80 20
# description: hobbit is a network monitoring tool that allows \
# you to monitor hosts and services. The monitor status is available \
# via a webpage.

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/xymon/server/hobbit.sh
NAME=xymon
DESC=xymon

test -x $DAEMON || exit 0

# Include hobbit defaults if available
if [ -f /etc/default/hobbit ] ; then
. /etc/default/hobbit
fi

set -e

case "$1" in
start)
echo -n "Starting $DESC: "
su -c "$DAEMON start" - xymon
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
su -c "$DAEMON stop" - xymon
echo "$NAME."
;;
status)
su -c "$DAEMON status" - xymon
;;
reload|force-reload)
echo "Reloading $DESC configuration files."
su -c "$DAEMON reload" - xymon
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
su -c "$DAEMON restart" - xymon
echo "$NAME."
;;
rotate)
echo -n "Rotating logs for $DESC: "
su -c "$DAEMON rotate" - xymon
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|status|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|status|estart|force-reload}" >&2
exit 1
;;
esac

exit 0

# chkconfig --add xymon

���\���\��\������¼\������¼\��������Ώ�����
# cp -ip ./rpm/hobbit.logrotate /etc/logrotate.d/xymon
# chown root:root /etc/logrotate.d/xymon

��½��ԏ��¹������¹¹(���µ���¹������µ��������\¹\���\���\��\������̏��¹���²���¼\���\�ޏ�����������������)

# cat /etc/logrotate.d/xymon

#
# Logrotate fragment for Hobbit.
#
/var/log/xymon/*.log {
weekly
compress
delaycompress
rotate 5
missingok
nocreate
sharedscripts
postrotate
/etc/init.d/xymon rotate
endscript
}

���apache�����Ώ�����(hobbit-apache.conf������include���¹�����������������Ï����� ����������������̏����ӏ�����������¹¹)
# /usr/local/xymon/server/etc/hobbit-apache.conf /usr/local/apache2/conf/.

���fping½������µ
# chown root:xymon /usr/local/sbin/fping
# chmod 4710 /usr/local/sbin/fping
# ls -l /usr/local/sbin/fping
-rwsr-xr-x 1 root xymon 48835 Dec 14 02:22 /usr/local/sbin/fping

tuzzy92 at 23:55����Permalink����Comments(0)����

2009������11·���23������

heartbeat������������������LVS\µ���¼\о������¹²½

keepalived���«������heartbeat������������¹¹���·LVS\µ���¼\Ð������¾������¹²½������»����·�����������Ώ�����

��򏪡�돪����
����LVS������2������(CentOS5.4 active/stand by VIP:192.168.11.200)
����WEB\µ���¼\Ð������2������(CentOS5.4/FreeBSD7.2)
����¾���µ­3����������������ޡ돫�\���\���\���\������¼\���������(192.168.11.0/24)

���\���\������¼\���
LVS-02

��򏢱���¼��HP
����The High Availability Linux \��\���\���\��\���\���
http://www.linux-ha.org/ja/HomePage_ja/

����IPVS
http://www.linux-vs.org/

���LVS\µ���¼\Ð�����Ώ�����
���\���\���\¹\������¼\���(yum������)
heartbeat.i386
heartbeat-ldirectord.i386
ipvsadm.i386

# yum list installed | egrep -i "heartbeat|IPVS"
Failed to set locale, defaulting to C
heartbeat.i386 2.1.3-3.el5.centos installed
heartbeat-ldirectord.i386 2.1.3-3.el5.centos installed
heartbeat-pils.i386 2.1.3-3.el5.centos installed
heartbeat-stonith.i386 2.1.3-3.el5.centos installed
ipvsadm.i386 1.24-10 installed

���authkeys�����Ώ�����(»²¹��� /usr/share/doc/heartbeat-2.1.3/authkeys)
# cd /etc/ha.d ; pwd
# vi authkeys

auth 1
1 crc

# chmod 600 authkeys

���ha.cf(ucast�돪�³��돫�½���)
logfile /var/log/ha-log

keepalive 2
deadtime 30
warntime 10
initdead 120

udpport 694
ucast eth0 192.168.11.51 #LVS02������IP\��\���\���\¹
auto_failback off

respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster

node v-lvs01.localhost
node v-lvs02.localhost

��node ������uname -n������·���²���������µ­½���

���haresources
v-lvs01.localhost 192.168.11.200/24/eth0 ldirectord

�񡯏�돪�������������ldirectord������heartbeat·Ð���³������ldirectord������µ�������돢�¹�����������������������á돪؏����
�񡯏��·�����ď��̏�����������µ��������\¹\���\���\��\���������ldirectord������on���������¹����������̏���ߏ�����������������

���ldirectord.cf
checktimeout=3
checkinterval=10
logfile="/var/log/ldirectord.log"

autoreload=yes

virtual=192.168.11.200:80
real=192.168.11.54:80 gate 1
real=192.168.11.52:80 gate 1
scheduler=wrr
protocol=tcp

���³���³�����������������Ώ��������·�����ď�����heartbeat������µ��������
���½���·������LVS01������VIP���̏�Ģ�������������������������������»��ӏ�����³������

[LVS01]# ifconfig -a | grep -w inet
inet addr:192.168.11.50 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:192.168.11.200 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0
[LVS02]# ifconfig -a | grep -w inet
inet addr:192.168.11.51 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

��򏢱���¾���
���������������
1)active�����ҏ������������·��¡�VIP���̏�ď���돪䏢�¹������»��ӏ�����³������
2)��ď���돪䏢����(���µ)active������µ�����돢�·��¡�VIP���̏�ď���돪䏢�·������������»��ӏ�����³������

���1)������1������������VIP���̏�ď���돪䏢�·�������������������������̏��������«������
[LVS01]# /etc/init.d/heartbeat stop
Stopping High-Availability services:
[ OK ]

[LVS01]# ifconfig -a | grep -w inet
inet addr:192.168.11.50 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

[LVS01]# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn

[LVS02]# ifconfig -a | grep -w inet
inet addr:192.168.11.51 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:192.168.11.200 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

[LVS02]# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 wrr
-> 192.168.11.54:80 Route 1 0 0
-> 192.168.11.52:80 Route 1 0 0


��LVS01\���\��
heartbeat[6153]: 2009/11/23_02:38:55 info: Heartbeat shutdown in progress. (6153)
heartbeat[6789]: 2009/11/23_02:38:55 info: Giving up all HA resources.
ResourceManager[6802]: 2009/11/23_02:38:55 info: Releasing resource group: v-lvs01.localhost 192.168.11.200/24/eth0 ldirectord
ResourceManager[6802]: 2009/11/23_02:38:55 info: Running /etc/ha.d/resource.d/ldirectord stop
ResourceManager[6802]: 2009/11/23_02:38:57 info: Running /etc/ha.d/resource.d/IPaddr 192.168.11.200/24/eth0 stop
IPaddr[6888]: 2009/11/23_02:38:57 INFO: ifconfig eth0:0 down
IPaddr[6859]: 2009/11/23_02:38:57 INFO: Success
heartbeat[6789]: 2009/11/23_02:38:57 info: All HA resources relinquished.
heartbeat[6153]: 2009/11/23_02:38:59 info: killing /usr/lib/heartbeat/ipfail process group 6175 with signal 15
heartbeat[6153]: 2009/11/23_02:39:02 WARN: 1 lost packet(s) for [v-lvs02.localhost] [154:156]
heartbeat[6153]: 2009/11/23_02:39:02 info: No pkts missing from v-lvs02.localhost!
heartbeat[6153]: 2009/11/23_02:39:03 info: killing HBFIFO process 6155 with signal 15
heartbeat[6153]: 2009/11/23_02:39:03 info: killing HBWRITE process 6156 with signal 15
heartbeat[6153]: 2009/11/23_02:39:03 info: killing HBREAD process 6157 with signal 15
heartbeat[6153]: 2009/11/23_02:39:03 info: Core process 6156 exited. 3 remaining
heartbeat[6153]: 2009/11/23_02:39:03 info: Core process 6155 exited. 2 remaining
heartbeat[6153]: 2009/11/23_02:39:03 info: Core process 6157 exited. 1 remaining
heartbeat[6153]: 2009/11/23_02:39:03 info: v-lvs01.localhost Heartbeat shutdown complete.

��LVS02\���\��
heartbeat[4182]: 2009/11/23_02:38:58 info: Received shutdown notice from 'v-lvs01.localhost'.
heartbeat[4182]: 2009/11/23_02:38:58 info: Resources being acquired from v-lvs01.localhost.
heartbeat[4249]: 2009/11/23_02:38:58 info: acquire all HA resources (standby).
heartbeat[4250]: 2009/11/23_02:38:58 info: No local resources [/usr/share/heartbeat/ResourceManager listkeys v-lvs02.localhost] to acquire.
ResourceManager[4275]: 2009/11/23_02:38:58 info: Acquiring resource group: v-lvs01.localhost 192.168.11.200/24/eth0 ldirectord
IPaddr[4301]: 2009/11/23_02:38:58 INFO: Resource is stopped
ResourceManager[4275]: 2009/11/23_02:38:58 info: Running /etc/ha.d/resource.d/IPaddr 192.168.11.200/24/eth0 start
IPaddr[4398]: 2009/11/23_02:38:59 INFO: Using calculated netmask for 192.168.11.200: 255.255.255.0
IPaddr[4398]: 2009/11/23_02:38:59 INFO: eval ifconfig eth0:0 192.168.11.200 netmask 255.255.255.0 broadcast 192.168.11.255
IPaddr[4369]: 2009/11/23_02:38:59 INFO: Success
ResourceManager[4275]: 2009/11/23_02:39:00 info: Running /etc/ha.d/resource.d/ldirectord start
heartbeat[4249]: 2009/11/23_02:39:01 info: all HA resource acquisition completed (standby).
heartbeat[4182]: 2009/11/23_02:39:01 info: Standby resource acquisition done [all].
harc[4514]: 2009/11/23_02:39:01 info: Running /etc/ha.d/rc.d/status status
mach_down[4535]: 2009/11/23_02:39:02 info: Taking over resource group 192.168.11.200/24/eth0
ResourceManager[4564]: 2009/11/23_02:39:02 info: Acquiring resource group: v-lvs01.localhost 192.168.11.200/24/eth0 ldirectord
IPaddr[4590]: 2009/11/23_02:39:02 INFO: Running OK
ResourceManager[4564]: 2009/11/23_02:39:04 info: Running /etc/ha.d/resource.d/ldirectord start
mach_down[4535]: 2009/11/23_02:39:05 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[4535]: 2009/11/23_02:39:05 info: mach_down takeover complete for node v-lvs01.localhost.
heartbeat[4182]: 2009/11/23_02:39:05 info: mach_down takeover complete.
heartbeat[4182]: 2009/11/23_02:39:56 WARN: node v-lvs01.localhost: is dead
heartbeat[4182]: 2009/11/23_02:39:56 info: Dead node v-lvs01.localhost gave up resources.
heartbeat[4182]: 2009/11/23_02:39:56 info: Link v-lvs01.localhost:eth0 dead.
ipfail[4189]: 2009/11/23_02:39:56 info: Status update: Node v-lvs01.localhost now has status dead
ipfail[4189]: 2009/11/23_02:39:58 info: NS: We are dead. :<
ipfail[4189]: 2009/11/23_02:39:58 info: Link Status update: Link v-lvs01.localhost/eth0 now has status dead
ipfail[4189]: 2009/11/23_02:40:00 info: We are dead. :<
ipfail[4189]: 2009/11/23_02:40:00 info: Asking other side for ping node count.

���2)auto_failback off���̏��­�����⏢�����돪�¼«�����\���\��\���\���\Ð\���\������·������������
[LVS01]# /etc/init.d/heartbeat start
Starting High-Availability services:
2009/11/23_02:43:20 INFO: Resource is stopped
[ OK ]

[LVS01]# ifconfig -a | grep -w inet
inet addr:192.168.11.50 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

[LVS01]# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn

[LVS02]# ifconfig -a | grep -w inet
inet addr:192.168.11.51 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:192.168.11.200 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

[LVS02]# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 wrr
-> 192.168.11.54:80 Route 1 0 0
-> 192.168.11.52:80 Route 1 0 0

��LVS01\���\��
heartbeat[7030]: 2009/11/23_02:43:20 info: Version 2 support: false
heartbeat[7030]: 2009/11/23_02:43:20 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[7030]: 2009/11/23_02:43:20 info: **************************
heartbeat[7030]: 2009/11/23_02:43:20 info: Configuration validated. Starting heartbeat 2.1.3
heartbeat[7031]: 2009/11/23_02:43:20 info: heartbeat: version 2.1.3
heartbeat[7031]: 2009/11/23_02:43:20 info: Heartbeat generation: 1258825420
heartbeat[7031]: 2009/11/23_02:43:20 info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth0
heartbeat[7031]: 2009/11/23_02:43:20 info: glib: ucast: bound send socket to device: eth0
heartbeat[7031]: 2009/11/23_02:43:20 info: glib: ucast: bound receive socket to device: eth0
heartbeat[7031]: 2009/11/23_02:43:20 info: glib: ucast: started on port 694 interface eth0 to 192.168.11.51
heartbeat[7031]: 2009/11/23_02:43:20 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[7031]: 2009/11/23_02:43:20 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[7031]: 2009/11/23_02:43:20 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[7031]: 2009/11/23_02:43:21 info: Local status now set to: 'up'
heartbeat[7031]: 2009/11/23_02:43:21 info: Link v-lvs02.localhost:eth0 up.
heartbeat[7031]: 2009/11/23_02:43:21 info: Status update for node v-lvs02.localhost: status active
harc[7038]: 2009/11/23_02:43:22 info: Running /etc/ha.d/rc.d/status status
heartbeat[7031]: 2009/11/23_02:43:22 info: Comm_now_up(): updating status to active
heartbeat[7031]: 2009/11/23_02:43:22 info: Local status now set to: 'active'
heartbeat[7031]: 2009/11/23_02:43:22 info: Starting child client "/usr/lib/heartbeat/ipfail" (498,496)
heartbeat[7054]: 2009/11/23_02:43:22 info: Starting "/usr/lib/heartbeat/ipfail" as uid 498 gid 496 (pid 7054)
heartbeat[7031]: 2009/11/23_02:43:23 info: remote resource transition completed.
heartbeat[7031]: 2009/11/23_02:43:23 info: remote resource transition completed.
heartbeat[7031]: 2009/11/23_02:43:23 info: Local Resource acquisition completed. (none)
heartbeat[7031]: 2009/11/23_02:43:23 info: Initial resource acquisition complete (T_RESOURCES(them))
ipfail[7054]: 2009/11/23_02:43:31 info: Ping node count is balanced.

��LVS02\���\��
heartbeat[4182]: 2009/11/23_02:43:22 info: Heartbeat restart on node v-lvs01.localhost
heartbeat[4182]: 2009/11/23_02:43:22 info: Link v-lvs01.localhost:eth0 up.
heartbeat[4182]: 2009/11/23_02:43:22 info: Status update for node v-lvs01.localhost: status init
heartbeat[4182]: 2009/11/23_02:43:22 info: Status update for node v-lvs01.localhost: status up
ipfail[4189]: 2009/11/23_02:43:22 info: Link Status update: Link v-lvs01.localhost/eth0 now has status up
ipfail[4189]: 2009/11/23_02:43:22 info: Status update: Node v-lvs01.localhost now has status init
ipfail[4189]: 2009/11/23_02:43:22 info: Status update: Node v-lvs01.localhost now has status up
harc[4687]: 2009/11/23_02:43:22 info: Running /etc/ha.d/rc.d/status status
harc[4702]: 2009/11/23_02:43:22 info: Running /etc/ha.d/rc.d/status status
heartbeat[4182]: 2009/11/23_02:43:23 info: Status update for node v-lvs01.localhost: status active
ipfail[4189]: 2009/11/23_02:43:23 info: Status update: Node v-lvs01.localhost now has status active
harc[4717]: 2009/11/23_02:43:23 info: Running /etc/ha.d/rc.d/status status
heartbeat[4182]: 2009/11/23_02:43:24 info: remote resource transition completed.
ipfail[4189]: 2009/11/23_02:43:24 info: Asking other side for ping node count.
ipfail[4189]: 2009/11/23_02:43:32 info: No giveup timer to abort.

tuzzy92 at 02:53����Permalink����Comments(2)����

2009������11·���17������

keepalived������������������LVS\µ���¼\о������¹²½

��򏪡�돪����
����LVS������2������(CentOS5.4 active/stand by VIP:192.168.11.200)
����WEB\µ���¼\Ð������2������(CentOS5.4/FreeBSD7.2)
����¾���µ­3����������������ޡ돫�\���\���\���\������¼\���������(192.168.11.0/24)

���\���\������¼\���
lvs02


��򏢱���¼��HP
����keepalived
http://www.keepalived.org/

����IPVS
http://www.linux-vs.org/

���LVS\µ���¼\Ð�����Ώ�����
���Keepalived.conf(priority�돪�³�돩��ޡ돫�)
����active
vrrp_instance vip_httpd {
interface eth0
virtual_router_id 1

state BACKUP
garp_master_delay 5
priority 101
nopreempt
advert_int 1

authentication {
auth_type PASS
auth_pass secret
}

virtual_ipaddress {
192.168.11.200/24 dev eth0
}
}

virtual_server 192.168.11.200 80 {
delay_loop 3
lvs_sched rr
lvs_method DR
protocol TCP

real_server 192.168.11.54 80 {
weight 1
inhibit_on_failure
HTTP_GET {
url {
path /index.html
status_code 200
}
connect_timeout 3
}
}

real_server 192.168.11.52 80 {
weight 1
inhibit_on_failure
HTTP_GET {
url {
path /index.html
status_code 200
}
connect_timeout 3
}
}

����stand by
vrrp_instance vip_httpd {
interface eth0
virtual_router_id 1

state BACKUP
garp_master_delay 5
priority 100
nopreempt
advert_int 1

authentication {
auth_type PASS
auth_pass secret
}

virtual_ipaddress {
192.168.11.200/24 dev eth0
}
}

virtual_server 192.168.11.200 80 {
delay_loop 3
lvs_sched rr
lvs_method DR
protocol TCP

real_server 192.168.11.54 80 {
weight 1
inhibit_on_failure
HTTP_GET {
url {
path /index.html
status_code 200
}
connect_timeout 3
}
}

real_server 192.168.11.52 80 {
weight 1
inhibit_on_failure
HTTP_GET {
url {
path /index.html
status_code 200
}
connect_timeout 3
}
}

���³������
����active(VIP������»�������������������������)
# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.50/24 brd 192.168.11.255 scope global eth0
inet 192.168.11.200/24 scope global secondary eth0

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 rr
-> 192.168.11.52:80 Route 1 0 0
-> 192.168.11.54:80 Route 1 0 0

����stand by(VIP���������·)
# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.51/24 brd 192.168.11.255 scope global eth0

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 rr
-> 192.168.11.52:80 Route 1 0 0
-> 192.168.11.54:80 Route 1 0 0

��򏢱���¾���
���������������
1)active�����ҏ������������·��¡�VIP���̏�ď���돪䏢�¹������»��ӏ�����³������
2)��ď���돪䏢����(���µ)active������µ�����돢�·��¡�VIP���̏�ď���돪䏢�·������������»��ӏ�����³������

���1)
����active
# ipvsadm -L -n
[root@v-lvs01 keepalived]# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.50/24 brd 192.168.11.255 scope global eth0

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn

Nov 17 01:52:41 v-lvs01 Keepalived: Terminating on signal
Nov 17 01:52:41 v-lvs01 Keepalived: Stopping Keepalived v1.1.19 (11/16,2009)
Nov 17 01:52:41 v-lvs01 Keepalived_vrrp: Terminating VRRP child process on signal
Nov 17 01:52:41 v-lvs01 Keepalived_healthcheckers: Terminating Healthchecker child process on signal
Nov 17 01:52:41 v-lvs01 Keepalived_vrrp: VRRP_Instance(vip_httpd) removing protocol VIPs.


����stand by
# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.51/24 brd 192.168.11.255 scope global eth0
inet 192.168.11.200/24 scope global secondary eth0

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 rr
-> 192.168.11.52:80 Route 1 0 0
-> 192.168.11.54:80 Route 1 0 0

Nov 17 01:52:44 v-lvs-02 Keepalived_vrrp: VRRP_Instance(vip_httpd) Transition to MASTER STATE
Nov 17 01:52:45 v-lvs-02 Keepalived_vrrp: VRRP_Instance(vip_httpd) Entering MASTER STATE
Nov 17 01:52:45 v-lvs-02 Keepalived_vrrp: VRRP_Instance(vip_httpd) setting protocol VIPs.
Nov 17 01:52:45 v-lvs-02 Keepalived_vrrp: VRRP_Instance(vip_httpd) Sending gratuitous ARPs on eth0 for 192.168.11.200
Nov 17 01:52:45 v-lvs-02 Keepalived_healthcheckers: Netlink reflector reports IP 192.168.11.200 added
Nov 17 01:52:45 v-lvs-02 Keepalived_vrrp: Netlink reflector reports IP 192.168.11.200 added
Nov 17 01:52:51 v-lvs-02 Keepalived_vrrp: VRRP_Instance(vip_httpd) Sending gratuitous ARPs on eth0 for 192.168.11.200
Nov 17 01:52:59 v-lvs-02 ntpd[2058]: kernel time sync enabled 0001


���2)
���Ï��µactive
# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.50/24 brd 192.168.11.255 scope global eth0

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 rr
-> 192.168.11.52:80 Route 1 0 0
-> 192.168.11.54:80 Route 1 0 0

Nov 17 01:55:23 v-lvs01 Keepalived: Starting Keepalived v1.1.19 (11/16,2009)
Nov 17 01:55:23 v-lvs01 Keepalived: Starting Healthcheck child process, pid=2370
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Netlink reflector reports IP 192.168.11.50 added
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Registering Kernel netlink reflector
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Registering Kernel netlink command channel
Nov 17 01:55:23 v-lvs01 Keepalived: Starting VRRP child process, pid=2371
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Netlink reflector reports IP 192.168.11.50 added
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Registering Kernel netlink reflector
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Registering Kernel netlink command channel
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Registering gratutious ARP shared channel
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Opening file '/etc/keepalived/keepalived.conf'.
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Configuration is using : 11772 Bytes
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Using LinkWatch kernel netlink reflector...
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Activating healtchecker for service [192.168.11.54:80]
Nov 17 01:55:23 v-lvs01 Keepalived_healthcheckers: Activating healtchecker for service [192.168.11.52:80]
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Opening file '/etc/keepalived/keepalived.conf'.
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Configuration is using : 33828 Bytes
Nov 17 01:55:23 v-lvs01 Keepalived_vrrp: Using LinkWatch kernel netlink reflector...
Nov 17 01:55:24 v-lvs01 Keepalived_vrrp: VRRP_Instance(vip_httpd) Entering BACKUP STATE
Nov 17 01:55:24 v-lvs01 Keepalived_vrrp: VRRP sockpool: [ifindex(2), proto(112), fd(10,11)]

���Ï��µstand by
# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.51/24 brd 192.168.11.255 scope global eth0
inet 192.168.11.200/24 scope global secondary eth0

# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:80 rr
-> 192.168.11.52:80 Route 1 0 0
-> 192.168.11.54:80 Route 1 0 0

��\���\�돢�������������������������·

������¾��⡭�돪�»

tuzzy92 at 02:01����Permalink����Comments(0)����

2009������11·���16������

keepalived+ipvsadm������������������web\µ���¼\Ð������²��㏪���»��

��򏪡�돪����
����LVS������1������(CentOS5.4)
����WEB\µ���¼\Ð������2������(CentOS5.4/FreeBSD7.2)
����¾���µ­3����������������ޡ돫�\���\���\���\������¼\���������(192.168.11.0/24)

���\���\������¼\���
LVS01


��򏢱���¼��HP
����keepalived
http://www.keepalived.org/

����IPVS
http://www.linux-vs.org/

���LVS\µ���¼\Ð�����Ώ�����
���ipvsadm\���\���\¹\������¼\���
# yum install ipvsadm.i386

���keepalived\���\���\¹\������¼\���
# wget http://www.keepalived.org/software/keepalived-1.1.19.tar.gz
# tar xvfz keepalived-1.1.19.tar.gz
# cd keepalived-1.1.19 ; pwd
# ./configure --with-kernel-dir=/lib/modules/2.6.18-164.el5/build

Keepalived configuration
------------------------
Keepalived version : 1.1.19
Compiler : gcc
Compiler flags : -g -O2
Extra Lib : -lpopt -lssl -lcrypto
Use IPVS Framework : Yes
IPVS sync daemon support : Yes
Use VRRP Framework : Yes
Use Debug flags : No

# cp -ip keepalived.spec /usr/src/redhat/SPECS/.
# cp -ip ../keepalived-1.1.19.tar.gz /usr/src/redhat/SOURCES/.
# cd /usr/src/redhat/SPECS/ ; pwd
# vi keepalived.spec

������¹¹�����:Version: 1.1.18
������¹¹������:Version: 1.1.19

# rpmbuild -ba keepalived.spec

���Ï����䏢����������������
error: Bad owner/group: /usr/src/redhat/SPECS/keepalived.spec

# ls -l /usr/src/redhat/SPECS/keepalived.spec
-rw-r--r-- 1 root 1000 5230 Nov 16 17:47 /usr/src/redhat/SPECS/keepalived.spec

���Ï��¾���·������
# chgrp root /usr/src/redhat/SPECS/keepalived.spec
# ls -l /usr/src/redhat/SPECS/keepalived.spec
-rw-r--r-- 1 root root 5230 Nov 16 17:47 /usr/src/redhat/SPECS/keepalived.spec

���Ï�돩�������¼���¹���
# rpmbuild -ba keepalived.spec

# cd ../RPMS/i386/ ; pwd
# rpm -ivh keepalived-1.1.19-5.i386.rpm

���keepalived.conf������½���

vrrp_instance vip_httpd {
interface eth0
virtual_router_id 1

virtual_ipaddress {
192.168.11.200/24 dev eth0
}
}

virtual_server 192.168.11.200 80 {
delay_loop 3
lvs_sched rr
lvs_method DR
protocol TCP

real_server 192.168.11.52 80 {
weight 1
inhibit_on_failure
HTTP_GET {
url {
path /index.html
status_code 200
}
connect_timeout 3
}
}

real_server 192.168.11.54 80 {
weight 1
inhibit_on_failure
HTTP_GET {
url {
path /index.html
status_code 200
}
connect_timeout 3
}
}

���ip_fowward�����Ώ�����(����������������𡯏�����)
# echo '1' > /proc/sys/net/ipv4/ip_forward


���web\µ���¼\Ð�����Ώ�����(����������������𡯏�����)
����web1
# ifconfig lo:0 192.168.11.200 netmask 255.255.255.255
# vi /etc/sysctl.conf

net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

# sysctl -p

# ifconfig -a | grep -w inet
inet addr:192.168.11.52 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0
inet addr:192.168.11.200 Mask:255.255.255.255
# ip add | grep -w inet
inet 127.0.0.1/8 scope host lo
inet 192.168.11.200/32 brd 192.168.11.200 scope global lo:0
inet 192.168.11.52/24 brd 192.168.11.255 scope global eth0


����web2
# ifconfig lo0 alias 192.168.11.200 netmask 255.255.255.255

# ifconfig -a | grep -w inet
inet 192.168.11.54 netmask 0xffffff00 broadcast 192.168.11.255
inet 127.0.0.1 netmask 0xff000000
inet 192.168.11.200 netmask 0xffffffff
# ip add | grep -w inet
-bash: ip: command not found (orz)


���돩�������LVS\µ���¼\Ð������������
���µ��������
# /etc/init.d/ipvsadm start
# /etc/init.d/keepalived start

���³������
# ifconfig -a | grep -w inet(VIP������½Ð������������)
inet addr:192.168.11.50 Bcast:192.168.11.255 Mask:255.255.255.0
inet addr:127.0.0.1 Mask:255.0.0.0

# ip add | grep -w inet(VIP½Ð������)
inet 127.0.0.1/8 scope host lo
inet 192.168.11.50/24 brd 192.168.11.255 scope global eth0
inet 192.168.11.200/24 scope global secondary eth0

# ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:http rr
-> 192.168.11.52:http Route 1 0 0
-> 192.168.11.54:http Route 1 0 0


�񡯏��¾\µ���¼\Ð������������
# curl http://192.168.11.200/
web01
# curl http://192.168.11.200/
web02
# curl http://192.168.11.200/
web01
# curl http://192.168.11.200/
web02
#

���web01������apache�����ҏ������������·�����������Ώ�����
# ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.11.200:http rr
-> 192.168.11.52:http Route 0 0 3
-> 192.168.11.54:http Route 1 0 8

�񡯏��¾\µ���¼\Ð������������
# curl http://192.168.11.200/
web02
# curl http://192.168.11.200/
web02
# curl http://192.168.11.200/
web02
# curl http://192.168.11.200/
web02
# curl http://192.168.11.200/
web02
#

LVS¼«��ď��������¾������¹²½���������½���������Ï���������������

tuzzy92 at 01:05����Permalink����Comments(0)����

2009������10·���11������

lighttpd(php/cgi����돢돫�����������)

��򏢱���¼��HP
����lighttpd
http://www.lighttpd.net/

����fastcgi
http://www.fastcgi.com/drupal/

����php
http://www.php.net/

���\���\���\¹\������¼\���
���fstcgi
# wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
# tar xfz fcgi-2.4.0.tar.gz
# cd fcgi-2.4.0 ; pwd
# ./configure && make && make install

# perl -MCPAN -e 'install FCGI'
# perl -MCPAN -e 'install CGI::Fast'

���lighttpd
# wget http://www.lighttpd.net/download/lighttpd-1.4.23.tar.gz
# tar xfz lighttpd-1.4.23.tar.gz
# cd lighttpd-1.4.23 ; pwd
# ./configure \
--prefix=/usr/local/lighttpd \
--with-openssl && make && make install

���php(5.3·���������--enable-fastcgi���̏��µ������돪�5.2·���������»���������)
# wget http://jp.php.net/get/php-5.2.11.tar.gz/from/this/mirror
# tar xvfz php-5.2.11.tar.gz
# cd php-5.2.11 ; pwd
./configure \
--prefix=/usr/local/php-fast \
--enable-fastcgi \
--with-pic \
--with-openssl=shared,/usr/local/ssl \
--with-mysql=/usr/local/mysql \
--with-mysqli=shared,/usr/local/mysql/bin/mysql_config \
--with-curl \
--without-iconv \
--with-bz2 \
--with-zlib \
--enable-pcntl \
--enable-mbstring \
--enable-mbregex \
--with-gd \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-freetype-dir=/usr \
--with-zlib-dir=/usr \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-libxml-dir=/usr \
--with-xmlrpc=shared \
--with-ldap=shared \
--with-ldap-sasl \
--enable-dom=shared \
--with-snmp=shared,/usr/local/snmpd \
--enable-soap=shared \
--with-xsl=shared,/usr \
--enable-xmlreader=shared \
--enable-xmlwriter=shared && make && make install

��򏪢��Ώ�����
���µ�������돪���Ώ�����
# cd lighttpd-1.4.23 ; pwd
# cp -ip ./doc/rc.lighttpd.redhat /etc/init.d/lighttpd
# chkconfig --add lighttpd
# chkconfig lighttpd on
# chkconfig --list lighttpd
lighttpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

���conf�����Ώ�����
# mkdir /usr/local/lighttpd/conf/
# mkdir /usr/local/lighttpd/htdocs/
# mkdir /usr/local/lighttpd/logs/

# chown www:www /usr/local/lighttpd/logs

# cp -ip ./doc/lighttpd.conf /usr/local/lighttpd/conf/.
# cp -ip ./doc/sysconfig.lighttpd /etc/sysconfig/lighttpd

����lighttpd.conf������¹¹������

(server.modules������²¼µ­2\���½���������\³\���\���\���\���\���)
"mod_fastcgi",
"mod_cgi",

(²¼µ­�����»��Џ�����¹¹)
server.username = "www"
server.groupname = "www"
server.document-root = "/usr/local/lighttpd/htdocs/"
server.errorlog = "/usr/local/lighttpd/logs/error.log"
accesslog.filename = "/usr/local/lighttpd/logs/access.log"


fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fast/bin/php-cgi"
)
)
)

cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" )


tuzzy92 at 22:52����Permalink����Comments(0)����

2009������03·���10������

postfixadmin\���\���\¹\������¼\���

���MySQL
���db db\��\«\���\���\�����돫�����
# mysql -uroot

mysql> CREATE DATABASE POSTFIXADMIN;
mysql> GRANT ALL ON POSTFIXADMIN.* TO postfixadminuser@'localhost' IDENTIFIED BY 'postfix';
mysql> FLUSH PRIVILEGES;
mysql> quit

���postfixadmin
�񡯏�돪����·������������2.3beta ������ MySQL4.1.22�����������������Ԣ����¹�������½Ð�����������ď�����2.2·�����돪����·�����������ҏ��³������

# wget http://jaist.dl.sourceforge.net/sourceforge/postfixadmin/postfixadmin-2.2.1.1.tar.gz
# tar xvfz postfixadmin-2.2.1.1.tar.gz
# mv -i postfixadmin-2.2.1.1 /usr/local/postfixadmin

# cd /usr/local/postfixadmin/ ; pwd
# vi config.inc.php

# diff config.inc.php.org config.inc.php
31c31
< $CONF['configured'] = false;
---
> $CONF['configured'] = true;
44c44
< $CONF['default_language'] = 'en';
---
> $CONF['default_language'] = 'ja';
52,54c52,54
< $CONF['database_user'] = 'postfix';
< $CONF['database_password'] = 'postfixadmin';
< $CONF['database_name'] = 'postfix';
---
> $CONF['database_user'] = 'postfixadminuser';
> $CONF['database_password'] = 'postfix';
> $CONF['database_name'] = 'postfixadmin';

���apache
### postfixadmin

Alias /postfixadmin /usr/local/postfixadmin

[Directory /usr/local/postfixadmin]
DirectoryIndex index.php
[/Directory]

��������䏪�³³������
http://hoge.hoge/postfixadmin/setup.php

�񡯏����Ώ��������̏��µ���·���ޏ��������Ð���³������»��Џ�������������돫�����·������DB������\������¼\���\������̏�돫�����µ������������
�񡯡����������\������¼\����돫�����

# mysql -uroot postfixadmin

mysql> show tables;
+------------------------+
| Tables_in_postfixadmin |
+------------------------+
| admin |
| alias |
| config |
| domain |
| domain_admins |
| fetchmail |
| log |
| mailbox |
| vacation |
| vacation_notification |
+------------------------+

# mv -i setup.php .setup.php

http://hoge.hoge/postfixadmin/��������������\���\��\���\���³������

������򏫳���������µ���������������³����������

tuzzy92 at 22:40����Permalink����Comments(0)����

2009������02·���11������

sar������\��\���\���²½ Ksar

sar������\µ���¼\о��؏����ӏ����ҏ����򏪤���
���ޏ�����������»��⏪�я��������ޏ��«���������������·������������������������������������������������������\��\���\���²½���·�����ď�����������»�ߏ����Ï���������²�����������ޏ����������������������������������돢¡�
���½�����я������������ď�����(¼«�����)������Ksar

����Ksar
http://ksar.atomique.net/
����Java
http://java.com/ja/

��򏩡³�����Џ����򏪳���1
(Windows�돪�³�돢����)\µ���¼\Ð������»���������
���GUI�����������я�����»������������������������������«������µ���²¼

��򏩡³�����Џ����򏪳���2
(\���\���\���\��\���\���)������Windows\���\·\��я�����»���������
���Ksar������Java\��\��\�������������������OK

\���\���\¹\������¼\���������\���\���\���\������¼\������²��ҏ�������쏢��kSar.jar��¡ߏ�����\���\���\���\���\���\���\���

���»��������Џ����򏪳���1
\µ���¼\о���������\���\­\¹\���\���\���\���\�����돫�������DL
��쏢��DATA��¡ߡ�쏢��LOAT FROM TEXT FILE��¡�

��\���\­\¹\���\���\���\���\�����돫��������
# sar ����̏����ӏ�����\���\��\·\���\��� > sar.xx.txt

���»��������Џ����򏪳���2
\µ���¼\Ð������SSH\���\��\���\���
����DATA��¡ߡ�쏢��LAUNCH SSH COMMAND��¡�
��쏢��SSH COMMAND��¡ߏ���������̏����ӏ�����\³\���\���\��������ҏ����Џ���(\���\���\���\���\���������sar -A)

���\��\���\���\��\���\���
����DATA��¡ߡ�쏢��EXPORT TO **��¡ߏ�����³���¼���\���\���\���\���·���¼�돢����½Ð�������������­������


���³���³������������������������������»�ߏ����������ď����я��������ޏ�����MRTG�����������������������я��������������������폢�폢��

e89b1041.jpg

tuzzy92 at 00:18����Permalink����Comments(0)����

2009������01·���20������

\���\���\¹\������¼\������·������3�����䏢���ď����������ď��«���������½���������½������sar������»��������������������Ώ�����

���\���\���\¹\������¼\���
# yum install sysstat

���³������
# yum list sysstat
Setting up repositories
Reading repository metadata in from local files
Installed Packages
sysstat.i386 5.0.5-19.el4 installed
#

���\���\���\���\���\���������¾��؏�����
# cat /etc/cron.d/sysstat
# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A

#

��10����̏�����������²��ҏ�����(\���\���\���\������¾ = sa�����䏪����)
��23»���53����̏�����\Ð\���\���\������\���\­\¹\���\���\���\���\��������������С�¹(\���\���\���\������¾ = sar�����䏪����)

# cat /etc/sysconfig/sysstat
# How long to keep log files (days), maximum is a month
HISTORY=7
#

�񡯏����򏪤�������䡭��ӏ�����7�����䡭���


���»���������������
������½��돩Ώ�����¾��آ�·
# sar [\���\��\·\���\���][������][²��я�ď��]

# sar 1 5
Linux 2.6.9-78.0.8.EL (hogehoge) 01/20/09

01:20:36 CPU %user %nice %system %iowait %idle
01:20:37 all 0.00 0.00 0.00 0.00 100.00
01:20:38 all 0.00 0.00 0.99 0.00 99.01
01:20:39 all 0.00 0.00 0.00 0.00 100.00
01:20:40 all 0.00 0.00 0.00 0.00 100.00
01:20:41 all 4.95 0.00 6.93 0.00 88.12
Average: all 1.00 0.00 1.60 0.00 97.40
#

���²���µ�������¾��آ�·
# sar [\���\��\·\���\���][���о���\���\���\���\���]

����\���\���\���
# sar -r -s 10:00:00 -e 11:00:00 -f /var/log/sa/sa19
Linux 2.6.9-78.0.8.EL (hoghoge) 01/19/09

10:00:01 kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad
10:10:01 4584 250388 98.20 121264 18932 505800 208 0.04 0
10:20:01 4588 250384 98.20 121492 18928 505800 208 0.04 0
10:30:01 6508 248464 97.45 119868 18920 505800 208 0.04 0
10:40:01 6192 248780 97.57 120124 18924 505800 208 0.04 0
10:50:01 6272 248700 97.54 120320 18920 505800 208 0.04 0
Average: 5629 249343 97.79 120614 18925 505800 208 0.04 0
#

����CPU
# sar -u -s 10:00:00 -e 11:00:00 -f /var/log/sa/sa19
Linux 2.6.9-78.0.8.EL (hoghoge) 01/19/09

10:00:01 CPU %user %nice %system %iowait %idle
10:10:01 all 0.46 0.00 0.68 0.02 98.83
10:20:01 all 0.54 0.00 0.69 0.02 98.75
10:30:01 all 0.49 0.00 0.68 0.02 98.80
10:40:01 all 0.49 0.00 0.68 0.02 98.81
10:50:01 all 0.49 0.00 0.67 0.02 98.82
Average: all 0.50 0.00 0.68 0.02 98.80
#

����I/O
# sar -b -s 10:00:00 -e 11:00:00 -f /var/log/sa/sa19
Linux 2.6.9-78.0.8.EL (hoghoge) 01/19/09

10:00:01 tps rtps wtps bread/s bwrtn/s
10:10:01 0.58 0.00 0.58 0.00 8.92
10:20:01 0.50 0.00 0.50 0.00 7.78
10:30:01 0.52 0.00 0.52 0.00 7.90
10:40:01 0.53 0.00 0.53 0.00 8.42
10:50:01 0.51 0.00 0.51 0.00 7.65
Average: 0.53 0.00 0.53 0.00 8.14
#

����\������¼\���\��\���\������¼\���
# sar -q -s 10:00:00 -e 11:00:00 -f /var/log/sa/sa19
Linux 2.6.9-78.0.8.EL (hoghoge) 01/19/09

10:00:01 runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
10:10:01 1 97 0.00 0.00 0.00
10:20:01 1 95 0.00 0.00 0.00
10:30:01 1 97 0.00 0.00 0.00
10:40:01 1 97 0.00 0.00 0.00
10:50:01 1 95 0.00 0.00 0.00
Average: 1 96 0.00 0.00 0.00
#

����\���\���\���\������¼\���(EDEV������\��\������¼¾��Ï�����)
# sar -n DEV -s 10:00:00 -e 11:00:00 -f /var/log/sa/sa19 | grep eth0
10:10:01 eth0 3.06 3.00 280.64 653.63 0.00 0.00 0.00
10:20:01 eth0 3.48 3.45 349.48 715.37 0.00 0.00 0.00
10:30:01 eth0 3.22 3.18 301.34 677.39 0.00 0.00 0.00
10:40:01 eth0 3.12 3.09 294.16 663.91 0.00 0.00 0.00
10:50:01 eth0 3.06 3.01 285.25 657.08 0.00 0.00 0.00
Average: eth0 3.19 3.14 302.17 673.48 0.00 0.00 0.00
#

����\���\Ð\���\¹
# sar -d -p -s 10:00:00 -e 11:00:00 -f /var/log/sa/sa19
Linux 2.6.9-78.0.8.EL (hoghoge) 01/19/09

10:00:01 DEV tps rd_sec/s wr_sec/s
10:10:01 ram0 0.00 0.00 0.00
10:10:01 ram1 0.00 0.00 0.00
10:10:01 ram2 0.00 0.00 0.00
10:10:01 ram3 0.00 0.00 0.00
10:10:01 ram4 0.00 0.00 0.00
10:10:01 ram5 0.00 0.00 0.00
10:10:01 ram6 0.00 0.00 0.00
10:10:01 ram7 0.00 0.00 0.00
10:10:01 ram8 0.00 0.00 0.00
10:10:01 ram9 0.00 0.00 0.00
10:10:01 ram10 0.00 0.00 0.00
10:10:01 ram11 0.00 0.00 0.00
10:10:01 ram12 0.00 0.00 0.00
10:10:01 ram13 0.00 0.00 0.00
10:10:01 ram14 0.00 0.00 0.00
10:10:01 ram15 0.00 0.00 0.00
10:10:01 hda 0.58 0.00 8.92
10:10:01 hda1 0.00 0.00 0.00
10:10:01 hda2 0.58 0.00 8.92
10:10:01 hdc 0.00 0.00 0.00
10:10:01 nodev 0.00 0.00 0.00
10:10:01 md0 0.00 0.00 0.00
10:20:01 ram0 0.00 0.00 0.00
10:20:01 ram1 0.00 0.00 0.00
10:20:01 ram2 0.00 0.00 0.00
10:20:01 ram3 0.00 0.00 0.00
10:20:01 ram4 0.00 0.00 0.00
10:20:01 ram5 0.00 0.00 0.00
10:20:01 ram6 0.00 0.00 0.00
10:20:01 ram7 0.00 0.00 0.00
10:20:01 ram8 0.00 0.00 0.00
10:20:01 ram9 0.00 0.00 0.00
10:20:01 ram10 0.00 0.00 0.00
10:20:01 ram11 0.00 0.00 0.00
10:20:01 ram12 0.00 0.00 0.00
10:20:01 ram13 0.00 0.00 0.00
10:20:01 ram14 0.00 0.00 0.00
10:20:01 ram15 0.00 0.00 0.00
10:20:01 hda 0.50 0.00 7.78
10:20:01 hda1 0.00 0.00 0.00
10:20:01 hda2 0.50 0.00 7.78
10:20:01 hdc 0.00 0.00 0.00
10:20:01 nodev 0.00 0.00 0.00
10:20:01 md0 0.00 0.00 0.00
10:30:01 ram0 0.00 0.00 0.00
10:30:01 ram1 0.00 0.00 0.00
10:30:01 ram2 0.00 0.00 0.00
10:30:01 ram3 0.00 0.00 0.00
10:30:01 ram4 0.00 0.00 0.00
10:30:01 ram5 0.00 0.00 0.00
10:30:01 ram6 0.00 0.00 0.00
10:30:01 ram7 0.00 0.00 0.00
10:30:01 ram8 0.00 0.00 0.00
10:30:01 ram9 0.00 0.00 0.00
10:30:01 ram10 0.00 0.00 0.00
10:30:01 ram11 0.00 0.00 0.00
10:30:01 ram12 0.00 0.00 0.00
10:30:01 ram13 0.00 0.00 0.00
10:30:01 ram14 0.00 0.00 0.00
10:30:01 ram15 0.00 0.00 0.00
10:30:01 hda 0.52 0.00 7.90
10:30:01 hda1 0.00 0.00 0.00
10:30:01 hda2 0.52 0.00 7.90
10:30:01 hdc 0.00 0.00 0.00
10:30:01 nodev 0.00 0.00 0.00
10:30:01 md0 0.00 0.00 0.00
10:40:01 ram0 0.00 0.00 0.00
10:40:01 ram1 0.00 0.00 0.00
10:40:01 ram2 0.00 0.00 0.00
10:40:01 ram3 0.00 0.00 0.00
10:40:01 ram4 0.00 0.00 0.00
10:40:01 ram5 0.00 0.00 0.00
10:40:01 ram6 0.00 0.00 0.00
10:40:01 ram7 0.00 0.00 0.00
10:40:01 ram8 0.00 0.00 0.00
10:40:01 ram9 0.00 0.00 0.00
10:40:01 ram10 0.00 0.00 0.00
10:40:01 ram11 0.00 0.00 0.00
10:40:01 ram12 0.00 0.00 0.00
10:40:01 ram13 0.00 0.00 0.00
10:40:01 ram14 0.00 0.00 0.00
10:40:01 ram15 0.00 0.00 0.00
10:40:01 hda 0.53 0.00 8.42
10:40:01 hda1 0.00 0.00 0.00
10:40:01 hda2 0.53 0.00 8.42
10:40:01 hdc 0.00 0.00 0.00
10:40:01 nodev 0.00 0.00 0.00
10:40:01 md0 0.00 0.00 0.00
10:50:01 ram0 0.00 0.00 0.00
10:50:01 ram1 0.00 0.00 0.00
10:50:01 ram2 0.00 0.00 0.00
10:50:01 ram3 0.00 0.00 0.00
10:50:01 ram4 0.00 0.00 0.00
10:50:01 ram5 0.00 0.00 0.00
10:50:01 ram6 0.00 0.00 0.00
10:50:01 ram7 0.00 0.00 0.00
10:50:01 ram8 0.00 0.00 0.00
10:50:01 ram9 0.00 0.00 0.00
10:50:01 ram10 0.00 0.00 0.00
10:50:01 ram11 0.00 0.00 0.00
10:50:01 ram12 0.00 0.00 0.00
10:50:01 ram13 0.00 0.00 0.00
10:50:01 ram14 0.00 0.00 0.00
10:50:01 ram15 0.00 0.00 0.00
10:50:01 hda 0.51 0.00 7.65
10:50:01 hda1 0.00 0.00 0.00
10:50:01 hda2 0.51 0.00 7.65
10:50:01 hdc 0.00 0.00 0.00
10:50:01 nodev 0.00 0.00 0.00
10:50:01 md0 0.00 0.00 0.00
Average: ram0 0.00 0.00 0.00
Average: ram1 0.00 0.00 0.00
Average: ram2 0.00 0.00 0.00
Average: ram3 0.00 0.00 0.00
Average: ram4 0.00 0.00 0.00
Average: ram5 0.00 0.00 0.00
Average: ram6 0.00 0.00 0.00
Average: ram7 0.00 0.00 0.00
Average: ram8 0.00 0.00 0.00
Average: ram9 0.00 0.00 0.00
Average: ram10 0.00 0.00 0.00
Average: ram11 0.00 0.00 0.00
Average: ram12 0.00 0.00 0.00
Average: ram13 0.00 0.00 0.00
Average: ram14 0.00 0.00 0.00
Average: ram15 0.00 0.00 0.00
Average: hda 0.53 0.00 8.14
Average: hda1 0.00 0.00 0.00
Average: hda2 0.53 0.00 8.14
Average: hdc 0.00 0.00 0.00
Average: nodev 0.00 0.00 0.00
Average: md0 0.00 0.00 0.00
#

tuzzy92 at 01:32����Permalink����Comments(1)����

2008������12·���16������

\½���¼\¹\���\���\�ޏ��¼\��������ҡ���������� paco

����µ�ߏ��·�����ӏ�����������XOOPS�����ҏ����Џ����������������Ώ����� ��¡ߏ�����²��я��������¾���µ���µ�����я�������µ��𡯏�����������������������������paco������»����·�����������Ώ����ď�¡�

FreeBSD������������������������­�����ď�����������»�ߏ����������������������ď��ޏ�����BSD���������������Ð�ޏ�Џ��·���������µ���������������·��������������
Note:
Paco does not work on systems in which binaries are linked statically, like
FreeBSD or OpenBSD.

������CentOS4.7������paco������\���\���\¹\������¼\������·»����·�����������Ώ����ď�¡�

���paco
# wget http://downloads.sourceforge.net/paco/paco-2.0.6.tar.gz
# tar xvfz paco-2.0.6.tar.gz
# cd paco-2.0.6 ; pwd

# ./configure

No package 'gtkmm-2.4' found
configure: error: Package requirements (gtkmm-2.4 >= 2.12) were not met:

Ž���(Ž��Ρ��Ž���Ž���)Ž��Ž���Ž��

���������(yum���������«���������«����������������������������)gtkmm������\���\���\¹\������¼\������·�����������Ï��������¹������������
# wget http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.14/gtkmm-2.14.3.tar.gz
# tar xvzf gtkmm-2.14.3.tar.gz
# cd gtkmm-2.14.3 ; pwd
# ./configure

Package glibmm-2.4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glibmm-2.4.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glibmm-2.4' found

Ž���(Ž��Ρ��Ž���Ž���)Ž��Ž���Ž��

���������(yum���������«���������«����������������������������)glibmm������\���\���\¹\������¼\������·�����������Ï��������¹������������
# wget http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.18/glibmm-2.18.1.tar.gz
# tar xvfz glibmm-2.18.1.tar.gz
# cd glibmm-2.18.1 ; pwd
# ./configure

Package sigc++-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sigc++-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sigc++-2.0' found

Ž���(Ž��Ρ��Ž���Ž���)Ž��Ž���Ž��

���������(yum���������«���������«����������������������������)�����돪�²¼¼«½���
Ž���(Ž��Ρ��Ž���Ž���)Ž��Ž���Ž��


����³���³���«�����������䏪���ԡ��
# cd paco-2.0.6 ; pwd
# ./configure --help | grep gpaco
--disable-gpaco disable compiling gpaco (the GTKMM port of paco)

# ./configure --disable-gpaco
# make
# make install
# make logme ��paco¼«��ď��������paco���������Ð������

���³������
# paco -a
paco-2.0.6

���»����·������rsync3.0.4������\���\���\¹\������¼\������·�����������Ώ�����
# tar xvfz rsync-3.0.4.tar.gz
# cd rsync-3.0.4 ; pwd
# ./configure && make

# paco -D make install ��«���³���³������»��ӏ���

mkdir -p /usr/local/bin
/usr/bin/install -c -m 755 rsync /usr/local/bin
mkdir -p /usr/local/share/man/man1
mkdir -p /usr/local/share/man/man5
if test -f rsync.1; then /usr/bin/install -c -m 644 rsync.1 /usr/local/share/man/man1; fi
if test -f rsyncd.conf.5; then /usr/bin/install -c -m 644 rsyncd.conf.5 /usr/local/share/man/man5; fi

��³������(-1������1¹���1\���\���\�ޏ��¼\������½¼��������\���\��\·\���\���)
# paco -a -1
paco-2.0.6
rsync-3.0.4

(¼«����̏�����)\���\���\¹\������¼\������¼������������²������·�����������Ώ�����������
FreeBSD������»�����𡯏�������������������»�������돢�������ޏ��������«�����������������������𡭢����������

��PS
���¾���µ���µ������¾��Ï����я����Ѣ�������������̏����������Ï�𡭏�𡭏������������������¹����

tuzzy92 at 03:39����Permalink����Comments(2)����

2008������11·���24������

scponly

FTP������������������������������
SCP������»������������»�����ď�������¡��ޏ�����SSH������\µ���¼\Ð\���\��\���\��я��µ���»�����ď�����������������
¹¹������������������������\���\��\���\���\���\����돪�³�돢ġ����������»�����ď�����������������
���½�����я��������������̏������������������������������ď�����scponly

���Ï�����¼��HP
http://www.sublimation.org/scponly/wiki/index.php/Main_Page

����mergelog��¡ߏ���\���\���\���������¾��ԏ�������¡ߏ���\���\���\������½������������������¡ߏ����������������ӏ��������«���������������¹���������¾�����
CentOS4.7+scponly4.8+WinSCP4.17������������chroot�����������������������������¾���


���\���\���\¹\������¼\���
# wget http://jaist.dl.sourceforge.net/sourceforge/scponly/scponly-4.8.tgz
# tar xfz scponly-4.8.tgz
# cd scponly-4.8 ; pwd
/usr/local/src/scponly-4.8
#

# ./configure --prefix=/usr/local/scponly --enable-chrooted-binary --enable-winscp-compat
# make

# make install
echo "0" > debuglevel
/usr/bin/install -c -d /usr/local/scponly/bin
/usr/bin/install -c -d /usr/local/scponly/man/man8
/usr/bin/install -c -d /usr/local/scponly/etc/scponly
/usr/bin/install -c -o 0 -g 0 scponly /usr/local/scponly/bin/scponly
/usr/bin/install -c -o 0 -g 0 -m 0644 scponly.8 /usr/local/scponly/man/man8/scponly.8
/usr/bin/install -c -o 0 -g 0 -m 0644 debuglevel /usr/local/scponly/etc/scponly/debuglevel
if test "xscponlyc" != "x"; then \
/usr/bin/install -c -d /usr/local/scponly/sbin; \
rm -f /usr/local/scponly/sbin/scponlyc; \
cp scponly scponlyc; \
/usr/bin/install -c -o 0 -g 0 -m 4755 scponlyc /usr/local/scponly/sbin/scponlyc; \
fi
#

���\��\«\���\���\�����돫�����(½���²��я���������)
# make jail
/usr/bin/install -c -d /usr/local/scponly/bin
/usr/bin/install -c -d /usr/local/scponly/man/man8
/usr/bin/install -c -d /usr/local/scponly/etc/scponly
/usr/bin/install -c -o 0 -g 0 scponly /usr/local/scponly/bin/scponly
/usr/bin/install -c -o 0 -g 0 -m 0644 scponly.8 /usr/local/scponly/man/man8/scponly.8
/usr/bin/install -c -o 0 -g 0 -m 0644 debuglevel /usr/local/scponly/etc/scponly/debuglevel
if test "xscponlyc" != "x"; then \
/usr/bin/install -c -d /usr/local/scponly/sbin; \
rm -f /usr/local/scponly/sbin/scponlyc; \
cp scponly scponlyc; \
/usr/bin/install -c -o 0 -g 0 -m 4755 scponlyc /usr/local/scponly/sbin/scponlyc; \
fi
chmod u+x ./setup_chroot.sh
./setup_chroot.sh

Next we need to set the home directory for this scponly user.
please note that the user's home directory MUST NOT be writeable
by the scponly user. this is important so that the scponly user
cannot subvert the .ssh configuration parameters.

for this reason, a writeable subdirectory will be created that
the scponly user can write into.

Username to install [scponly]scpuser : ��«��돫�����\��\«\���\���\���
home directory you wish to set for this user [/home/scpuser] : ��«\��叢�¼\���\���\��\���\���\���\���
name of the writeable subdirectory [incoming] : ��«��돫¢����\���\��\���\���\���\���

creating /home/scpuser/incoming directory for uploading files

Your platform (Linux) does not have a platform specific setup script.
This install script will attempt a best guess.
If you perform customizations, please consider sending me your changes.
Look to the templates in build_extras/arch.
- joe at sublimation dot org

please set the password for scpuser:
Changing password for user scpuser.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
if you experience a warning with winscp regarding groups, please install
the provided hacked out fake groups program into your chroot, like so:
cp groups /home/scpuser/bin/groups
#

�����̏����������돪؏�����¼��؏��ޏ���������돢�������ď�����
# cp -ip ./groups /usr/local/scponly/bin/.

���2²��я�����돪�¹��Ώ�����\��\«\���\���\�����돫�����½��������
# cp -ip ./setup_chroot.sh /usr/local/scponly/bin/.
# cp -ip ./config.h /usr/local/scponly/bin/.

���\��\«\���\���\�����돫�����(2²��я�����돪�¹���)
# /usr/local/scponly/bin/setup_chroot.sh

Next we need to set the home directory for this scponly user.
please note that the user's home directory MUST NOT be writeable
by the scponly user. this is important so that the scponly user
cannot subvert the .ssh configuration parameters.

for this reason, a writeable subdirectory will be created that
the scponly user can write into.

Username to install [scponly]scpuser2
home directory you wish to set for this user [/home/scpuser2]
name of the writeable subdirectory [incoming]

creating /home/scpuser2/incoming directory for uploading files

Your platform (Linux) does not have a platform specific setup script.
This install script will attempt a best guess.
If you perform customizations, please consider sending me your changes.
Look to the templates in build_extras/arch.
- joe at sublimation dot org

please set the password for scpuser2:
Changing password for user scpuser2.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
if you experience a warning with winscp regarding groups, please install
the provided hacked out fake groups program into your chroot, like so:
cp groups /home/scpuser2/bin/groups
#


�����돫�����\��\«\���\���\���³������
# id scpuser ; finger scpuser
uid=9004(scpuser) gid=9005(scpuser) groups=9005(scpuser)
Login: scpuser Name: (null)
Directory: /home/scpuser Shell: /usr/local/scponly/sbin/scponlyc
Never logged in.
No mail.
No Plan.
#

# id scpuser2 ; finger scpuser2
uid=9005(scpuser2) gid=9006(scpuser2) groups=9006(scpuser2)
Login: scpuser2 Name: (null)
Directory: /home/scpuser2 Shell: /usr/local/scponly/sbin/scponlyc
Never logged in.
No mail.
No Plan.
#


���/etc/shells ������²���
# /usr/local/scponly/sbin/scponlyc >> /etc/shells
# /usr/local/scponly/bin/scponly >> /etc/shells

��scponlyc������chroot scponly������chroot���������·���������������­������shell

���WinSCP�����������������䏪�³�������½���·������\��\������¼
==============================
SCP���������������������¾�����������³«»������������­���������»�����я�¡�SCP����\���\���\¹\������¼\������µ������������������������\���\¹���̏��������������������������������³������������³���������·���������������������µ��������¡�SCP����������������������������SFTP������»����·�����������Ώ��������³�����������ҡ�«���������������¹��¡�
\³\���\���\��������������������������� 1 ������¼��돪���ԏ��·���������·������
==============================

/chroot/ ������������/dev/null ���̏��µ�����������������䏪�³���������­���������������������·������

���������/chroot/dev/null ��돫�����

# cd /home/scpuser/ ; pwd
/home/scpuser
# mkdir ./dev
# mknod -m 666 ./dev/null c 1 3
# chmod 666 ./dev/null
#

����������������������OK������
������¼��HP������FAQ���������­�����������я�����½��Џ������������������������ď�����orz

http://www.sublimation.org/scponly/wiki/index.php/Help:Contents

��̏������������돫⏪����
Chroot and CentOS 5.x
On a recent CentOS (5.2 here), "sftp-server" doesn't work from scratch after you've setup your jail during the scponly install (via make jail).

During "make jail", let's say you specified /chroot/dir/ as your chroot main path, here are the next few steps you'll have to do in order to have your secure sftp access work :

edit /chroot/dir/etc/ld.so.conf and replace its content with :
/lib
/usr/lib
now type ldconfig -r /chroot/dir/
copy /lib64/ld-linux-x86-64.so.* in /chroot/dir/lib64/
copy /etc/group in /chroot/dir/etc/
create the folder /chroot/dir/etc/selinux and create a file named "config" there
insert the following content in this file :
SELINUX=disabled
SELINUXTYPE=targeted
SETLOCALDEFS=0
now create the folder /chroot/dir/dev
type mknod /chroot/dir/dev/null c 1 3
type chmod 666 /chroot/dir/dev/null
And there you are.

Retrieved from "http://www.sublimation.org/scponly/wiki/index.php/FAQ"

2f76564c.jpg

tuzzy92 at 02:18����Permalink����Comments(8)����

2008������11·���18������

���������«�����������������ď��«�����������������������\³\���\���\��������ҏ����ď����ď����������������Ώ�����

�돪�³�돢����¾������»����������������������������������

[root@localhost ~]# rm -fr /*
rm: cannot remove directory `/dev/shm': \���\Ð\���\¹���������·������������\���\½���¼\¹����\���\������¼¾��؏����ӏ��������¹
rm: cannot remove `/dev/pts/0': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove directory `/misc': \���\Ð\���\¹���������·������������\���\½���¼\¹����\���\������¼¾��؏����ӏ��������¹
rm: cannot remove directory `/net': \���\Ð\���\¹���������·������������\���\½���¼\¹����\���\������¼¾��؏����ӏ��������¹
rm: cannot remove `/proc/scsi/device_info': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove `/proc/scsi/scsi': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove `/proc/asound/I82801AAICH': µ���²������µ��������������������������������������돫��������¹

(��¢�)

rm: cannot remove directory `/sys/fs': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove directory `/var/lib/nfs/rpc_pipefs/statd': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove directory `/var/lib/nfs/rpc_pipefs/portmap': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove directory `/var/lib/nfs/rpc_pipefs/nfs': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove directory `/var/lib/nfs/rpc_pipefs/mount': µ���²������µ��������������������������������������돫��������¹
rm: cannot remove directory `/var/lib/nfs/rpc_pipefs/lockd': µ���²������µ��������������������������������������돫��������¹
[root@localhost ~]#

tuzzy92 at 02:07����Permalink����Comments(3)����

2008������09·���24������

[CentOS]4.7µ­����돢����yum������rpm������remove���·������²�����̏��򏪤��������Џ�����»��ӏ�����������������������������

Cent4\Ð���¼\���\���\���\��\���\��µ­����돢����
(�����쏢������������������������)yum������rpm������remove���·�����ď�����������¡�

$ cat /etc/issue
CentOS release 4.7 (Final)
Kernel \r on an \m

-bash-3.00$

����rpm yum
http://ftp.iij.ad.jp/pub/linux/centos/4.7/os/i386/CentOS/RPMS/

��rpm���̏���������������������rmp\���\���\���\����������������·������������������������
������rpm������\½���¼\¹���«�����������Џ����������������Ï�����DL

����rpm\½���¼\¹
http://www.rpm.org/

��make���������³���ޏ�����
gccm������remove���·�����ď������̏�����������������������

����\��\������¼\���\���\»���¼\���
make[1]: *** [all-recursive] \��\������¼ 1
make[1]: Leaving directory `/usr/local/src/rpm-4.4.2.3'
make: *** [all] \��\������¼ 2

\µ���¼\���\¹�������ޏ�����������������������������������¼�������µ��㏢���Ώ�����(������������������������)������µ������µ���»�����������Ï�¡�
�񡯏�돩�\���\���\¹\������¼\������������������ޏ��������ޏ��������ӏ��������ޏ�¡ߏ�����µ�������̏������������������ӏ����������������㏢������¡ߏ����������������������������򏢱��Џ�����������¡�


tuzzy92 at 05:25����Permalink����Comments(0)����

2008������08·���28������

proftpd \���\���\���\¹\���\���\�ߏ���������¾���

����­������¾��آ�·������������FFFTP/�����я����������\������¼\�������������䏪�³���·�����ď�����\���\���\���\¹\���\���\�ߏ���GMT������������������
CentOS 4.6
FFFTP Version 1.96
ProFTPD Version 1.3.1

DefaultRoot ~ !wheel
TimesGMT off

TimesGMT off ���������·���������������������������������������я��폢����»�ߏ���������������㏢���������Ώ����ď�¡�
�����������������������я����������\������¼\�������������������������������������������䏪����»��С���ӏ��������½¼�����µ������������

��򏢱���돩�
\������¼\«\���\���\���\�������»²¾������¹������\���\���\���\���(/etc/localtime)������
DefaultRoot������������������»²¾������������­���������������«������

��򏪤Ð�ޏ�Џ�����1
�����������\������¼\�����������¹������

# usermod -G wheel �����я����������\������¼\��
OK���������ޏ�����DefaultRoot�����¡돪؏�����µ�����������������������я���

��򏪤Ð�ޏ�Џ�����2
DefaultRoot �����ҏ��������������¹

proftpd.conf ������DefaultRoot ~ !wheel���������ԏ���̏����ҏ�돫�½���
OK���������ޏ����������䏪���ӏ��¾��������

��򏪤Ð�ޏ�Џ�����3
SetEnv TZ JST-9 ������proftpd.cnf������������²���

TimesGMT off������SetEnv TZ JST-9������µ­½���
OK ���³���������̡돫������ӏ���������������

��򏪤Ð�ޏ�Џ�����4
1.3.1rc1�돪�¹��Ώ�����������½������µ���µ���������������������������������·����������
http://www.proftpd.org/docs/RELEASE_NOTES-1.3.1rc1

�����䏩����(2008/08/28)���½��돩Ώ�돪����·������������ 1.3.2rc1

�����������я�����\��\���\��\������¼\������·�����������Ώ�����
# proftpd -v
ProFTPD Version 1.3.2rc1

������SetEnv���������ԏ���̏����ҏ�돫�½��䏢�·������µ��������

FFFTP������������³���������������Џ��������������������������«�����������ď�������� orz

tuzzy92 at 02:08����Permalink����Comments(2)����

2008������08·���20������

CentOS5.2 + MySQL5.1x

CentOS5.2������base+developmenttools���������Ώ�����\���\���\¹\������¼\���

���½���·������MySQL5.1x������\½���¼\¹���«������\���\���\¹\������¼\������·�����������Ï��������·�����ď�����
configure������\��\������¼

checking for termcap functions library... configure: error: No curses/termcap library found

ncurses������ncurses-devel������yum������\���\���\¹\������¼\������¹������»��ӏ�����²��я�����

�����������������Ώ�����ncurses������������(http://ja.wikipedia.org/ �������������돫⏪����)
======
���¼�����ӏ������돪����������·������������·���¼�돢����\���\­\¹\���\������¼\��\���\���\���\���\�����¼\¹����TUI���������ҏ�돫�����¹�����������ď�����������API�����ҏ����Ѣ�����¹������\���\���\���\���\�����¡�
======

tuzzy92 at 23:18����Permalink����Comments(0)����

2008������07·���24������

Master�����ҏ����������������돢����\���\��\���\�ޏ��¼\·\���\��я��·�����������Ώ�����

���¾��آ�·
���Master(192.168.1.1)
OS : CentOS 4.6
MySQL : 5.1.24-rc
datadir : /usr/local/mysql/var

���Slave(192.168.1.22)
OS : CentOS 5.2
MySQL : 5.1.24-rc
datadir : /usr/local/mysql/var

���Master�����Ώ�����
���my.cnf(server-id�����Ώ�����)

[mysqld]
log-bin
server-id=1
====================

���\���\��\���\�ޏ��¼\·\���\��я�����\��\«\���\���\�����돫�����
GRANT REPLICATION SLAVE ON *.* TO repl@'192.168.1.22' IDENTIFIED BY '\���\¹\������¼\���';

mysql> select host,user,password from user where user like 'repl';
+---------------+------+-----------+
| host | user | password |
+---------------+------+-----------+
| 192.168.1.22 | repl | \���\¹\������¼\���|
+---------------+------+-----------+


���Slave�����Ώ�����
���my.cnf(server-id���̏��«�����ӏ��������������ޏ��������Ð������򏫳)

[mysqld]
log-bin
server-id=22
====================


���\������¼\��ġ돪�¹���
Slave������Mysql�����ҏ�����»���
Datadir�����ҏ������돫�½���

Master������Datadir������Slave������scp
Slave������Mysql������µ��������

���\���\��\���\�ޏ��¼\·\���\���³«»���
���Master������\Ð\���\���\���\���\�돢���¡돪�������¾��Ï�����³������

+---------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+---------------------+----------+--------------+------------------+
| fw-tuzzy-bin.000089 | 23496 | | |
+---------------------+----------+--------------+------------------+

���Slave������Master¾��Ï�����»���������


mysql> CHANGE MASTER TO
mysql> MASTER_HOST = '192.168.1.1',
mysql> MASTER_USER = 'repl',
mysql> MASTER_PASSWORD = '\���\¹\������¼\���',
mysql> MASTER_LOG_FILE = 'fw-tuzzy-bin.000089',
mysql> MASTER_LOG_POS = 23496;

mysql>START SLAVE;

���³������(�돫�������¾�����¢�)
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.1
Master_User: repl
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Seconds_Behind_Master: 0

tuzzy92 at 03:34����Permalink����Comments(4)����

2008������06·���28������

mplayer Plug-in 3.55

firefox3������¾�����������¹��𡯏����ď������돫������ԏ����²�����돩����������̏��������­�����������������������������ď�¡�
mplayer plug-in������\��\���\��\������¼\���������¾��������������⏢���������ď�¡�

����mplayer plug-in
http://mplayerplug-in.sourceforge.net/

about:plugins ������������³����������OK��¡돢¡�b

b40bbdc5.jpg

tuzzy92 at 23:45����Permalink����Comments(0)����

2008������06·���24������

net-snmp-5.4.1.2

\½���¼\¹������������\���\���\¹\������¼\������·�����������Ï��������·�����ď�����²¼µ­\��\������¼

/local/snmpd/lib
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
make[1]: *** [snmpd] Error 1
make[1]: Leaving directory `/home/works/INSTALL/CENTOS/SNMPD/net-snmp-5.4.1.2/agent'
make: *** [subdirs] Error 1

(�������������������«������)yum������elfutils-devel������\���\���\¹\������¼\������¹������»��ӏ�����²��я�����

# /usr/local/snmpd/bin/snmpwalk -V
NET-SNMP version: 5.4.1.2

tuzzy92 at 01:24����Permalink����Comments(0)����

2008������06·���04������

sl

�����������ď����돢����\���\��ď�����2������

\��ď��¼\���\���\���������SL�����ҏ����ӏ��������»�����������á��

# wget http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/sl/sl.tar
# tar xvf sl.tar
(# wget http://www.izumix.org.uk/sl/sl5-1.patch)
# cd sl ; pwd
(# patch -i ../sl5-1.patch)
# make
# mv -i sl /usr/local/bin/.

\���\���\��������ҏ����ӏ��������������������·����������������������������������������������������������½����������������»���������
���µ�������������������������������������·���«���ޏ�����������(����������\���\���)


���Ï��­���������µ»��� % sl(\½���¼\¹�����只���叢�µ)
http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/

����SL ²��Џ�����·��²���(\���\���\��������只���叢�µ)
http://www.izumix.org.uk/sl/

²��Џ�����\���\���\���������������(������¼��HP�������������돫⏪����)
1: ����������⏢��������²���
2: µ���¼��ӏ���������²���
3: ����¼��ӏ����¡ޏ�򏪱���
4: µ���¼��ӏ�����ď�ԏ��������Ï�ď�ԏ�����������������·���������
5: ����¼��ӏ�����\¹\��ԏ��¼\������������Ï�ď�ԏ�����������������·���������
6: ����¼��ӏ����¡ޏ�򏪱��䏢�����­���µ�����ҏ����Ï�ď�ԏ�����������������������·���������
7: ����¼��ӏ��̡ޏ�򏪱��䏢�¹������¾���¹���������, ¼�ߏ�����µ����̡돫�������¾������̏��������«���ޏ��������«��������돩�������¹��Ώ�����������µ����½
8: D51 »��½�������� (�����䏪���ӏ�����²��Ώ����쏪��¼��ӏ��������¹)

tuzzy92 at 01:41����Permalink����Comments(0)����

2008������06·���03������

root��������������돫�½��䏢�������­������������\���\���\���\���(\���\��\���\���\���\���)

��돪������\���\��ď��̏��������������������������Џ�����������������������������������
r@ym@n·�����𡭏�����������

FreeBSD/Linux������root��������������돫�½��䏢�������­������������\���\���\���\���������돫�����������

���FreeBSD7.0
���\���\���\���\�����돫�����/³������
#touch freebsd.txt
#ls -l freebsd.txt
-rw-r--r-- 1 root wheel 0 Jun 4 00:03 freebsd.txt

��������Ώ�����/³������
#chflags schg freebsd.txt
#ls -l freebsd.txt
-rw-r--r-- 1 root wheel 0 Jun 4 00:03 freebsd.txt

�����돫�½��䏢�·�����������Ώ�������쏢�������­������������
#rm -f freebsd.txt
rm: freebsd.txt: Operation not permitted
#

��������Ώ�����²���½���/³������
#chflags noschg freebsd.txt
#ls -l freebsd.txt
-rw-r--r-- 1 root wheel 0 Jun 4 00:03 freebsd.txt

�����돫�½���/³������
#rm -f freebsd.txt
#ls -l freebsd.txt
ls: freebsd.txt: No such file or directory
#

���Linux(CentOS4.6)
���\���\���\���\�����돫�����/³������
# touch linux.txt

# ls -l linux.txt
-rw-r--r-- 1 root root 0 6·��� 3 23:53 linux.txt
# lsattr linux.txt
------------- linux.txt

��������Ώ�����/³������
# chattr +i linux.txt

# ls -l linux.txt
-rw-r--r-- 1 root root 0 6·��� 3 23:53 linux.txt
# lsattr linux.txt
----i-------- linux.txt

�����돫�½��䏢�·�����������Ώ�������쏢�������­������������
# rm -f linux.txt
rm: cannot remove `linux.txt': µ���²������µ��������������������������������������돫��������¹
#

��������Ώ�����²���½���/³������
# chattr -i linux.txt
# lsattr linux.txt
------------- linux.txt
# ls -l linux.txt
-rw-r--r-- 1 root root 0 6·��� 3 23:53 linux.txt

�����돫�½���/³������
# rm -f linux.txt
# ls -l linux.txt
ls: linux.txt: ���½���������������Ï�����\���\���\���\���������\���\��\���\���\���\��������������������������»������
#

������������������������vi������������������������½������������������­������������
���µ�������������������������������������·���«���ޏ�����������(����������\���\���)

tuzzy92 at 23:55����Permalink����Comments(2)����

2008������02·���21������

VirtualPC2007+CentOS5.1

µ�ߏ��·�����ӏ�����������VirtualPC2007������CentOS������\���\���\¹\������¼\���

�����������������������������������������������ď����ԏ���̏�������������돪����

���²��ҏ����䏪���㏢��\���\���
/etc/X11/xorg.conf ������DefaultDepth������24���16������������¹¹(2²���½���)

���\���\���\¹�����ҏ����¼�ޏ��·������������
/boot/grub/grub.conf������kernel�����ԏ���̏�����i8042.noloop�����ҏ�����²���
kernel /boot/vmlinuz-2.6.18-53.1.13.el5 ro root=LABEL=/ rhgb quiet i8042.noloop

vp���³���­�����ҏ�����������

tuzzy92 at 00:52����Permalink����Comments(0)����

2008������02·���10������

Beryl������»��������������������Ώ�����

���³�����я������������­���������¹��¡�

CPU����celeron 2.53
\���\���\��� 1G
\��\���\��� \���\���\��䏢�¼\���(intel)

���\���\���\���\���\�������������²���
# vi /etc/yum.repos.d/fedora-extras.repo

[fedora-extras]
name=Fedora Extras 6 - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-6&arch=$basearch
#mirrorlist=file:///etc/yum.repos.d/local-extras
enabled=0
gpgkey=http://ftp.riken.jp/Linux/fedora/extras/RPM-GPG-KEY-Fedora-Extras
gpgcheck=1

���\���\���\¹\������¼\���
# yum --enablerepo=fedora-extras install beryl* emerald*

# rpm -qa | egrep "beryl|emerald" | sort
beryl-0.2.0-1.fc6
beryl-core-0.2.0-1.fc6
beryl-core-devel-0.2.0-1.fc6
beryl-gnome-0.2.0-1.fc6
beryl-kde-0.2.0-1.fc6
beryl-manager-0.2.0-1.fc6
beryl-plugins-0.2.0-1.fc6
beryl-plugins-unsupported-0.2.0-1.fc6
beryl-settings-0.2.0-1.fc6
beryl-settings-simple-0.2.0-1.fc6
emerald-0.2.0-1.fc6
emerald-devel-0.2.0-1.fc6
emerald-themes-0.2.0-1.fc6

���xorg.conf������½���

# vi /etc/X11/xorg.conf
��­�����ҏ�����²���
==========
Section "Extensions"
Option "Composite" "true"
EndSection
==========

���¼«�����µ�������돪���Ώ�����
����\���\���\������¼��¡ߡ�쏢��\·\¹\���\�����¡ߡ�쏢�ӏ����Ώ�������¡ߡ�쏢�ӏ��½�������¾������������ď�������Ώ�������¡ߡ�쏢��\»\���\·\���\��я�¡ߡ�쏢��¼«�����µ�������돢�¹������\��\���\��\���\�����¡ߡ�쏢�ӏ�����²�����¡�
env LC_ALL=ja_JP.UTF-8 beryl-manager����(�����䏪���䏢�����������­����ecu����������������)

�����Ώ�����������beryl-manager������������¹��ԏ����Ï�¡򏪢��Ώ�����¹��������䏢���������ď������������������������������������̏��������̏����������½�����Ï�¡�

�񡯏��³�����я���������������


tuzzy92 at 23:55����Permalink����Comments(0)����

2007������11·���15������

\���\���\Ð\·\«\���\������̏��µ

�����Ï�����������\������¼\���\µ���¼\Ð���¼������²��ď��������Џ���
����������������𡯏�����iptables�����������������������������������쏢�³�����Ï�������������¡�

security: client 211.120.8.***#33132: view external: query (cache) './NS/IN' denied

$ whois 211.120.8.***
[Querying whois.nic.ad.jp]
[whois.nic.ad.jp]
[ JPNIC database provides information regarding IP address and ASN. Its use ]
[ is restricted to network administration purposes. For further information, ]
[ use 'whois -h whois.nic.ad.jp help'. To only display English output, ]
[ add '/e' at the end of command, e.g. 'whois -h whois.nic.ad.jp xxx/e'. ]

Network Information: [\���\���\���\������¼\���¾��Ï�����]
a. [IP\���\���\���\������¼\���\��\���\���\¹] 211.120.8.128/25
b. [\���\���\���\������¼\������¾] YODOBASHI
f. [���������\���¾] ³���¼��²���¼���\���\���\Ð\·\«\���\���
g. [Organization] Yodobashi Camera Co,Ltd.
m. [�����������¼��ԏ���񏪿���������������] KH899JP
n. [µ»½��Џ���񏪿��������������¼���] KH899JP
p. [\������¼\���\µ���¼\Ð]
[³��������ӏ�����·�������] 2000/08/31
[������µ��Џ�����·�������]
[��돪�½���¹¹���·] 2002/08/07 14:05:41(JST)

¾����돪�¾��Ï�����
----------
\½\���\���\Ð\���\�������\��\���\���\���¼\·���¼³���¼��²���¼��� (SOFTBANK IDC Corp.)
[³�����������Ģ�������] 211.120.0.0/18
\½\���\���\Ð\���\���IDC³���¼��²���¼��� (SOFTBANK IDC Corp.)
SUBA-021-229 [SUBA] 211.120.8.0/24

²¼�돪�¾��Ï�����
----------
³��돪���ӏ��¹������\������¼\��ď��̏����������������»�����я�¡�
$

tuzzy92 at 03:41����Permalink����Comments(0)����

2007������11·���04������

root\µ���¼\ÐIP������¹¹

L.root-servers.net������IP����2007 11/1������������¹¹���µ�����������ď������������·����������������\­\���\���\·\���\µ���¼\Ð���������Ώ����������ҏ�����¹¹��¡�

������·\������¼\���\���\���\���\���\���\���\���������\���\���\���\������¼\���
# wget ftp://rs.internic.net/domain/named.cache

������¹�����³������
# diff named.cache named.root

12,13c12,13
< ; last update: Nov 01, 2007
< ; related version of root zone: 2007110100
---
> ; last update: Jan 29, 2004
> ; related version of root zone: 2004012900
74c74
< L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
---
> L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12

��������Ώ����������ġޏ��
# mv -i named.cache named.root
# /usr/local/bind/sbin/rndc reload

���³������(hansode���µ������ �����Џ��������������»�����������돢�­���������·�����ď���)
# for i in a b c d e f g h i j k l m; do name=${i}.root-servers.net; host -t a ${name}; done
a.root-servers.net has address 198.41.0.4
b.root-servers.net has address 192.228.79.201
c.root-servers.net has address 192.33.4.12
d.root-servers.net has address 128.8.10.90
e.root-servers.net has address 192.203.230.10
f.root-servers.net has address 192.5.5.241
g.root-servers.net has address 192.112.36.4
h.root-servers.net has address 128.63.2.53
i.root-servers.net has address 192.36.148.17
j.root-servers.net has address 192.58.128.30
k.root-servers.net has address 193.0.14.129
l.root-servers.net has address 199.7.83.42
m.root-servers.net has address 202.12.27.33

tuzzy92 at 21:35����Permalink����Comments(0)����

2007������10·���18������

BIND 9.4.1-P1 ������\��\���\��\������¼\���

BIND security.log������������
==============================
security: client 127.0.0.1#43738: view internal: FC R1918 response from Internet for 3.1.168.192.in-addr.arpa
==============================

FC R1918 �돫������ď��폢�폢��

���ޏ��������½�����я����������¡����·�������������
���ޏ��������½�����я����������¡����·�������������

�����������������؏�����������¹��ԏ��«����������������������������¼��HP������FAQ������������³���������·�����ď��������������µ���������½��������������������Q�����ҏ��������«

���������¼��FAQ
http://www.isc.org/index.pl?/sw/bind/FAQ.php

Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?

������������������������Q���������Ð���¹������A���������������������Ώ��������·�����������Ï�����»�ߏ����������ď�������­������µ­½��ҏ��̏���

NOTE:
Future versions of named are likely to do this automatically.

��돪����·\Ð���¼\���\���\��я�����������¾���¼��������������Ώ��������·���������������������������������������³����������������������������

������������»��ӏ�����BIND\��\���\��\������¼\���

���\���\���\���\������¼\�������\���\���\¹\������¼\���
# wget http://ftp.isc.org/isc/bind9/9.4.1-P1/bind-9.4.1-P1.tar.gz
# tar xvfz bind-9.4.1-P1.tar.gz
# cd bind-9.4.1-P1 ; pwd
# ./configure --prefix=/usr/local/bind --with-openssl=/usr/local/ssl
# make
# make install

���³������
# /usr/local/bind/sbin/named -v
BIND 9.4.1-P1

��돩�������\���\��³����������������¾�������ߏ���������
���·���Ð������������������»��ҏ����ҏ��«�����������Ώ�����������

tuzzy92 at 06:31����Permalink����Comments(0)����

2007������10·���07������

OpenOffice2.3\���\������¼\¹

�����ď����������ď�����������¼��HP�����ҏ��«�����ď�����\���\������¼\¹���µ�����������������������ď�¡�

=====�돫⏪����=====
*½��������* *\��\���\��\������¼\��������ҏ�ď��¾���*
\»\­\���\���\���\�򏪢���¼������­������½������µ���̏����������������·�����ď�¡�
\������¼\�����¼������������������«������2.3������\Ð���¼\���\���\���\��\���\�ߏ��¹���������³�����������ҏ�ď��¾��폢�·���������¹��¡�
http://ja.openoffice.org/security/bulletin.html
==============

# wget http://www.dnsbalance.ring.gr.jp/archives/misc/openoffice/localized/ja/2.3.0/OOo_2.3.0_LinuxIntel_install_wJRE_ja.tar.gz
# tar xvfz xvfz OOo_2.3.0_LinuxIntel_install_wJRE_ja.tar.gz
# cd cd OOG680_m5_native_packed-1_ja.9221/RPM/ ; pwd
# rpm -Uvh *.rpm
# cd ./desktop-integration/ ; pwd
# rpm -Uvh openoffice.org-freedesktop-menus-2.3-9215.noarch.rpm

tuzzy92 at 01:40����Permalink����Comments(0)����

2007������09·���23������

avast for linux

µ���µ��㏢����������\���\���\¹\������¼\���

eicar������������¾��⏢��OK ��¡돢¡�b

4c5a8826.jpg

tuzzy92 at 23:13����Permalink����Comments(0)����

2007������09·���22������

firefox2,0.0.7

\��\���\��\������¼\���

# tar xvfz firefox-2.0.0.7.tar.gz
# mv -i firefox-2.0.0.7 /usr/local/.
# rm -i /usr/local/bin/firefox
# ln -s /usr/local/firefox-2.0.0.7/firefox /usr/local/bin/.

tuzzy92 at 23:55����Permalink����Comments(0)����

2007������08·���25������

iptables log analyzer

iptables������\���\�돢����»���³Ð�����쏢�����������돢�������­������iptables log analyzer���������Ώ�����µ­������

���叢����¼��HP
http://iptablelog.sourceforge.net/

���\���\���\¹\������¼\���
# wget http://jaist.dl.sourceforge.net/sourceforge/iptablelog/iptables_logger_v0.4.tar.gz
# tar xvfz iptables_logger_v0.4.tar.gz
# mv -i ./iptables/ /usr/local/.

���mysql db��돫�����
# /usr/local/mysql/bin/mysql

mysql> create database iptables;
mysql> grant create,select,insert on iptables.* to iptables_admin@localhost identified by '\���\¹\������¼\���';
mysql> grant all on iptables.* to iptables_user@localhost identified by '\���\¹\������¼\���';
mysql> exit

# cat /usr/local/iptables/sql/db.sql | /usr/local/mysql/bin/mysql -u iptables_admin -p\���\¹\������¼\��� iptables

���php-mysql \���\���\¹\������¼\���
# yum install php-mysql

���PTables log analyzer�����Ώ�����
���只����¹¹
my $db_password = '\���\¹\������¼\���';
my $log_file = '/var/log/iptables.log';

����\³\���\���\���\��\���\���
#my(%m);
#my($month_nb);
#for $month_nb (0..11) {
# $m{strftime("%b", 0, 0, 0, 1, $month_nb, 96)}=sprintf("%02d",$month_nb+1);
#}

���只����²���
my(%m)=("Jan"=>"01","Feb"=>"02","Mar"=>"03","Apr"=>"04","May"=>"05","Jun"=>"06","Jul"=>"07","Aug"=>"08","Sep"=>"09","Oct"=>"10","Nov"=>"11","Dec"=>"12");

���feed_db.pl ������\���\¹���̏�����������������������������¾���½���������
# ln -s /usr/local/iptables/scripts/feed_db.pl /usr/local/bin/feed_db.pl

���µ��������\¹\���\���\��\���
# vi /etc/init.d/iptablelog

#!/bin/sh
#
# Startup script for the iptables logfile analyzer
#
# chkconfig: - 99 01
# description: The iptables logfile analyzer is a tool for analying logfile of iptables.
# processname: iptablelog
# config: nothing
# Source function library.
. /etc/rc.d/init.d/functions

PATH=/usr/local/bin:/bin:/usr/bin

start() {
if [ -z $(ps ax|grep feed_db.pl|grep -v grep|awk '{ print $1 }') ] ; then
echo -n $"Starting iptablelog"
csh -cf '/usr/local/bin/feed_db.pl &' 2>&1 | logger -t iptablelog &
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/iptablelog
else
echo "iptablelog is already started"
fi
}

stop() {
if [ ! -z $(ps ax|grep feed_db.pl|grep -v grep|awk '{ print $1 }') ] ; then
echo -n $"Stopping iptablelog"
kill $(ps ax|grep feed_db.pl|grep -v grep|awk '{ print $1 }')
until [ -z $(ps ax|grep feed_db.pl|grep -v grep|awk '{ print $1 }') ]; do :; done
echo
rm -f /var/lock/subsys/iptablelog
else
echo "iptablelog is not running"
fi
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
if [ ! -z $(ps ax|grep feed_db.pl|grep -v grep|awk '{ print $1 }') ] ; then
echo -n "iptablelog (pid"
echo -n " `ps ax|grep feed_db.pl|grep -v grep|awk '{ print $1 }'`"
echo ") is running..."
else
echo "iptablelog is stoped"
fi
;;
*)
echo $"Usage: iptablelog {start|stop|restart|status}"
exit 1
esac

exit 0

# chmod +x /etc/init.d/iptablelog
# chkconfig --add iptablelog
# chkconfig iptablelog on
# chkconfig --list iptablelog

���apache²��я�����
# cp -ipR /usr/local/iptables/web/ /usr/local/apache2/htdocs/iptables/
# cd /usr/local/apache2/htdocs/iptables/ ; pwd

# vi config.php
���只����¹¹
$db_password="\���\¹\������¼\���";
$url_base="/iptables/";
$debug=0;

���iptables prefix
��analyze �����������¼�ޏ��µ���»�����������ď����� IPTABLES����������������������prifix���������¹������
--log-prefix "[IPTABLES ���������·������������]: "

tuzzy92 at 20:51����Permalink����Comments(0)����

2007������08·���12������

Linux ������GBA emu

���µ���·�����ď����������������µ�����������Ώ��������ޏ����ď�¡�

µ��������³��������¡�²»������OK��¡�
������������\���\���\���\¹\���\��\���\���������»�������������������������¡�

tuzzy92 at 22:34����Permalink����Comments(0)����
<% for ( var i = 0; i < 7; i++ ) { %> <% } %>
<%= wdays[i] %>
<% for ( var i = 0; i < cal.length; i++ ) { %> <% for ( var j = 0; j < cal[i].length; j++) { %> <% } %> <% } %>
0) { %> id="calendar-61877-day-<%= cal[i][j]%>"<% } %>><%= cal[i][j] %>
Help me"1"
Recent Comments
<%==comments[n].author%>
<% } %>
Help me"2"
Latest article
Help me"3"

'); label.html('\ \���\���\���\���\��\���\���\�돢����������¹­¹��Ï�����\��Џ��¼\½\���\���\���\��돢����������²�������̏��������������ď�����\���\���\­���¼(cookie)������»��������Џ��·���������������������¹��¡�
\ ���³������\Ð\������¼�����ҏ��������������������«�ޏ�䏪���������·��Џ��³���¹���������³������������\���\���\­���¼������»��������Џ�����¾µ����������������ď����������������ď������������������µ���»�����������������ď��������­���������¹��¡�
\ �����������ď�¡�����µ��ҏ�����������������¼���\��Џ��¼\���\������¼���������������������쏢�ޏ�����½���������������¼������³���­��������������������¡�\���\���\­���¼������»��������Џ����ҡ�����������¹���������³���������������������­���������¹��¡�
\ ¾��䏢돪㏢����\���\���\���\���\�񏪿��̏�����µ�̏����я����ҏ��³���������������������µ��������¡�\ '); banner.append(label); var closeButton = $('