Archive for the ‘sysadmin’ Category
Tuesday, April 7th, 2009
อยู่ดีดี wget ที่เคยใช้ download อะไรต่างๆนาๆ บน Linux/Unix Server ที่ไม่มี GUI
เกิดใช้ไม่ได้ขึ้นมาซะงั้น อาการก็เป็นแบบนี้อ่ะ
# wget http://awstats.sourceforge.net/awstats.ftp.urldetail.html
–04:17:37– http://awstats.sourceforge.net/awstats.ftp.urldetail.html
Resolving awstats.sourceforge.net… 216.34.181.96
Connecting to awstats.sourceforge.net|216.34.181.96|:80… connected.
HTTP request sent, awaiting response…
เหมือนจะ http request ผ่าน แต่ http response กลับไม่มาถึงซะงั้น
ก็เลย ลอง man wget ดูว่าัมันมี option อะไีรให้้ใช้บ้าง เพราะว่า ลอง download file เดียวกันจาก windows server
ที่อยู่บน subnet เดียวกันกับ เจ้า linux server ตัวนี้ มันดัน download ได้ เลยคิดว่าต้องเป็นที่ wget แน่ๆ
อ่าน [...]
Thursday, April 2nd, 2009
1. timeout timewait parameter
Determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources.
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
2. TCP_KEEPALIVE_INTERVAL
* Description: Determines the wait time between isAlive interval probes.
* How to view or set: Issue the following command to set the value:
echo 15 > /proc/sys/net/ipv4/tcp_keepalive_intvl
3. open file limit
ulimit -a
ulimit -n 8000
4.# [...]
Friday, February 6th, 2009
ทำ Alias ใช้ในกรณีที่ directory นั้นๆ ไม่ได้อยู่ใน document root ของ web server เช่น
อยากให้ url http://www.kmitl.ac.th/bankster แต่ directory bankster ไม่ได้อยู่ที่ document root
ของ www.kmitl.ac.th อาจจะอยู่ที่อื่นอย่างเช่น /home/bankster/public_html
สามารถทำการ set เป็นลักษณะของ Alias ได้ที่ /etc/apache2/sites-enabled/www.kmitl.ac.th
โดยเพิ่ม Alias /bankster “/home/bankster/public_html” ไว้ภายใน tag <VirtualHost> … </VirtualHost>
แล้วทำการ set option สำหรับ directory /home/bankster/public_html ดังนี้
<Directory /home/bankster/public_html>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
สังเกตุว่า ไม่อนุญาตให้ทำการ Index Directory เพราะไม่ได้ set
Options Indexs [...]
Friday, February 6th, 2009
ปกติแล้ว เจ้า MySQL server จะ ถูก config ให้ Accept connection จาก localhost
เท่านั้น ถ้าเราอยากจะทำให้มัน Listen ที่ 0.0.0.0 ก็ต้องไป set ที่ไฟล์ /etc/mysql/my.conf
ก่อนอื่นต้อง stop service mysql ก่อน /etc/init.d/mysql stop
แล้ว vi /etc/mysql/my.confหาบรรทัดที่เขียนว่า
bind-address = 127.0.0.1
แก้เป็น
bind-address = 0.0.0.0
save file แล้ว exit ออกมา
สั่ง start service mysql /etc/init.d/mysql start
ลอง netstat -na | more ดูจะพบว่า mysql listen ที่ 0.0.0.0:3306 0.0.0.0:* แล้ว
bankster@ruby:~/test$ netstat -na
Active Internet [...]
Tuesday, January 6th, 2009
พอดีว่าจะเพิ่ม user เข้าไป manage vmware server host
ซึ่งเป็น vmware server version 2 แต่พอเพิ่ม user เข้าไป มันก็ error อย่างที่เห็น
ก็เลย google ดู ก็พบวิธีแก้ปัญหา
/etc/init.d/vmware-mgmt stop
nano /etc/vmware/hostd/authorization.xml
เข้าไปแก้ตรง <NextAceId>11</NextAceId>
เป็น <NextAceId>21</NextAceId> หรือตัวเลขอื่นๆ ที่ไม่ใช่ 11
/etc/init.d/vmware-mgmt start
Sunday, January 4th, 2009
หลังจากที่ลง SAM บน windows server 2003 enterprise 32 bit
แล้วพบว่า SAM ไม่สามารถเล่นเพลงได้ ก็เลยลองถามเจ้า Ink ดู
ให้ลองเข้าไปดู ว่ามันเกิดจากอะไร INK ก็บอกว่า sam มันหา sound card ไม่เจอ
มันเลยไม่เล่นเพลงให้ อืมมมม
ไอ้เราก็จำได้ว่า ตอนลง SAM ใน Windows Server 2008 มันก็หา sound card ไม่เจอ
แต่มันจะมีขึ้นให้บอกว่า ให้ run SAM ใน Silent Mode แต่พอลงใน windows server 2003
กลับไม่มี dialog box นั้นขุึ้นมา แสดงว่ามันคงหาเจอ แต่เป็น audio ของ vmware
เลย output ออกมาไม่ได้ ก็เลยลองกดเข้าไปในส่วนของ configuration [...]
Thursday, December 25th, 2008
1. .tar , .tar.gz
tar xvfz file.tar.gz
2. .gz
gunzip file.gz
3. .zip
unzip file.zip
4. rar
unrar file.rar
hope it help!.
Addendum I :
1. apt-get install gunzip
2. apt-get install unrar
3. apt-get install unzip
4. tar comes with ubuntu distro by default.
Addendum II :
ZIP
Zip is probably the most commonly used archiving format out there today. Its biggest advantage is the fact that it is available [...]
Tuesday, December 2nd, 2008
ก็เข้าไป setting ที่ wordpress control panel
ในส่วนของ permalinks
แล้วก็ config apache server
<Directory /var/www/software>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Friday, October 31st, 2008
วันนี้ได้ชื่อว่าเป็นวันแห่งการทรมานเน็ตหอ
สืบเนื่องจากตอนนี้กำลัง deploy ldap กับ freeradius
ใ ห้ทำงานร่วมกันได้ ก็เลยต้อง download image disk
ที่เ ป็น OS มาเพื่อ install ลงใน vmware workstation
วันนี้ download มาสาม file ใหญ่ๆ
คือ freeBSD i386 disc 1 , disc 2
และก็ ubuntu desktop 8.10 intrepid
ซึ่ง official release วันนี้พอดี
เพิ่ง download เสร็จเลยมา blog ไว้ครับ