tag:blogger.com,1999:blog-33790730071256316022024-03-12T19:41:49.755-07:00How To Linux freebsd ubuntu centosLaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-3379073007125631602.post-90062211127080452612009-04-01T06:06:00.002-07:002009-04-01T06:07:33.057-07:00การติดตั้ง Mail Server และ Webmail ตอนที่ 34. ต่อไปเป็นการย้ายไฟล์ที่ใช้เรียก openwebmail ทำงาน จาก /usr/local/www/apache22/data-dist/ openwebmail ให้ไปอยู่ที่ /home/mail/public_html <br />gw# cd /usr/local/www/apache22/data-dist/openwebmail<br />gw# ls<br />applet images openwebmail.html<br />doc index.html redirect.html<br />help javascript sounds<br />gw# cp redirect.html /home/mail/public_html/index.html<br /><br /><br />gw# /usr/local/www/cgi-bin/openwebmail/openwebmail-tool.pl --init<br />5. ให้กลับไปปรับแต่งไฟล์ /usr/local/etc/apache22/extra/ httpd-vhosts.conf<br /># cd /usr/local/etc/apache22/extra<br /># vi httpd-vhosts.conf<br /> เพิ่มในส่วนของ VirtualHost<br /><VirtualHost 192.168.0.4><br /> ServerAdmin webmaster@atomy.com<br /> DocumentRoot /home/mail/public_html<br /> ServerName mail.atomy.com<br /> ErrorLog /var/log/mail.atomy.com.error_log.log<br /> CustomLog /var/log/mail.atomy.com.custom_log.log<br /></VirtualHost><br />ต่อไปก็สร้าง path ที่เราระบุ<br />gw# cd /home<br />gw# mkdir mail<br />gw# cd mail<br />gw# mkdir public_html<br />เสร็จแล้วให้ apache22 ทำงานใหม่โดย<br />gw# killall httpd<br />gw# /usr/local/etc/rc.d/apache22 start<br /><br />6. เปิด Browser ตัวโปรด แล้วระบุ http://mail.yoursite.com <br /><br /><br /><span id="fullpost"><br />ส่วนที่เหลือ<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-19750884079375097542009-04-01T06:06:00.001-07:002009-04-01T06:06:36.955-07:00การติดตั้ง Mail Server และ Webmail ตอนที่ 22. ต่อไปก็เป็นการติดตั้ง Openwebmail<br />gw# cd /usr/ports/mail/openwebmail<br />gw# make install clean<br />==== ไม่เลือก options ใดๆ เลยครับ ====<br />=========== รอครู่ใหญ่ ==========<br />3. เพื่อให้สอดคล้องกับการทำ VirtualHost ในเรื่องของ web ที่ผ่านมา ขอนำเสนอการปรับแต่งให้ทำงานร่วมกับ VirtualHost หลังจากที่ได้ติดตั้ง Openwebmail เสร็จเรียบร้อยแล้ว ต่อไปก็เป็นการ config ให้สามารถใช้งานได้<br /><br /><br />gw# cd /usr/local/www/cgi-bin/openwebmail/etc/<br />gw# vi openwebmail.conf<br /><br />ของเดิม<br />domainnames auto<br />auth_module auth_unix.pl<br />mailspooldir /var/mail<br />ow_cgidir /usr/local/www/cgi-bin/openwebmail<br />ow_cgiurl /cgi-bin/openwebmail<br />ow_htmldir /usr/local/www/data/openwebmail<br />ow_htmlurl /openwebmail<br />logfile /var/log/openwebmail.log<br />ปรับแต่งใหม่<br />domainnames atomy.com<br />auth_module auth_unix.pl<br />mailspooldir /var/mail<br />ow_cgidir /usr/local/www/cgi-bin/openwebmail<br />ow_cgiurl /cgi-bin/openwebmail<br />ow_htmldir /home/mail/public_html<br />ow_htmlurl http://mail.atomy.com<br />logfile /var/log/openwebmail.log<br />จัดเก็บให้เรียบร้อย<br /><br /><span id="fullpost"><br />ส่วนที่เหลือ<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-63901185292528818062009-04-01T06:02:00.000-07:002009-04-01T06:05:35.975-07:00การติดตั้ง Mail Server และ Webmail ตอนที่ 1ในส่วนของ Mail Server นั้น FreeBSD ได้ทำการติดตั้งโปรแกรม Sendmail มาให้เรียบร้อยแล้ว เพียงแต่เราต้องเพิ่มบรรทัด sendmail_enable=”YES” ในไฟล์ /etc/rc.conf แล้ว shutdown –r now เครื่อง Server ของเราก็สามารถใช้งาน mail ได้แล้ว<br /> <br />การติดตั้ง Openwebmail ผ่าน Ports<br />ต่อไปจะเป็นการติดตั้ง Webmail เป็น Application ที่ทำงานโดยการเรียกผ่านเวป ทำหน้าที่บริหารเมล์ของ user คือ Openwebmail <br />1. ปัญหา : ก็คือ บน FreeBSD สูงกว่า 5.0 จึ้นไปจะมีปัญหาเกี่ยวกับ suidperl ครับ ซึ่งทำให้ไม่สามารถรัน openwebmail ได้ ขอให้เราแก้ไขปัญาหาเกี่ยวกับภาษา perl กันก่อน<br />gw# cd /usr/ports/lang/perl5.8 <br />gw# make deinstall<br />(เป็นการยกเลิกภาษา perl เดิมที่เคยติดตั้งไว้แล้ว) <br />gw# vi /etc/make.conf <br />เพิ่ม ENABLE_SUIDPERL=true <br />(ก่อนการ compile กำหนดให้ภาษา Perl รองรับ suidperl ) <br />gw# cd /usr/ports/lang/perl5.8 <br />gw# make -DENABLE_SUIDPERL"TRUE" install <br />(ติดตั้ง Perl ใหม่เพื่อให้รองรับ suidperl ครับ) <br />gw# shutdown –r now<br /><br /><span id="fullpost"><br />ส่วนที่เหลือ<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-40116892857720460412009-04-01T06:01:00.000-07:002009-04-01T06:02:46.158-07:00การทำ Firewall ตอนที่ 23. gw# ipfw add 50 count log ip from any to any via vr0<br />00050 count log logamount 120 ip from any to any via vr0<br />4. gw# ipfw show<br />00050 12285 2914615 divert 8668 ip from any to any via vr0<br />00050 0 0 count log logamount 120 ip from any to any via vr0<br />00100 64 7680 allow ip from any to any via lo0<br />00200 0 0 deny ip from any to 127.0.0.0/8<br />00300 0 0 deny ip from 127.0.0.0/8 to any<br />65000 12285 2914615 allow ip from any to any<br />65535 0 0 allow ip from any to any<br />gw#<br /><br /><span id="fullpost"><br />5. ตัวอย่าง<br />ipfw add 1000 deny tcp from any to any 135<br />ipfw add 1001 deny udp from any to any 135-138<br />ifpw add 1002 deny tcp from any to any 139<br />ipfw add 1003 deny tcp from any to any 445<br />ipfw add 1004 deny udp from any to any 445<br />ipfw add 1005 deny tcp from any to any 593<br />ipfw add 1006 deny tcp from any to any 111<br />ipfw add 1007 deny udp from any to any 111<br />ipfw add 1008 deny tcp from any to any 515<br />ipfw add 1009 deny udp from any to any 515<br />ipfw add 1010 deny tcp from any to any 2049<br />ipfw add 1011 deny udp from any to any 2049<br />ipfw add 1012 deny tcp from any to any 2556<br />ipfw add 1013 deny tcp from any to any 1023<br />ipfw add 1014 deny tcp from any to any 6000-6009<br />ipfw add 1015 deny tcp from any to any 7100<br />ipfw add 1016 deny udp from any to any 69<br />ipfw add 1017 deny tcp from any to any 4444<br />ipfw add 1018 deny udp from any to any 990-999<br />ipfw add 1019 deny udp from any to any 8998<br />ipfw add 1020 deny udp from any to any 8998<br />ipfw add 1021 deny udp from any to any 123<br />ipfw add 1022 deny udp from any to any 2018-2021<br />ipfw add 1023 deny tcp from any to any 2018-2021<br />ipfw add 1024 deny tcp from any to any 36794<br />ipfw add 1025 deny tcp from any to any 3127-3198<br />ipfw add 1026 deny tcp from any to any 6777<br />ipfw add 1027 deny tcp from any to any 2535<br />ipfw add 1028 deny tcp from any to any 81<br />ipfw add 1029 deny tcp from any to any 37<br />ipfw add 1030 deny tcp from any to any 1434<br />ipfw add 1031 deny tcp from any to any 6789<br />ipfw add 1032 deny tcp from any to any 5554<br />ipfw add 1033 deny tcp from any to any 9996<br />ipfw add 1034 deny tcp from any to any 2745<br />ipfw add 1035 deny tcp from any to any 8866<br />ipfw add 4201 fwd 192.168.1.1,8080 tcp from 192.168.1.0/24 to any dst-port 80<br />ipfw add 4203 deny tcp from 192.168.1.0/24 to any 1863<br />ipfw add 4204 deny udp from 192.168.1.0/24 to any 1863<br /><br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-61099951356689488412009-04-01T06:00:00.000-07:002009-04-01T06:01:26.846-07:00การทำ Firewall ตอนที่ 1โดยปรกติแล้ว friewall ของ FreeBSD จะไม่ไม่ทำการเก็บ log file หากต้องการต้องคอมไพ kernel ให้มี option ต่อไปนี้<br />options IPFIREWALL_VERBOSE<br />options IPFIREWALL_VERBOSE_LIMIT=128<br />ซึ่งค่านี้ <br />IPFIREWALL_VERBOSE # ค่านี้หมายถึงการติดตั้งให้ firewall เก็บ logfile<br />IPFIREWALL_VERBOSE_LIMIT=128 # หมายถึงจำนวนบรรทัดที่จะใช้เก็บค่าของ logfile<br />สำหรับ กฎ ของ firewall นั้นๆ ถึงตรงนี้แล้วบางคนอาจไม่ได้ติดตั้งก็ตรวจสอบได้จากคำสั่ง<br />sysctl -a | grep net.inet.ip.fw.verbose<br /><span id="fullpost"><br />ถ้าได้ผลรัน<br />net.inet.ip.fw.verbose: 0 # เป็นศูนย์หมายถึงไม่ทำการติดตั้ง<br />net.inet.ip.fw.verbose_limit: 0 # เป็นจำนวนบรรทัดที่ใช้เก็บข้อมูลใน logfile<br />ซึ่งในส่วนของเรานั้นได้มีการเพิ่ม options ทั้ง 2 บรรทัดเมื่อตอน Compile Kernel แล้ว จะได้<br />1. gw# sysctl -a | grep net.inet.ip.fw.verbose<br />net.inet.ip.fw.verbose: 1<br />net.inet.ip.fw.verbose_limit: 120<br />2. gw# ipfw show<br />00050 11593 2659871 divert 8668 ip from any to any via vr0<br />00100 60 7154 allow ip from any to any via lo0<br />00200 0 0 deny ip from any to 127.0.0.0/8<br />00300 0 0 deny ip from 127.0.0.0/8 to any<br />65000 11593 2659871 allow ip from any to any<br />65535 0 0 allow ip from any to any<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-3283485386644652332009-03-31T19:45:00.001-07:002009-03-31T19:45:59.432-07:00เมื่อคุณลืม password ของ root<span style="font-weight: bold;font-size:130%;" >เมื่อคุณลืม password ของ root</span><br /><br />เราสามารถแก้ไขปัญหาได้โดยวิธีการดังนี้ครับ<br />1. เมื่อ Boot เครื่องปรากฏหน้าจอภาพมีเมนูให้เลือก 1. 2. 3 ให้เราเลือก หมายเลข 4. ครับเพื่อเข้าสู่ Single User mode ครับ<br />2. ปรากฏเครื่องหมาย #<br />3. ให้ใช้คำสั่ง mount -u และ mount -a<br />4. ใช้คำสัง passwd แล้วใส่รหัสผ่านใหม่ของ root ครับ สองครั้งให้เหมือนกันครับผม<br />5. พิมพ์ reboot เพื่อเข้าสู่ Mode ปกติ<br /><br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-61493418337717124582009-03-31T19:44:00.000-07:002009-03-31T19:45:14.018-07:00เมื่อต้องการโหลดค่าใน /etc/rc.conf และใน /etc/rc.local ใหม่โดยไม่ reboot<span style="font-size:130%;"><span style="font-weight: bold;">เมื่อต้องการโหลดค่าใน /etc/rc.conf และใน /etc/rc.local ใหม่โดยไม่ reboot</span></span><br /><br />เราสามารถสั่งให้ค่าใน /etc/rc.conf ที่มีการเปลี่ยนแปลงใหม่ทำงานพร้อมกับ /etc/rc.local นั้นสามารถทำได้โดยการพิมพ์คำสั่ง<br /># shutdown now<br /># return<br />แล้ว login อีกครั้ง<br /><br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-76065806128799270752009-03-31T19:42:00.000-07:002009-03-31T19:43:28.544-07:00สั่ง Server ทำงานตามวันเวลาที่เราตั้งไว้<span style="font-weight: bold;font-size:130%;" >สั่ง Server ทำงานตามวันเวลาที่เราตั้งไว้</span><br /><br />เราสามารถใช้คำสั่ง crontab เพื่อสั่งงานให้ server ทำงานตามวันเวลาที่เราต้องการได้ดังนี้<br />สร้างไฟล์ เช่น<br /># pico atomy.cron<br />0 5 * * * cp /home/atomy/data1.txt /home/kitti/data2.txt<br />อธิบาย:<br />0 คือ นาทีที่ 0 ซึ่งค่าเป็นไปได้คือ (0-59)<br />5 คือ ตีห้า ซึ่งค่าเป็นไปได้คือ (0-23)<br />* คือ ทุกวัน ซึ่งค่าเป็นไปได้คือ (1-31)<br />* คือ ทุกเดือน ซึ่งค่าเป็นไปได้คือ (1-12)<br />* คือ ทุกวันของสัปดาห์ ซึ่งค่าเป็นไปได้คือ (0-6)<br />แล้ว save<br /># crontab kitti.cron<br />เป็นการสั่งให้ crontab ทำงานตามวันเวลาดังกล่าว (อย่าลืมใส่ cron_enable=”YES” ในไฟล์ /etc/rc.conf ด้วยนะครับ)<br /><br />ขอบใจ ท่าน ชัดสกร พิกุลทอง<br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-6722553360251447182009-03-31T19:40:00.000-07:002009-03-31T19:42:00.816-07:00Scripts ในการ Check Quota ในการใช้พื้นที่ web และ mail<span style="font-weight: bold;font-size:130%;" >Scripts ในการ Check Quota ในการใช้พื้นที่ web และ mail </span><br /># vi quotacheck.sh<br />echo -n "Checking disk quota..."<br />usage1=$(du -sk ~ /var/mail/$LOGNAME 2>/dev/null | awk '{tot+=$1}END (พิมพ์ต่อกัน)<br />{printf("%.2f", tot/1024.0)}')<br />usage2=$(du -sk ~ /home/$LOGNAME 2>/dev/null | awk '{tot+=$1}END (พิมพ์ต่อกัน)<br />{printf("%.2f", tot/1024.0)}')<br />echo<br />echo "Your total mail disk quota is $usage1 MB."<br />echo "Your total web disk quota is $usage2 MB."<br />เสร็จแล้วก็ save<br /># chmod 700 quotacheck.sh<br /># ./ quotacheck.sh<br />Checking disk quota...<br />Your total mail disk quota is 0.01 MB.<br />Your total web disk quota is 8.48 MB.<br /><br />ขอบใจท่าน ชัดสกร พิกุลทอง<br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-65716779239012259962009-03-31T19:38:00.000-07:002009-03-31T19:39:59.136-07:00การป้องกัน Spam Mail โดยการใช้ mail server ของเรา<span style="font-weight: bold;font-size:130%;" >การป้องกัน Spam Mail โดยการใช้ mail server ของเรา </span><br />บางครั้งอาจจะมีบางคน หรือบางเครือข่ายอาศัยเครื่อง mail server ของเราเป็นตัวส่งเมลไปก่อกวนเครือข่ายอื่น ๆ ซึ่งจะทำให้เครือข่ายนั้น เข้าใจว่าเราเป็นคนกระทำเสียเอง เพื่อป้องกันปัญหาลักษณะนี้ เรามีวิธีป้องกันดังนี้ครับ<br />1. cd /etc<br />2. vi hosts.allow<br />3. ให้ใส่เครื่องหมาย # หน้าข้อความนี้<br />sendmail : ALL : allow<br />4. reboot เครื่อง mail server อีกหนึ่งครั้งครับ<br /><br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-71063294265250434622009-03-31T19:36:00.000-07:002009-03-31T19:38:33.102-07:00การ copy ข้าม server<span style="font-weight: bold;font-size:130%;" >การ copy ข้าม server</span><br />ถ้ามี server อยู่ 2 ตัว ในการ copy ไฟล์ ข้าม server ทำได้โดยใช้คำสั่ง<br />scp -r source destination<br />โดย<br />-r คือ Recursive ซึ่งเป็นการ copy directory และ subdirectory ด้วย<br />source เราสามารถกำหนดเป็น user@server.com:/home/user/file.zip<br />destination เราสามารถกำหนดเป็น user2@server2.com:/home/user2ครับ<br />คำสั่งแบบสมบูรณ์นะครับ<br />scp -r user@server.com:/home/user/file.zip user2@server2.com:/home/user2<br />password:<br />แล้วก็ใส่รหัสผ่านครับ<br /><br /><span id="fullpost"><br />หรือถ้าเราจะ copy file.zip ไปไว้ที่ไดเรคเทอรี่ /home/user2/public_html เราก็สามารถทำได้<br />โดย<br />scp -r user@server.com:/home/user/file.zip user2@server2.com:/home/user2/public_html<br />หรือแบบนี้ก็ได้ครับ<br />scp -r user@server.com:/home/user/file.zip user2@server2.com:public_html<br />แต่ถ้าเราจะส่งไฟล์ไปที่ server เราสามารถระบุ source เป็นที่อยู่ของไฟล์ในเครื่องเราได้เลย<br />ครับ<br />scp -r file.zip user2@server2.com:public_html<br /><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-71047254961786182942009-03-31T19:35:00.000-07:002009-03-31T19:36:51.732-07:00การป้องการการ hack web<span style="font-weight: bold;font-size:130%;" >การป้องการการ hack web </span><br /><br />บ่อยครั้งที่เรา โดนแฮคโดยที่ไม่รู้วิธีป้องกันกันเลย hackger ส่วนใหญ่จะพยายามอัพดโหลด Files สะคริปมายังเว็บเราแล้วทำให้สามารถควบคุมจากหน้าเว็บได้เลยทันที ซึ่งมีวิธีป้องกันง่าย ๆ ดังนี้ ให้เพิ่ม ตรงส่วน<br /><directory usr="" local="" www="" apache22="" dist=""> (ตรงนี้แล้วแต่จะเก็บไว้ที่ใหน<br />Options MultiViews IncludesNoExec FollowSymLinks<br />php_admin_value open_basedir "/usr/local/www/apache22/data-dist /:/tmp/:/usr/local/etc/php/"<br /><br /><span id="fullpost"><br />เป็นการกำหนด ไม่ให้เค้าไปใหนได้นอกจาก ที่เก็บเว็บ<br />และในส่วน php.ini<br />disable_functions = escapeshellarg, escapeshellcmd, exec, passthru, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, system, apache_child_terminate, apache_get_modules, apache_get_version, apache_getenv, apache_lookup_uri, apache_note, apache_request_headers, apache_reset_timeout, apache_response_headers, apache_setenv, getallheaders, virtual, popen, pclose<br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div></directory>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-20758885654127711382009-03-31T19:30:00.000-07:002009-03-31T19:35:10.602-07:00การป้องกันไม่ให้ User ที่สามารถใช้ Shell ไม่ให้มองเห็น Process อื่นที่ไม่ใช่ Process ของตัวเอง<span style="font-weight: bold;font-size:130%;" >การป้องกันไม่ให้ User ที่สามารถใช้ Shell ไม่ให้มองเห็น Process อื่นที่ไม่ใช่ Process ของตัวเอง</span><br /><br />เริ่มแรกไปแก้ไขไฟล์ /etc/sysctl.conf<br />เอา # จากหน้าบรรทัด security.bsd.see_other_uids=0<br />หรือถ้าไม่มีให้ใส่ security.bsd.see_other_uids=0 เข้าไปเลย<br />ทำการบันทึกแ แล้วจัดการ restart sysctl โดยใช้คำสั่ง<br />/etc/rc.d/sysctl restart<br />จากนั้น user ธรรมดา ก็จะมองเห็นแค่ Process ของตัวเอง<br /><br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-49462543443056142532009-03-31T19:29:00.000-07:002009-03-31T19:30:44.028-07:00ไฟฟ้าดับ boot ระบบไม่ได้<span style="font-size:130%;"><span style="font-weight: bold;">ไฟฟ้าดับ boot ระบบไม่ได้</span></span><br />สาเหตุเกิดจากไฟฟ้าดับครับ ปิดเครื่องไม่ทันครับ พอ boot เครื่องใหม่เป็นยังนี้ครับ (ตัดมาเฉพาะช่วงท้าย ๆ ครับ)<br /><br />WATNING: / was not properly dismounted<br />Pre-seeding PRNG: kickstart.<br />Loading configuration files.<br />Entropy harvesting: interrupts ethernet point_to_point kickstart.<br />swapon: adding /dev/ad0s1b as swap device<br />Starting file system checks:<br />/dev/ad0s1a: 2398376 DUP I=442965<br />/dev/ad0s1a: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.<br />Automatic file system check failed; help!<br />Feb 9 09:43:09 inite: /bin/sh on /etc/rc terminated abnormally, going to single user mode<br />Enter full pathname of shell or RETURN for /bin/sh:<br /><br /><span id="fullpost"><br />แสดงว่า ตัว<br />/dev/ad0s1a: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.<br />Automatic file system check failed; help! มีปัญหา<br />ต้อง scan harddisk (fsck) มันจะ rebuid กลับขึ้นมา<br />ให้กดปุ่ม Enter เพื่อเข้าสู่ shell ครับ<br />#<br />แล้วให้พิมพ์ fsck<br /># fsck<br />ระบบจะทำการ recovery file system ให้<br />หากมีการถามคำถาม ให้ตอบ Y จนหมดทุกคำถาม<br />แล้ว reboot เครื่องใหม่<br />ระบบก็จะกลับมาเป็นปกตินะ<br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-66803416122304127172009-03-31T19:27:00.000-07:002009-03-31T19:29:00.931-07:00การสำรองไฟล์แบบตั้งชื่อไม่ซ้ำกันใน freebsd<span style="font-size:130%;"><span style="font-weight: bold;">การสำรองไฟล์แบบตั้งชื่อไม่ซ้ำกันใน freebsd</span></span><br /># tar cvf backup-`date "+%H%M-%d-%B-%Y"`.tar mydata<br />จะได้ไฟล์ตามด้วย ได้ file-เวลา-วัน ครับ เช่น backup-0736-14-July-2005.tar<br />ปรับแต่งโดยการตั้วเวลาทำงานด้วย crontab<br /># crontab -e<br />ก็จะขึ้นหน้าต่างของ editor มา ให้ทำการปรับแต่งตามต้องการเช่น<br />0 0 * * * tar cvf backup-`date "+%H%M-%d-%B-%Y"`.tar /path/to/mydata<br />เป็นต้นจากนั้นก็ save ออกมา<br />จากนั้นก็ลองตรวจสอบดู crontab ที่ได้ทำการติดตั้งไว้โดยใช้คำสั่ง<br /># crontab –l<br /><br /><br /><span id="fullpost"><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-66877278437377910482009-03-31T19:20:00.000-07:002009-03-31T19:24:36.964-07:00การสำรองฐานข้อมูลไฟล์แบบตั้งชื่อไม่ซ้ำกัน ใน freebsd<span style="font-weight: bold;">การสำรองฐานข้อมูลไฟล์แบบตั้งชื่อไม่ซ้ำกัน ใน freebsd</span>
<br />
<br />ใช้คำสั่งต่อไปนี้
<br />#mysqldump -u user -ppassword --opt database > file-name-`date '+%H%M-%d-%B-%Y'`
<br />ได้ file-name-0736-14-July-2005
<br />ได้ file-เวลา-วัน ครับ
<br />ถ้าต้องการบีบให้เป็นแบบ .tar.gz
<br /># tar cvf - file-name-0736-14-July-2005 | gzip > file-name-0736-14-July-2005.tar.gz
<br />หรือทำเป็นไฟล์ shell script ขึ้นมาใช้ตามเวลาที่เรากำหนดได้นะครับ
<br /># vi mydump.sh
<br />
<br /><span id="fullpost">
<br />ใส่คำสั่งตามนี้ (ดัดแปลงเอานะ)
<br />
<br />#!/bin/sh
<br />mysqldump -u user –ppassword --opt database-name1 > /home/dbbackups/dbfile1.sql
<br />mysqldump -u user2 –ppassword --opt database-name2 > /home/dbbackups/dbfile2.sql
<br />tar -zcvf /home/dbbackups.tar.gz /home/dbbackups/*
<br />
<br />เซฟแล้วออกจาก vi
<br />chmod เป็น 755
<br />#chmod 755 mydump.sh
<br />สร้างไดเรคทอรี่ชชื่อ dbbackups ขึ้นมา
<br />#mkdir /home/dbbackups
<br />#chmod 666 /home/dbbackups
<br />จากนั้นก็ใช้คำสั่ง
<br />#crontab -e
<br />ใส่เวลาที่ต้องการเข้าไป อ้อกำหนด patch ที่เก็บไฟล์ shell script ด้วยนะครับว่าเก็บไว้ที่ไหน
<br />0 2 * * * /home/YOURPATH/mydump.sh > /dev/null
<br />ขอบใจ ท่าน ชัดสกร พิกุลทอง</span><meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cconan%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5Cconan%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5Cconan%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>TH</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:applybreakingrules/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Angsana New"; panose-1:2 2 6 3 5 4 5 2 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:16777219 0 0 0 65537 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; mso-bidi-font-size:14.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:"Angsana New";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-bidi-font-family:"Angsana New";} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Sect</style>
<br /><span id="fullpost">
<br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-49237522428862318222009-03-30T23:22:00.000-07:002009-03-31T19:27:02.984-07:00วิธีการ Add User ในระบบ Freebsd1. วิธีการ Adduser ใน FreeBSD ทดลอง adduser ชื่อ webmaster อยู่ใน group webmaster ในลักษณะนี้เป็น user ที่ดูแลเวปหลักของ host ครับ<br />net# adduser webmaster (พิมพ์)<br />Username: webmaster (พิมพ์)<br />Full name: webmaster (พิมพ์)<br />Uid (Leave empty for default): (enter)<br />Login group [webmaster]: (enter ถ้าอยู่ในกลุ่ม webmaster ถ้าอยู่กลุ่มอื่นก็ใส่ชื่อกลุ่มลงไป)<br />Login group is webmaster. Invite webmaster into other groups? []:(enter)<br />Login class [default]: (enter)<br />Shell (sh csh tcsh nologin) [sh]: (enter) (หรือ /usr/fales ถ้าไม่ต้องการให้ user login เข้าระบบได้)<br />Home directory [/home/webmaster]: /usr/local/www/data-dist (เป็นการสร้างไดเร็กทอรี่ของ user)<br />Use password-based authentication? [yes]: (enter)<br />Use an empty password? (yes/no) [no]: (enter)<br />Use a random password? (yes/no) [no]: (enter)<br />Enter password: (ใส่ password)<br />Enter password again: (ใส่ password อีกครั้งให้เหมือนกัน)<br />Lock out the account after creation? [no]: (enter)<br />Username : webmaster<br />Password : *****<br />Full Name : webmaster<br />Uid : 1003<br />Class :<br />Groups : webmaster<br />Home : /usr/local/www/data-dist<br />Shell : /bin/sh<br />Locked : no<br />OK? (yes/no): yes (ตอบ yes)<br />adduser: INFO: Successfully added (webmaster) to the user database.<br />Add another user? (yes/no): no (ตอบ yes ถ้าต้องการ adduser คนอื่นอีก ตอบ no ถ้าไม่ต้องการ)<br />Goodbye!<br /><br /><br /><br /><span id="fullpost"><br /> 2. วิธีการ Adduser ใน FreeBSD ทดลอง adduser ชื่อ netty อยู่ใน group student เป็น user ทั่วๆ ไปครับ<br />net# adduser netty (พิมพ์)<br />Username: netty (พิมพ์)<br />Full name: netty (พิมพ์)<br />Uid (Leave empty for default): (enter)<br />Login group [netty]: (enter ถ้าอยู่ในกลุ่ม netty ถ้าอยู่กลุ่มอื่นก็ใส่ชื่อกลุ่มลงไป ในที่นี้เราจะใส่ student)<br />Login group is student. Invite webmaster into other groups? []:(ใส่ student อีกครั้ง)<br />Login class [default]: (enter)<br />Shell (sh csh tcsh nologin) [sh]: (enter)<br />Home directory [/home/netty]: ( enter เป็นการสร้างไดเร็กทอรี่ของ user อยู่ที่ /home/netty)<br />Use password-based authentication? [yes]: (enter)<br />Use an empty password? (yes/no) [no]: (enter)<br />Use a random password? (yes/no) [no]: (enter)<br />Enter password: (ใส่ password)<br />Enter password again: (ใส่ password อีกครั้งให้เหมือนกัน)<br />Lock out the account after creation? [no]: (enter)<br />Username : netty<br />Password : *****<br />Full Name : netty<br />Uid : 1003<br />Class :<br />Groups : netty<br />Home : /home/netty<br />Shell : /bin/sh<br />Locked : no<br />OK? (yes/no): yes (ตอบ yes)<br />adduser: INFO: Successfully added (webmaster) to the user database.<br />Add another user? (yes/no): no (ตอบ yes ถ้าต้องการ adduser คนอื่นอีก ตอบ no ถ้าไม่ต้องการ)<br />Goodbye!<br />net#<br />ต่อไปก็เป็นการสร้าง Directory เก็บเวปไซต์ของ netty ครับ<br />net# cd /home/<br />net# chmod 711 netty<br />net# cd netty<br />net# mkdir public_html<br />net# chmod 755 public_html<br />net# chown netty:student public_html<br /><br /><br /></span><div id="seolinx-tooltip" style="border: 1px solid rgb(0, 0, 0); margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;"><table style="border: 0pt none ; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;"><tbody><tr><td id="seolinx-table" style="border: 0pt none ; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;"><div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;"><table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;"><tbody><tr><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://toolbarqueries.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="0" type="param" title="Google pagerank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="1" type="param" title="Google index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.google.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="2" type="param" title="Google links" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteexplorer.search.yahoo.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="12" type="param" title="Yahoo linkdomain" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.msn.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="20" type="param" title="MSN index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="40" type="param" title="Sitemap.xml" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Rank: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="41" type="param" title="SEMRush Rank" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Traffic: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="42" type="param" title="SEMRush SE Traffic" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.semrush.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Price: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="43" type="param" title="SEMRush SE Traffic price" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://bar-navig.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> CY: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="50" type="param" title="Yandex CY" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="51" type="param" title="Yandex index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="52" type="param" title="Yandex link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.yaca.yandex.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> YCat: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="53" type="param" title="Yandex catalogue" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="60" type="param" title="Rambler index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://search.rambler.ru/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> Top: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="61" type="param" title="Rambler Top100" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="70" type="param" title="Baidu index" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://www.baidu.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="71" type="param" title="Baidu link" href="javascript:{}">wait...</a></td><td style="border: 1px solid gray; padding: 2px; background: rgb(240, 240, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img src="http://siteanalytics.compete.com/favicon.ico" style="vertical-align: middle;" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" index="108" type="param" title="Compete Rank" href="javascript:{}">wait...</a></td></tr></tbody></table></div></td><td style="border: 0pt none ; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" id="seolinx-tooltip-close" title="close"><img src="chrome://seoquake/content/skin/close.gif" /></td></tr></tbody></table></div>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-56282427500520396342009-03-30T08:22:00.000-07:002009-03-30T08:25:24.701-07:00ตัวอย่างการประยุกต์ใช้และลิขสิทธิ์ของ FreeBSDFreeBSD ถูกนำไปใช้กับโอสต์ใหญ่ๆ มากมายเช่น<br />- Yahoo! (http://www.yahoo.com/)<br />- Apache (http://www.apache.org/) <br />- Blue Mountain Arts (http://www.bluemountain.com/)<br />- Pair Networks (http://www.pair.com/)<br />- Sony Japan (http://www.sony.co.jp/)<br />- Netcraft (http://news.netcraft.com/)<br />- Weathernews (http://www.wni.com/)<br />- Supervalu (http://www.supervalu.com/)<br />- TELEHOUSE America (http://www.telehouse.com/)<br />- Sophos Anti-Virus (http://www.sophos.com/)<br />- JMA Wired (http://www.jmawired.com/)<br />และยังมีโอสต์อื่นๆ อีกมากมาย สำหรับตัวอย่างการประยุกต์ใช้งานในเมืองไทย เช่น<br /> - pantip.com (http://pantip.com/)<br /> - penguin.in.th (http://penguin.in.th/home/)<br /> - www.svc.ac.th (http://www.svc.ac.th)<br /><br /><span id="fullpost"><br />ลิขสิทธิของ FreeBSD ลักษณะของลิขสิทธิ์ของ FreeBSD ไม่มีความยุ่งยากซับซ้อนมากนักกล่าวคือสามารถทำการแก้ไข คัดแปลง ตัวซ๊อสโค๊ดของโปรแกรมใดก็ได้ แต่นำข้อความต่อไปนี้<br />“ THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.”<br />บรรจุลงในส่วนของซ๊อสโค๊ดหรือคู่มือของโปรแกรมที่ทำการแก้ไขด้วย ดูรายละเอียดเพิ่มเติมได้จาก http://www.freebsd.org/copyright/freebsd-license.html<br /><br />Credit ชัดสกร พิกุลทอง<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-9909502062212254412009-03-30T08:20:00.000-07:002009-03-30T08:21:45.510-07:00FreeBSD มีความสามารถอะไรบ้างลักษณะเด่นของ FreeBSD โดยรวมมีดังนี้<br /><br />- การกำหนดสิทธิของการทำงานหลายงานพร้อมกันซึ่งจะเป็นลักษณะที่มีการปรับตัวเป็นแบบพลวัต มีการจัดแบ่งทรัพยากรของระบบอย่างยุติธรรมระหว่างโปรแกรมประยุกต์และผู้ใช้งาน<br /><br />- ความสามารถในการทำงานแบบหลายผู้ใช้(multi-user) ซึ่งยอมให้มีการใช้งานระบบจากผู้ใช้ระบบ FreeBSD ได้หลายคนพร้อมกัน ซึ่งสามารถกำหนดจำนวนการใช้งานทรัพยากรระบบของผู้ใช้แต่ละคนได้<br /><br />- มีระบบเครือข่ายในรูปแบบ TCP/IP ที่ปลอดภัย ซึ่งรองรับการทำงานของมาตรฐานต่างๆ เช่น SLIP(Serial Line IP), PPP(Point to Point Protocol), NFS(Network File System), DHCP(Dynamic Host Configuration Protocol), และ NIS(Network Information Services) เป็นต้น ซึ่งหมายความว่าใช้งาน FreeBSD ในลักษณะที่เป็นเซฟเวอร์ เช่น เมล์ลเซิฟเวอร์(mail server), เว็ปเซิฟเวอร์(web server), เอฟทีพีเซิฟเวอร์(ftp server), การทำเร้าติ้ง(routing)และไฟล์วอล์ล(fire wall) เป็นต้น<br /><br />- การป้องกันหน่วยความจำทำให้มั่นใจเรื่องการทำงานที่ผิดพลาดอันเนื่องมาจากการใช้งานหน่วยความจำที่ซ้ำกันของโปรแกรมประยุกต์หรือผู้ใช้ระบบ<br /><br />- FreeBSD เป็นระบบปฏิบัติการแบบ 32-bit (64-bit สำหรับสถาปัตยกรรม Alpha และ UltraSPARC)<br /><br />- มีความสามารถในการใช้งานระบบ X Window (X11R6) มีความสามารถในการรันโปรแกรมที่รันบนระบบปฏิบัติการ Linux, SCO, SVR4, BSDI และ NetBSDได้<br /><br />- มีโปรแกรมประยุกต์มากมายซึ่งสามารถทำการเพิ่มโปรแกรมประยุกต์ เหล่านั้นด้วย ระบบพอร์ตและเพคเกจ<br /><br /><span id="fullpost"><br />- สามารถทำการเพิ่มโปรแกรมประยุกต์ได้ง่ายโดยผ่านทางระบบเครือข่ายอินเตอร์เน็ต FreeBSD เป็นซอสโค๊ดที่มีความเข้ากันได้กับระบบยูนิกทางการค้าและหากโปรแกรมประยุกต์ต้องการการเปลี่ยนแปลงบางอย่างก็สามารถทำได้โดยเปลี่ยนแปลงและคอมไพใหม่<br /><br />- ความต้องการของหน่วยความจำเหมือน หน่วยความจำแบบแคช และหน่วยความจำบัฟเฟอร์ ถูกออกแบบให้มีประสิทธิภาพสูง ทำให้เพียงพอต่อความต้องการของโปรแกรมประยุกต์แต่ละโปรแกรม และความต้องผู้ใช้งานแต่ละคน<br /><br />- รองรับการประมวลผลแบบหลายหน่วยประมวล แบบ Symmetric multi-processor (SMP) <br /><br />- รองรับการทำงานกับตัวแปรภาษาพื้นฐานคือ C, C++, Fortran, และ Perl นอกจากนี้ยังสามารถติดตั้งตัวแปรภาษาเพิ่มเติมได้โดยการติดตั้งจากพอร์ตและเพคเกจ<br /><br />- เนื่องจาก FreeBSD เป็นระบบการพัฒนาระบบเปิด จึงมีซอสโค๊ดของระบบซึ่งทำให้สามารถปรับปรุงและแก้ไขการทำงานของระบบให้มีความถูกต้องเชื่อถือได้<br /><br />- มีเอกสารคู่มือการใช้งานแบบออนไลน์<br /><br />- และอื่นๆ อีกมากมาย!<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-80356930069552109562009-03-30T08:14:00.000-07:002009-03-30T08:16:47.201-07:00FreeBSD คืออะไรFreeBSD เป็นระบบปฏิบัติการชั้นสูงที่สามารถทำงานกับเครื่องคอมพิวเตอร์สถาปัตยกรรมแบบ x86 หรือเทียบเท่า, DEC Alpha, IA-64, PC-98 และ UltraSPARC® FreeBSD ถูกพัฒนามาจาก BSD ซึ่งเป็นระบบปฏิบัติการยูนิกส์ของมหาวิทยาลัย U.C. Berkeley FreeBSD โดยมีทีมงานพัฒนาขนาดใหญ่ ซึ่งได้ทำการพัฒนา แก้ไขข้อผิดพลาด รวมถึงการพัฒนาให้สามารถทำงานได้ในสถาปัตยกรรมคอมพิวเตอร์แบบอื่น ๆ ด้วยLaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-62150864242969707402009-03-30T01:11:00.000-07:002009-03-30T01:13:40.431-07:00การติดตั้ง Squid Proxy 3 บน FreeBSD 7#cd /usr/ports/www/squid30<br />#make config<br /><br />โดยทำการเลือก SQUID_DELAY_POOLS, SQUID_SNMP,SQUID_SSL,<br />SQUID_DNS_HELPER,SQUID_VIA_DB,SQUID_WCCP,SQUID_WCCPV2,<br />SQUID_IDENT,SQUID_ARP_ACL,SQUID_IPFW,SQUID_PF,SQUID_IPFILTER,<br />SQUID_AUFS,SQUID_KQUEUE,SQUID_LARGEFILE<br />หลังจากนั้นก็ #make install clean<br />รอสักพัก จนกระทั่งติดตั้งเสร็จ<br /><br />หลังจากนี้ ให้เข้าไปแก้ไฟล์ ที่อยู่ที่ /usr/local/etc/squid/squid.conf ให้ได้ตามนี้<br /><br />#define by Aekarat Joolawan<br />acl mac arp "/usr/local/etc/squid/macaddress.txt"<br />acl ipnet src "/usr/local/etc/squid/ipnet.txt"<br />acl hostname srcdomain SERMSUK.SANDENINTERCOOL.COM PHUSIT.SANDENINTERCOOL.COM<br />acl EEI_ports port 8081<br />acl https port 4331<br />acl msn port 1863<br />acl mms port 7070<br />acl rudp port 154<br />acl shoutcase port 8000<br />acl proxy port 8080<br />acl white_url url_regex -i "/usr/local/etc/squid/white_url.txt"<br />acl black_url url_regex -i "/usr/local/etc/squid/black_url.txt"<br /><br />acl all src 0.0.0.0/0.0.0.0<br /><span id="fullpost"><br />#Recommended minimum configuration:<br />acl manager proto cache_object<br />acl localhost src 127.0.0.1/255.255.255.255<br />acl to_localhost dst 127.0.0.0/8<br />acl SSL_ports port 443 563<br />acl Safe_ports port 80 # http<br />acl Safe_ports port 21 # ftp<br />acl Safe_ports port 443 # https<br />acl Safe_ports port 70 # gopher<br />acl Safe_ports port 210 # wais<br />acl Safe_ports port 1025-65535 # unregistered ports<br />acl Safe_ports port 280 # http-mgmt<br />acl Safe_ports port 488 # gss-http<br />acl Safe_ports port 591 # filemaker<br />acl Safe_ports port 777 # multiling http<br />acl CONNECT method CONNECT<br />acl QUERY urlpath_regex cgi-bin \?<br /><br /># Squid normally listens to port 3128<br />http_port 8080<br /><br />#Need for transparent proxy<br />httpd_accel_host virtual<br />httpd_accel_port 80<br />httpd_accel_with_proxy on<br />httpd_accel_uses_host_header on<br />#We recommend you to use the following two lines.<br />acl apache rep_header Server ^Apache<br />acl list url_regex -i \.mp3$ \.wma$<br /><br />#Allow policy by Aekarat<br />http_access allow EEI_ports<br />http_access allow https<br />http_access allow msn<br />http_access allow mms<br />http_access allow rudp<br />http_access allow list<br />http_access allow proxy<br />http_access allow white_url<br />#http_access deny black_url<br />http_access allow mac<br />http_access allow ipnet<br />http_access allow hostname<br />http_access deny CONNECT !SSL_ports<br />http_access deny !Safe_ports<br />http_access deny all<br /><br />icp_access allow localhost<br />icp_access allow mac<br />icp_access allow ipnet<br />icp_access allow hostname<br />icp_access deny all<br /><br /># Avoid caching cgi scripts<br />acl QUERY urlpath_regex cgi-gin<br />cache deny QUERY<br /><br />acl magic_word1 url_regex -i 192.168<br />acl magic_word2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .qt .ram .rm .iso .raw .wav .mov .wma<br /><br />delay_pools 2<br />delay_class 1 2<br />delay_parameters 1 256000/256000 5000/256000<br />delay_access 1 allow magic_words2<br />delay_access 1 allow mac<br />delay_access 1 allow ipnet<br />delay_access 1 allow hostname<br /><br />delay_class 2 2<br />delay_parameters 2 -1/-1 -1/-1<br />delay_access 2 allow magic_words1<br /><br /># Cancel download if file is bigger than 2MB<br />reply_body_max_size 2048 KB<br /><br />acl snmppublic snmp_community public<br />snmp_access allow snmppublic localhost<br />snmp_access deny all<br />cache_mem 600 MB<br /><br />memory_replacement_policy heap GDSF<br /><br />cache_replacement_policy heap GDSF<br /><br />cache_dir diskd /usr/local/squid/cache 15360 16 256 Q1=72 Q2=64<br />cache_dir ufs /usr/local/squid/cache 15360 16 256<br />access_log /usr/local/squid/logs/access.log squid<br /><br />cache_access_log /usr/local/squid/logs/access.log<br />cache_log /usr/local/squid/logs/cache.log<br />cache_store_log /usr/local/squid/logs/store.log<br /><br />ต่อไป เป็นการสร้าง cache<br /><br /># chown –R nobody:nogroup /usr/local/squid/cache<br /># chmod –R 777 /usr/local/squid/cache<br /># cd /usr/local/squid/logs<br /># touch access.log cache.log store.log<br /># chmod 777 *<br /># cd /usr/local/sbin<br /># ./squid –z<br /><br /><br />ต่อ ไปทำการสั่ง squid ทำงาน โดยพิมพ์คำสั่ง /usr/local/sbin/RunCache & จะพบข้อความ Running: squid –sY >> /usr/local/squid.out 2>&1 แล้วกด Ctr+C เพื่อออก แล้วเพิ่มคำสั่ง /usr/local/sbin/RunCache & ลงในไฟล์ /etc/rc.local เพื่อให้ squid ทำงานโดยอัตโนมัติ<br /><br />แสดง การใส่คำสั่ง เพื่อให้รันอัตโนมัติ ทุกครั้งที่ เปิดเครื่อง<br />ทำการแก้ไขไฟล์ /etc/rc.conf โดยใส่ ค่าพวกนี้ไป ท้ายไฟล์<br /><br />#add these lines to enable ipfilter<br />ipfilter_enable="YES"<br />ipnat_enable="YES"<br />ipmon_enable="YES"<br />ipfs_enable="YES"<br />ทำการแก้ไขไฟล์ /etc/ipnat.rules โดยใส่ ค่าพวกนี้ไป ท้ายไฟล์<br />#add this line<br />#I assume rl0 is your internal nic<br />#Redirect everything else to squid on port 8080<br />rdr rl0 0/0 port 80 -> 127.0.0.1 port 8080 tcp<br /><br />หลังจากนั้น ให้ทำการ complie kernel ใหม่ โดยใส่ค่าเหล่านี้เข้าไป<br /><br />options SYSVMSG<br />options MSGMNB=8192 #max # of bytes in queue<br />options MSGMNI=40 # number of message queue identifiers<br />options MSGSEG=512 #number of message segments per queue<br />options MSGSSZ=64 #size of a message segment<br />options MSGTQL=2048 #max messages in system<br />หลังจากทำการ complie เสร็จ ให้ทำการ restart<br /><br /><br />การตั้งเวลาสำหรับเคลียร์ log และ cache ของ Proxy<br />ใน การใช้งาน squid ไประยะหนึ่งจะมีการเก็บ cache มากขึ้น และ log ไฟล์ (access.log, cachelog, store.log) จะมีขนาดใหญ่ขึ้นอาจจะเต็มได้ ซึ่งก็จะทำให้ squid ของเราหยุดให้บริการได้ จำเป็นต้องมีการ เคลียร์ log ไฟล์ และ cache เต็ม มีวิธีการจัดการดังนี้<br /><br /># killall squid<br /># cd /usr/local/squid/cache<br /># rm –rf *<br /># cd /usr/local/squid/logs<br /># rm –rf access.log cache.log store.log<br /># touch access.log cache.log store.log<br /># chmod 777 access.log cache.log store.log<br /># /usr/local/sbin/squid –z<br />#/usr/local/sbin/RunCache &<br /><br /><br />ถ้าต้องการตั้งเวลาให้ทำงานตามคำสั่งเหล่านี้โดยอัตโนมัติ ต้องมีการเขียน Script และให้ทำงานตามเวลาที่กำหนดด้วยดังนี้<br /># cd /root<br /># pico clcache.sh<br />พิมพ์คำสั่ง ดังนี้<br />#!/bin/sh<br />Killall squid<br />cd /usr/local/squid/cache<br />rm –rf *<br />cd /usr/local/squid/logs<br />rm –rf access.log cache.log store.log<br />touch access.log cache.log store.log<br />chmod 777 access.log cache.log store.log<br />/usr/local/sbin/squid –z<br />/usr/local/sbin/RunCache &<br /><br />เสร็จ ก็ทำการ save จากนั้นใช้คำสั่ง<br /># chmod 700 clcache.sh<br />ต่อ ไปก็ตั้งเวลาให้ทำงานตามเวลาที่เรากำหนด โดยใช้ความสามารถของ crontab เข้ามาช่วย โดยกำหนดให้มีการรัน Script นี้ ทุกวันที่ 1 ของทุกเดือน เวลา 0.00 น.<br /><br /># pico /etc/crontab เพิ่มบรรทัดต่อไปนี้ลงในท้ายไฟล์ โดยกดปุ่ม Shift +g<br />0 0 1 * * root /root/clcahe.sh<br />เสร็จ แล้วก็ save แล้วเพื่อให้ crontab ทำงาน เราต้องเพิ่มบรรทัด cron_enable= “YES” ลงในไฟล์ /etc/rc.conf ด้วย เสร็จแล้วก็ reboot ด้วยคำสั่ง shutdown –r now<br /><br />ที่มา http://citec.us/forum/index.php?showtopic=24259&hl=<br /></span>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0tag:blogger.com,1999:blog-3379073007125631602.post-89908587944986086992009-03-29T18:36:00.000-07:002009-03-29T19:20:36.813-07:00VNStat On FreeBSD 7 With A PHP GUII installed VNStat and the PHP GUI to be able to view basic information regarding incoming and outgoing traffic per interface. I am using FreeBSD 7 with PHP4, as I had problems setting the GUI up with PHP5. If you can get it to work in PHP5, please do let me know.<br /><br /> To install PHP4, type the following: <span style="font-weight: bold;">cd /usr/ports/lang/php4 && make install clean</span><br /><br />I selected all options to be installed, as I use PHP for other websites and applications as well. Your options might be different than mine, but the defaults should work fine.<br /><span id="fullpost"><br />Also install the gd shared extension for php<br /><br /><span style="font-weight: bold;">cd /usr/ports/graphics/php4-gd && make install clean</span><br /><br />Options for php4-gd-4.4.8:<br /><br /><span style="font-weight: bold;">[X] T1LIB Include T1lib support</span><br /><span style="font-weight: bold;">[X] TRUETYPE Enable TrueType string function</span><br /><br />The application can be obtained from here: http://www.sqweek.com/sqweek/index.php?p=1<br />I downloaded the file to <span style="font-weight: bold;">"/usr/local/src".</span><br /><br />Please note that I am not the creator of the PHP GUI, I found it usefull and it suited my needs 100%. There are extra notes and contact details on the download site.<br /><br />I installed Apache 2 on my system, as I am more familiar with the configuration and settings of Apache 2. I then proceeded to create the directories for the interface.<br /><br /><span style="font-weight: bold;">cd /usr/local/www/data</span><br /><span style="font-weight: bold;">mkdir old</span><br /><span style="font-weight: bold;">mv * old/</span><br /><span style="font-weight: bold;">mkdir vnstat.test.local</span><br /><br />I usually remove the default Apache files in the document root and also add my own redirect file as I make use of virtual hosts.<br /><br />Extract the downloaded files into <span style="font-weight: bold;">"/usr/local/www/data/vnstat.test.local"</span>.<br /><br />Edit the "httpd.conf" and add the virtual host settings.<br /><br /><span style="font-weight: bold;">vi /usr/local/etc/apache2/httpd.conf</span><br /><br />Add the following entry at the bottom of the page:<br /><br /><virtualhost 80=""><br /> <span style="font-weight: bold;">DocumentRoot /usr/local/www/data/vnstat.test.local</span><br /><span style="font-weight: bold;"> ServerName vnstat.test.local</span><br /></virtualhost><br /><br />I kept the entry as basic as possible, but you can refer to the Apache documents on how to add log entries etc.<br /><br />Make sure the following entry is in <span style="font-weight: bold;">"/etc/rc.conf"</span>:<br /><br /><span style="font-weight: bold;">apache2_enable="YES"</span><br /><br />This will ensure that Apache starts up at boot time.<br /><br />Then restart Apache, you can either do a full restart:<br /><br /><span style="font-weight: bold;">/usr/local/etc/rc.d/apache2 restart</span><br /><br />Or if you currently have sites up and running on a live system, it is advisable to do a graceful restart, so that current connections are not broken.<br /><br /><span style="font-weight: bold;">/usr/local/sbin/apachectl graceful</span><br /><br />Find the "vnstat" binary file:<br /><br />which vnstat<br /><br />Should return<span style="font-weight: bold;"> "/usr/local/bin/vnstat".</span><br /><br />If not, you need to install it with the following command:<br /><br /><span style="font-weight: bold;">cd /usr/ports/net/vnstat && make install clean</span><br /><br />Then try the previous command again.<br /><br />Add the line into the "config.php" file, which is in "/usr/local/www/data/vnstat.test.local":<br /><br /><span style="font-weight: bold;">$vnstat_bin = '/usr/local/bin/vnstat';</span><br /><br />Also configure the interfaces to be monitored in the same file:<br /><br /><span style="font-weight: bold;">$iface_list = array('le0', 'ppp0');</span><br /><span style="font-weight: bold;">$iface_title['le0'] = 'Internal';</span><br /><span style="font-weight: bold;">$iface_title['ppp0'] = 'Internet';</span><br /><br />Please take note that your interface system names could very well be different than mine.<br /><br />From the command line, run:<br /><br /><span style="font-weight: bold;">vnstat -i le0 </span><br /><br />Check the VNStat manual pages for more options regarding the "vnstat" command.<br /><br />I added an entry into my client machines hosts file:<br /><br /><ip address="" of="" the="" server=""> <span style="font-weight: bold;">vnstat.test.local</span><br /><br />I waited a few minutes as VNStat does take some time to gather information before anything is displayed. Then I browsed to the hostname and voilà, I could see my bandwidth usage on the configured interfaces.<br /><br />โดย : codenjanod</ip></span><a style="font-weight: bold;" href="http://www.howtoforge.com/forums/member.php?u=44835" title="View user profile." rel="nofollow"></a>LaoEarninghttp://www.blogger.com/profile/16378715479187776717noreply@blogger.com0