Monday, July 29, 2013

How to install node.js in CentOS server

Here how to install node.js into you CentOS server. Login to your centOS server using SSH client such as putty and type the following commands in shell.

====

yum install openssl-devel
cd /usr/local/src
wget http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
tar zxvf node-v0.6.8.tar.gz
cd node-v0.6.8
./configure
make
make install

====


Thursday, July 25, 2013

Useful Exim commands



These are some useful Exim commands

--------> REMOVE MAILS BY ID -------->
# /usr/sbin/exim -v -Mrm (MAIL ID HERE)

--------> LIST QUEDED MAILS -------->
# /usr/sbin/exim -bp

--------> OUTPUT NUMBER OF QUEDED MAILS -------->
# /usr/sbin/exim -bpc

--------> DELETE FROZEN MAILS -------->
# /usr/sbin/exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm

--------> DELIVER FORCEFULLY EMAILS -------->
# /usr/sbin/exim -qff -v -C /etc/exim.conf &

--------> FREEZE MAILS FROM SENDER -------->
# /usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf

--------> REMOVE MAILS FROM SENDER -------->
# /usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mrm


Saturday, July 20, 2013

View internal: received notify for zone



In /var/log/messages we are getting a lot of entries like :

Mar  3 06:09:13 server named[25625]: client xxx.xxx.xxx.xxx#18993: view internal: received notify for zone ‘example.com’


Solution :

chmod g+w /var/named

Dns issue rndc: connect failed: 127.0.0.1#953: connection refused


[root@testserver ~]# /usr/local/cpanel/scripts/fixrndc
warn [fixrndc] /usr/sbin/rndc status failed: WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)rndc: connect failed: 127.0.0.1#953: connection refused

The problem was that you had portreserve reserving port 953 so named could not bind to the port. I moved the offending file out of the way, restarted portreserve & named and was able to resolve the error for you:
[root@testserver ~]# netstat -tplanu|grep :953|grep LIST
[root@ testserver  ~]# cat /etc/portreserve/named/rndc/tcp
[root@ testserver  ~]# mv /etc/portreserve/named /etc/portreserve/.named
[root@ testserver 1 ~]# /etc/init.d/portreserve restart
Stopping portreserve: [ OK ]
Starting portreserve: (not starting, no services registered)
[root@ testserver  ~]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@ testserver  ~]# netstat -tplanu|grep :953|grep LIST
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 26055/named
[root@ testserver  ~]# rndc reload
WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
server reload successful
Now run this command,
[root@ testserver  ~]# /usr/local/cpanel/scripts/fixrndc