July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Password Protect any WebApp folder in Tomcat-6.x

The following steps were tested with Tomcat 6.0.29. I think they should work with all currently running Tomcat versions out there. If it didn’t work out for your version, please let me know. Okay so lets start: First of all, we need to enable the MemoryRealm. You can do so by adding this line to […]

Integrating Tomcat and Apache on Red Hat Linux

Referance: http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html

1.0 Introduction

Java servlets are a powerful tool for building websites and web based applications. One skill that every Java web developer should have is the ability to install and configure the Tomcat servlet engine. Many thanks to the Apache Software Foundation for providing this mature, stable, open source software. It was recently […]

Multicast on linux

Multicast on linux

 

# setup the routes ip route add 224.0.0.0/4 dev eth0 # try to ping the multicast aware hosts on your lan with 2 pings ping -c 2 224.0.0.1 # 100% packet loss # stop ignoring broadcasts sudo echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts # try to ping the multicast aware hosts on your […]

Comfortable environment On Linux Shell

Comfortable environment On Linux Shell

After installing new Linux or Unix system I like to edit /etc/profile or $HOME/.bash_profile and add following lines:

alias vi=”vim -o” alias ll=”ls -l” alias la=”ls -la” export EDITOR=vi First line is to use vim instead of vi. Second and third lines will create two aliases for ls -l and […]

List number of file handles (open files) for each process

List number of file handles (open files) for each process

Here is a simple script that will show you a number of file handles (open files) used by each process on your Linux system:

ps -e|grep -v TTY|awk {‘print “echo -n \”Process: “$4″\tPID: “$1″\tNumber of FH: \”; lsof -p “$1″|wc -l”‘} > out; . ./out

[…]

Find directory with biggest number of files / directories

Find directory with biggest number of files / directories

Today we had a problem related with a number of files in a directory. We needed to find directories with a biggest number of files / directories in it. Here is a small shell script that will list directories and a number of files/directories in each […]

Rebooting linux without reboot command

Rebooting linux without reboot command

Just a sample of how you can reboot or shutdown linux without issuing reboot command, so called hard reboot. That means that system will just make a reset as if you pressed a reset button, without running any shutdown scripts, etc. A kind of dangerous staff, but can be helpful […]

Encrypt Files Using GnuPG

Encrypt Files Using GnuPG

HowTo we will discuss to encypt files using GnuPG. Encryption is a method which protect data stored on your computer or sending over the network from compromise. It can be used to ensure and verify data comes from a rightful owner, and also to maintain confidentiality of the data. We will […]