Tag Archives: linux

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

lsb_release : to print out the ubuntu release information

#lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 7.04 Release:        7.04 Codename:       feisty
Posted in sysadmin | Also tagged | Leave a comment

change user’s shell

solution 1. edit /etc/passwd or solution 2. usermod -s /bin/bash user
Posted in sysadmin | Also tagged , , | 4 Comments

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 , , , , | 208 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