RSS

Monthly Archives: January 2012

How to restart Tomcat

Below Mentioned are the commands:

=====================================

#cd /usr/local/jakarta/tomcat/bin
#./shutdown.sh ——————> For Stopping the Tomcat
#./startup.sh ———————-> For Starting the Tomcat
#java -jar bootstrap.jar
#./catalina.sh start
#/scripts/restartsrv tomcat

=====================================

Remember go one by one starting form stopping….

As if you don’t know 😛

 

Advertisements
 
Leave a comment

Posted by on January 24, 2012 in Uncategorized

 

Warning: include_once(Net/SMTP.php) [function.include-once]: failed to open stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php

Warning: include_once(Net/SMTP.php) [function.include-once]: failed to open stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php on line xWarning: include_once() [function.include]: Failed opening ‘Net/SMTP.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /usr/local/lib/php/Mail/smtp.php on line xFatal error: Class ‘Net_SMTP’ not found in /usr/local/lib/php/Mail/smtp.php on line x

Soultion:

Check following things:
==========================
Pear list
You must see
Mail 1.2.0 stable
Pear 1.2.0 stable
==========================

This means pear mail is installed, now if you look closer to the error i.e
Failed opening ‘Net/SMTP.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /usr/local/lib/php/Mail/smtp.php on line xFatal error: Class ‘Net_SMTP’ not found in /usr/local/lib/php/Mail/smtp.php on line x

This means that the Net_SMTP is not installed
Just install it by

pear install Net_SMTP

Thats it now the email must run 😎

 
Leave a comment

Posted by on January 20, 2012 in Uncategorized

 

Commands to find spammers on the cpanel server

As you know, exim is generally used as mail servers in Cpanel.

a) Tracking the scripts that send mails:

The following command will be helpful to get the path of the script that is
sending mails.

ps -C exim -fH ewww|awk ‘{for(i=1;i<=40;i++){print $i}}’|sort|uniq -c|grep PWD |sort -n

ignore the following lines if any line that contains

PWD=/
PWD=/var/spool/exim/

If it was happened few times ago, you can use the following command.

grep “cwd=” /var/log/exim_mainlog|awk ‘{for(i=1;i<=10;i++){print $i}}’|sort|uniq -c|grep cwd|sort -n

The output format of the above command is the same.

That’s all about tracking a spamming script.

In most of the servers, the SMTP port would be 25. If we know the SMTP port, we can trace the spammer IP address using the following command.

netstat -plan |grep :25 | awk ‘{print $5}’ |cut -d: -f1 |sort |uniq -c |sort -n

If you are using another port for SMTP ( not 25 ), you should replace the port 25 with the correct one.

If you are not sure about the SMTP port, please use the following command to get the port number.

cat /etc/services | grep smtp

It will work to find spammers!! 😎

 
2 Comments

Posted by on January 19, 2012 in Uncategorized

 

Problem accessing server via SSH

While doing SSH with correct details we get Access denied quite strange!! but you can elimivnate the error with ease cgheck the /var/log/messaages

You might see following error in the error logs:
===========================================================================================
su(pam_unix)[17977]: session opened for user root by (uid=0)
PAM-shells[23966]: /etc/shells is either world writable or not a normal file
sshd: sshd shutdown succeeded
===========================================================================================
Now just check the permission of /etc/shells on the server.
You might see
[root@vpxxx~]# ls -ld /etc/shells
-rwxrwxrwx  1 root root 32 Jun 18 20:17 /etc/shells
here the permisions are incorrect the permission must be 755 i.e
[root@vpxxx~]# ls -ld /etc/shells
-rwxr-xr-x  1 root root 32 Aug 31 07:46 /etc/shells

Just make the permission to 755 thats it now log into your server via SSH bingo you are in. 😉

 
Leave a comment

Posted by on January 13, 2012 in Uncategorized

 

How to install mailman on plesk server

How to install mailman on plesk server

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1] Download the link :

http://download1.parallels.com/Plesk/Plesk8.3/CentOS5/swsoft_installer_v3.3.0_build080201.09_os_CentOS_5_i386
2] after downloading the above tar file make it permission to 755
3] execute it and the scripts automatically starts and follow the steps.

 
Leave a comment

Posted by on January 13, 2012 in Uncategorized

 

error: Unable to fetch the cPanel user file for clients

When cPanel is upgraded to higher version we get an error when we are trying to swap username of any domain tghe error is as follows:
===============================================================
error: Unable to fetch the cPanel user file for clients
===============================================================
For solving the above issue just follow following steps:

cd /var/cpanel/users

Here the username will be  the cPanel username. The correct permissions on the file should look like the following:

-rw-r—–  1 root username  xxx Aug  8 21:00 username

Now if the above permission and ownership is correct edit the username

vi username

Now search for “USER=”
This feild must contain:
USER=cpanelusername
In my case there was
USER=clients instead of cpanel username

Just change it to cpanel username if it is not thats it now try adding any username for your domain..

 

It works…. 😎

 
Leave a comment

Posted by on January 13, 2012 in Uncategorized

 

DNS not getting updated unable edit dns zone from WHM

DNS not getting updated

unable edit dns zone from WHM

error log cpanel :

tail /usr/local/cpanel/logs/error_log
Cpanel::SafeFile::safelock(‘/var/cpanel/dnsrequests’) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 24
Cpanel::SafeFile::safeopen(GLOB(0x88dc038), ‘>’, ‘/var/cpanel/dnsrequests’) called at whostmgr/bin/dnsadmin-ssl.pl line 1344

This is a cpanel bug and is caused by corrupted dnsrequest lock file. This can be fixed by manually dleteing the lock file

# rm /var/cpanel/dnsrequests.lock

😎

 

 
Leave a comment

Posted by on January 13, 2012 in Uncategorized