View the various cron jobs running in the server

ARUN Post in CRON, LINUX COMMANDS
0

cd /var/spool/cron/

There will be a file with username which has all the crons for that user.

tail -f /var/log/cron

crontab -u Un -l   —> List cron jobs of user UN.  Should be logged in as root to view this.

crontab -l   –> List cron jobs of the user logged in

crontab -e  –>  Edit cron jobs of the user logged in.

Cannot change password for cpanel a/c`s in WHM

ARUN Post in WHM BACKEND, WHM FRONTEND
0

While trying to change the cpanel passwords we get the message

“The password for ‘user name’ could not be changed because: ” and that’s it.

SOLUTION

Upgraded cPanel to a stable version and it fixed

Login to WHM >> Update Preferences >> Select ” Automatic (STABLE tree) ”

Click save

Then run the below command in screen

/scripts/upcp –force

Clear suphp logs (Solution for Php internal 500 error)

ARUN Post in ERROR, PHP
0

cd /root/bin    (If no bin flder create one)

vi clear_suphp.sh

cd /usr/local/apache/logs
echo > suphp_log

save and exit

chmod 700 clear_suphp.sh

crontab -e

10 */1 * * * /bin/bash /root/bin/suphp_clear > /dev/null 2>&1                  (Will execute the cron in every 2hrs)

save and exit

service crond restart

To find in MB size of particular file

ARUN Post in DISK RELATED
0

ls -alh | grep suphp

Disk usage of each partition on entire server.

ARUN Post in DISK RELATED
0

df -h

PHP INFO

ARUN Post in PHP
0
<?php
phpinfo();
?>

Email Error (Error number : 451)

ARUN Post in ERROR
0

Squirrel mail :

Message not sent. Server replied: Requested action aborted: error in processing
451 Temporary local problem – please try later

Solutions

1 )  Make sure there is an entry in /etc/localdomains  ( For cpanel servers ).

REDIS installation

ARUN Post in INSTALLATION
0

Visit the link below :

http://code.google.com/p/redis/

login to server

cd /usr/src

wget http://redis.googlecode.com/files/redis-1.2.0.tar.gz

tar -zxvf redis-1.2.0.tar.gz

cd redis-1.2.0

make

./redis-server

Search a pattern inside all files in current

ARUN Post in LINUX COMMANDS, SEARCH COMMANDS
0

grep -rl pattern .

For example :

To search for each line under the current directory for the word “Hacked”
grep -rl Hacked .

Login to VPS

ARUN Post in VPS
0

vzctl enter “VEID”
VEID –> obtained from vzlist -a command

To see all VPS on a node

ARUN Post in VPS
0

vzlist -a

To set directory listing

ARUN Post in Set Many Things
0

To set directory listing to 15000
vi /etc/ftpd.con
Edit line :
LimitRecursion 15000  8

To view Plesk admin password

ARUN Post in PLESK BACKEND
0

cat /etc/psa/.psa.shadow

For Plesk 10.2 onwards

[  /usr/local/psa/bin/admin --show-password  ]

 

Increase disk quota

ARUN Post in WHM FRONTEND
0

WHM  >> Quota Modification >> Pull out the domain name >> Click on Modify.

Find mail server

ARUN Post in MAIL
0

If an entry present in
/etc/localdomains
Mail server will be the currents server

If mail server set as remote server, then entry will be present on
/etc/remoteserver