Tag Archives: centos

HTTPD mod_perl & mod_cgi

1. install mod_perl , mod_cgi #yum -y install mod_perl mod_cgi 2. edit /etc/httpd/conf/httpd.conf #vi /etc/httpd/conf/httpd.conf LoadModule cgi_module modules/mod_cgi.so LoadModule perl_module modules/mod_perl.so 3. edit /etc/httpd/conf/vhost.conf to handle cgi/perl #vi /etc/httpd/conf/vhost.conf <Directory “/path/to/your/perl-script-dir”> AllowOverride all DirectoryIndex index.php index.html Options +ExecCGI AddHandler cgi-script cgi pl Order allow,deny Allow from all </Directory> 4. reload your httpd server #service httpd reload 5. test to execute perl script by httpd #cd /path/to/your/perl-script/dir #vi test.pl #!/usr/bin/perl print “Content-type: text/plain\r\n\r\n”; print “mod_perl rules!\n”; 6. chmod +x [...]
Posted in sysadmin | Also tagged , , , , , | Leave a comment

Setting up NTP Client on CentOS 5.3

setting up the ntp client for time synchronization on centos cando as follow 1. login to your shell as root 2. install ntp client by invoke this command yum -y install ntp 3. edit ntp file configuration| vi /etc/ntp.conf comment out all the default time server and add your own time server. in case of me , Im in Thailand so I [...]
Posted in sysadmin | Also tagged , | 1 Comment

wget problem [solved]

อยู่ดีดี 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 แน่ๆ อ่าน [...]
Posted in sysadmin | Also tagged , , , | 1 Comment

Linux Performance Tuning (sysctl.conf)

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.# [...]
Posted in sysadmin | Also tagged , , , , | 209 Comments

ตั้งเวลาใน CentOS

date mmddhhmmyyyy date 040203052009 เพิ่มเติม sync เวลาอัตโนมัติด้วย ntpdate yum install ntp chkconfig –levels 235 ntpd on ntpdate 0.pool.ntp.org service ntpd start
Posted in Uncategorized | Also tagged , , , | Leave a comment
  • Tags

  • Pages

  • Categories

  • Archives