ERROR: `/var/tmp/geoip/configure’ failed

I am trying to install geoip using pecl install geoip And I get this error “ERROR: `/var/tmp/geoip/configure’ failed” The solution is to install yum install geoip-devel
read more

How to enable Core Dumps in CentOS

To enable core dumps for all daemon, please follow these steps: Edit the /etc/profile. At line 26 of the file, replace this line: ulimit -S -c 0 > /dev/null 2>&1 with this line: ulimit -c unlimited >/dev/null 2>&1 Replace this line (around line 138 ) in /etc/init.d/functions ulimit -S -c 0 >/dev/null 2>&1 with this: ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1 Enable core-dumping globally by editing the /etc/sysconfig/init file and adding the line: DAEMON_COREFILE_LIMIT=’unlimited’ Enable it for specific daemons by adding this line in the...
read more

Unique visitors from apache log file

Well if you ever want to find out from apache log how many unique visitors you have here is one command cat /usr/local/apache/domlogs/domain.log |awk '{print $1}' | sort | uniq | wc -l If you want to find out for a date cat /usr/local/apache/domlogs/domain.log  |  grep "\[05/Sep/2010" |awk '{print $1}' | sort | uniq | wc -l Unique referrers cat /usr/local/apache/domlogs/domain.log | awk '{print $11};' | awk -F / '{print $3}' | sort | uniq Number of hits cat /usr/local/apache/domlogs/domain.log | wc...
read more

Setting up HAProxy with SSL

Well today I was set up a haproxy to use ssl, and did’t figure out from first time how to get only one file for the pem. In haproxy you have only one file with all certificates. So the order is this: cat matrafox.info.key >> matrafox.info.pem cat matrafox.info.crt >> matrafox.info.pem cat intermediate.bundle >> matrafox.info.pem After this just add the bind *:443 ssl crt /etc/ssl/matrafox.info.pem And you will have the right one.
read more

How to get md RAID array to rebuild even if read errors

Well hope this will help someone like me because I really didn’t find exactly all information on internet. So .. My situation was like this raid 1 software . On smartctl both hard drive look pretty mess up so I decide to switch sdb first. So, I remove the sdb from raid, make the tiket to datacenter and they say won’t change the hard drive because is ok. So I put the sdb back in place but my surprise was big. The raid didn’t build and get a failed . And the sdb was put in (S) spare . cat /proc/mdstat Personalities : [raid1] md3 : active raid1 sdb4[2] sda4[0] 1851802943 blocks super...
read more

chkconfig list ubuntu

Well on ubuntu I didn’t find a corresponding command to chkconfig list. So a, easy way to find out what is running on startup is to run this: runlevel N X And after you see what runlevel is you list the directory : ls -ialh ls -ialh /etc/rcX.d/ Where X is the answer from runlevel Also some equivalent command: chkconfig –add chkconfig –level 345 on chkconfig –del update-rc.d defaults update-rc.d start 20 3 4 5 update-rc.d -f...
read more

« Previous Entries