Sunday, July 12, 2009

MySQL Error : mysql is not running but lock exists

/etc/init.d/mysql status


coming back with:

mysql is not running but lock exists


Solved by removing the lock file:

rm /var/lock/subsys/mysql

Sunday, March 29, 2009

Installing JBoss Java Application Server in RHEL / CentOS 5

Just execute following command:-

yum install java-1.5.0-sun-devel jbossas


For old RHEL use following command:-

up2date -i java-1.5.0-sun-devel jbossas


Done.

Saturday, March 28, 2009

Monitor Network Usage / Network Status

Debain / Ubuntu Installation


Install by using following command:-

sudo apt-get update
sudo apt-get install ntop


Centos / RedHat Installation

Download the RPM packages:-

http://dag.wieers.com/rpm/packages/ntop/
http://rpmfind.net/linux/RPM/fedora/4/i386/glib-1.2.10-16.i386.html


Install all RPM packages using following command:-

rpm -ivh  glib-1.2.10-16.i386.rpm
rpm -ivh ntop-3.2-1.el4.rf.i386.rpm


After finish installion ntop for both, need to setup the admin password:-

/usr/sbin/ntop -A
OR
sudo /usr/sbin/ntop -A


Restart ntop service:-

/etc/init.d/ntop restart


by default ntop using port 3000, verify by using following command:-

netstat -tulpn | grep :3000


follow this link to view network status and usgae:-

http://localhost:3000/
or
http://{IP number}:3000/


ntop_preview

Install Suhosin as extension / PHP harden

Download the latest version of suhosin:-

wget http://download.suhosin.org/suhosin-0.9.27.tgz


Suhosin required php-devel:-

yum install php-devel


Install suhsosin:-

cd suhosin-0.9.27
phpize
./configure
make
make install


Congfirue Suhosin congiguration file:-

echo 'extension=suhosin.so' > /etc/php.d/suhosin.ini


Restart your webserver..
blockquote>
/etc/init.d/httpd restart

Check your suhsosin:-
php -v

or crate phpinfo page.