Sep 132011
 
text

When changing the IP of a domain, end users will have the old IP of the domain cached at their ISP’s nameservers for a duration of the TTL (time to live). The default value is 14400 seconds (4 hours). This means, that when you change the IP of the sever, the worst case, is the end users will be using the wrong IP for 4 hours before the cache expires and the IP is recached with the correct value.

The simple way to minimize this propogation error is to lower the TTL. We’ll change the TTL from 14400 to 100 seconds for all domains on your system (assuming server move). Run the following:

cd /usr/local/directadmin/data/templates
perl -pi -e 's/14400/100/' named.db
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

Wait about a minute or 2. Check your /var/named/*.db files.. the TTL should now be 100 instead of 14400. Once complete, do the same thing, but replace 100 with 14400 and 14400 with 100 in the perl command.

If you are running the for just one domain, then run the perl command in /var/named/domain.com.db, instead of the named.db file and restart named.

In both cases, you’ll want to do this at least 4 hours before you actually do the IP change so that all cached values are stored for no more than 100 seconds. The nameservers will then query for the new IP every 100 seconds (instead of 4 hours), giving the end user the new IP much quicker.

credit http://help.directadmin.com/item.php?id=87

Sep 082011
 
text

หลังจากได้ทดลองติดตั้งใช้งานเป็นที่น่าพอใจ จึงนำวิธีการติดตั้งมาเผยแพร่ครับ
หมายเหตุ: อันนี้ติดตั้งเฉพาะ http ที่ port 80 นะครับ สำหรับ https ที่ port 443 จะเข้าตรงที่ apache ไม่ผ่าน varnish
หมายเหตุ: เครื่องที่มีมากกว่า 1 ip อาจจะมีปัญหากับ virtual host template นะครับ เพราะไม่ได้ทดสอบ แต่น่าจะใช้งานได้ และต้องเพิ่ม bind ip ให้ varnish ด้วย

Varnish Cache is an open source, state of the art web application accelerator. You install it on your web server and it makes your website fly.
https://www.varnish-cache.org/

วิธีการติดตั้งนั้นจะใช้วิธี compile จาก source เอานะครับ ไม่ลงผ่าน yum หรือ apt

ขั้นตอนที่ 1 ติดตั้งและทดสอบการทำงานของ varnish ก่อนใช้งานจริง

1.1: เตรียม dependencies ที่ varnish ต้องการ
สำหรับ OS อื่นๆ ดูได้ที่ https://www.varnish-…rce-or-packages
สำหรับ CentOS

#yum  -y  install   automake   autoconf   libtool   ncurses-devel   libxslt   groff   pcre-devel   pkgconfig

Continue reading »

Jul 212011
 
text
Any OSx86 installation guide can seem daunting at first glance, especially when trying to remember cryptic terminal commands and sorting through volumes of misinformation on the web. This guide requires no coding, terminal work, or Mac experience of any kind.
Because Apple is only distributing OS X Lion through the Mac App Store until next month, we’ve had to rethink our retail installation method. What follows is our recommendation for the easiest, cleanest and most Mac-like installation process. For best results, follow this guide to the letter.

Continue reading »