วันอังคารที่ 20 กรกฎาคม พ.ศ. 2553

yum install clamd clamav

OS CentOS 5.3

ขั้นตอนที่ 01 : wget -O /etc/yum.repos.d/CentOS-Base.repo http://thzhost.com/files/thai.repo

ขั้นตอนที่ 02 : yum install clamd clamav

ขั้นตอนที่ 03 : clamscan -r -i

LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************

----------- SCAN SUMMARY -----------
Known viruses: 572031
Engine version: 0.95.2
Scanned directories: 1
Scanned files: 2
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 2.329 sec (0 m 2 s)


( ถ้าขึ้น LibClamAV Warning ให้อัพเดรตก่อน ขั้นตอนถัดไป )


ขั้นตอนที่ 04 : freshclam

ขั้นตอนที่ 05 : clamscan -r -i ( สั่ง scan อีกรอบ )

ขั้นตอนที่ 06 : ต้องการ scan แบบไหน ตำแหน่งใด พิมพ์ man clamscan ครับ
from h ttp://www.thaihosttalk.com/index.php?topic=21288.0

font thai centos

ดาวน์โหลดฟอนด์
# wget ftp://linux.thai.net/pub/ThaiLinux/software/thai-ttf/thai-ttf-0.4.6.tar.gz

แตกไฟล์
# tar xvfz thai-ttf-0.4.6.tar.gz

เข้าห้อง
# cd thai-ttf-0.4.6

สร้างห้องไว้ที่
# mkdir /usr/share/fonts/thai-ttf

ก็อปปี้ไฟล์
# cp *.* /usr/share/fonts/thai-ttf/

เพิ่มรายการฟอนท์ไทย เข้าไปในรายการ
# chkfontpath -a /usr/share/fonts/thai-ttf

ตรวจสอบด้วยคำสั่ง จะพบรายการ ฟอนท์ไทยของเรา
#chkfontpath -l

จากนั้นก็ทำการ restart เครื่อง

from http://www.sourcecode.in.th/9M/?p=43

php on centos

# wget -O /etc/yum.repos.d/thai.repo www.icez.net/files/thai.repo
# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.ORG
# yum clean all
# yum list
# yum -y install httpd
# yum -y install php php-mysql
# /etc/init.d/httpd restart
# chkconfig httpd on
# echo "" > /var/www/html/phpinfo.php

from http://www.linuxthai.org/forum/index.php?topic=13447.0

วันพฤหัสบดีที่ 8 กรกฎาคม พ.ศ. 2553

http://www.fiatinfo.com/link.php?fiat=php_conf

http://www.fiatinfo.com/link.php?fiat=php_conf

grant

grant all on radius.* to radius@localhostidentified by 'thaiadmin';

การทำ Hardening server (ปิดช่องโหว่),กำจัด script perl,virus flashy.exe

http://golfreeze.212cafe.com/archive/2006-09-06/hardening-server-script-perlvirus-flashy-exe/

ค่า TTL เมื่อ ใช้คำสั่ง ping คืออะไร

Pinging 61.7.152.115 with 32 bytes of data:

Reply from 61.7.152.115: bytes=32 time=17ms TTL=53
Reply from 61.7.152.115: bytes=32 time=21ms TTL=53
Reply from 61.7.152.115: bytes=32 time=23ms TTL=53
Reply from 61.7.152.115: bytes=32 time=62ms TTL=53
Reply from 61.7.152.115: bytes=32 time=21ms TTL=53
Reply from 61.7.152.115: bytes=32 time=54ms TTL=53
Reply from 61.7.152.115: bytes=32 time=48ms TTL=53
Reply from 61.7.152.115: bytes=32 time=50ms TTL=53
Reply from 61.7.152.115: bytes=32 time=34ms TTL=53
Reply from 61.7.152.115: bytes=32 time=23ms TTL=53
Reply from 61.7.152.115: bytes=32 time=37ms TTL=53
Reply from 61.7.152.115: bytes=32 time=101ms TTL=53
Reply from 61.7.152.115: bytes=32 time=32ms TTL=53
Reply from 61.7.152.115: bytes=32 time=52ms TTL=53

Ping statistics for 61.7.152.115:
Packets: Sent = 14, Received = 14, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 17ms, Maximum = 101ms, Average = 41ms


TTL ใช้บอกจำนวน Router หรือ Network ซึ่ง Traffic ทำการกระโดดข้าม ซึ่งจะต่างกันตามนี้ครับ

TTL 64 จะเป็น ระบบ Linux หรือ Router ขนาดเล็กๆ
TTL 128 เป็น OS พวก X86 เช่น Windows ต่างๆ
TTL 254 เป็น Router ขนาดกลาง และ ใหญ่ ครับ

ค่า TTL จะลดลงตามจำนวน Router ที่มันผ่านครับ

เช่น คุณปิงจากบ้านไปยังจุดหมายปลายทาง ดูตัวอย่างข้างล่างนะครับ

1. คุณปิงจากเครื่องคุณไปยัง เครื่องในวงแลนเดียวกัน ไม่มีการกระโดดผ่าน Router เนื่องจากเครื่องของคุณ และ ปลายทางเป็น OS X86 คุณจะได้ ค่า TTL = 128-0 = 128

2. คุณปิงจากเครื่องคุณไปยัง เครื่องต่างวงแลนกัน มีการกระโดดผ่าน Router 2 ตัว เนื่องจากเครื่องของคุณ และ ปลายทางเป็น OS X86 คุณจะได้ ค่า TTL = 128-2 = 126

3. คุณปิงจากเครื่องคุณไปยัง เครื่องในวงแลนเดียวกัน ไม่มีการกระโดดผ่าน Router เครื่องปลายทางเป็น Linux คุณจะได้ ค่า TTL = 64-0 = 64

4. คุณปิงจากเครื่องคุณไปยัง เครื่องต่างวงแลนกัน มีการกระโดดผ่าน Router 1 ตัว เครื่องปลายทางเป็น Linux คุณจะได้ ค่า TTL = 64-1 = 63

5. คุณปิงจากเครื่องคุณไปยัง Router ในวงแลนเดียวกัน คุณจะได้ ค่า TTL = 254-0 = 254

6. คุณปิงจากเครื่องคุณไปยัง Router ของเพื่อนคุณซึ่งเป็น Router ขนาดเล็ก (Linux Embeded) มีการกระโดดผ่าน 6 Router จะได้ ค่า TTL = 64-6 = 58

7.คุณปิงจากเครื่องคุณไปยัง Router ของ ISP มีการกระโดดข้าม 4 ครั้ง คุณจะได้ ค่า TTL = 254-4 = 250

แล้ว ก็ ถ้า ค่า TTL ต่ำจนถึง จำนวนหนึ่ง ระบบจะตัดสัญญาณทิ้งทั้งหมด ซึ่งจะทำให้เกิดอาการที่เรียกว่า TTL Error หรือ Request time out ครับ
เมื่อค่า TTL มากหมายถึงดีกว่าเพราะว่าสามารถส่งผ่าน HUP ได้มากกว่าคับ...

ที่มา http://www.sysnetcenter.com/board/index.php?topic=269.0