October 22, 2009 in Uncategorized, hosting
Tags: centos, linux, prelink, rpm | No Comments »
Today on a Cpanel server after nightly upgrade , our firewall (csf) detected some changed files. Then I run bellow verify command :
#rpm -qfV /bin/bash
prelink: /bin/bash: at least one of file’s dependencies has changed since prelinking
S.?….. /bin/bash
I had never seen this before, but apparently rpm is doing something different now that prelink is present. Note [...]
August 19, 2009 in Uncategorized, hosting
Tags: linux, mysql | No Comments »
A much dreaded MySQL error message during queries is “MySQL server has gone away”. An alternative message is “Lost connection to server during query”. This is a strange problem which afflicts a wide variety of PHP software including but not limited to WordPress. There are several causes for it. Let’s look at the common and [...]
August 17, 2009 in Uncategorized, hosting
Tags: linux | No Comments »
For those who don’t like to RTFM, bellow can find codes for verifying rpm’s:
for e.g.
rpm -qfV /usr/sbin/sshd
S.5….T c /etc/pam.d/sshd
S.5….T c /etc/ssh/sshd_config
explains into:
S file Size differs
M Mode differs (includes permissions and file type)
5 MD5 sum differs
D Device major/minor number mismatch
L readLink(2) path mismatch
U User ownership differs
G Group ownership differs
T mTime differs
June 11, 2009 in Uncategorized, hosting
Tags: bash, linux | No Comments »
I know that bash is not really a scripting language (I like perl ) but there are times when you just want to do things on a single command line.
So, if you want for example drop some databases from a folder list:
ls /var/lib/mysql | grep dbmatch* | while read i; do echo “drop database $i”; [...]
March 3, 2009 in Cpanel, Plesk, Uncategorized, hosting
Tags: Cpanel, linux, Plesk | No Comments »
just paste to shell (cpanel server):
ps -axo “%C %p” |sort -nr |head -5 |while read i p; do echo -n $i; /usr/local/apache/bin/apachectl fullstatus |grep -A 1 $p; done
there is also a python script for that : apache-top.py . you can donwload it from: http://www.fr3nd.net/projects/apache-top/. it’s a nice tool but still need some customization.
January 6, 2009 in hosting
Tags: find, hosting, linux | No Comments »
I kept running into this error when searching for a certain string, so I came up with a different way of searching:
find . -name *\* -exec grep -i -H -n ’string’ {} \;
Problem solved.