Happy
Goat
Year
2015

 

If you know where it's going
it's not worth doing !

2011-11-05 00:00:00.0

2011-11-05 00:00:00.0

2011-11-05 00:00:00.0

Useful Command : Unix and Linux

OS, Kernel, Distro

Check Kernel Version

uname -r
2.6.9-42.ELsmp

Check Linux Distro

cat /etc/issue
cat /proc/version

User Command

Create Symbolic Link

ln -s filename sylink

Tar

tar –cf conf.tar conf/
tar –xf conf.tar

Find Directory

find / -name 'bin' -type d

Split File

(By bytes) split -b 40k myfile.txt segment
(By lines) split -l 500 myfile segment

2011-02-20 00:00:00.0

2011-02-20 00:00:00.0

2011-02-20 00:00:00.0

Tomcat startup script for Linux

Need to start Tomcat automatically during Linux reboot? Just follow these simple steps:

1. Write a Linux script to do the startup/shutdown, by calling startup.sh and shutdown.sh

2. Register Tomcat as a service in Linux

Linux shell script to start / stop Tomcat

#!/bin/bash
#
# tomcat
#
# chkconfig: 345 99 30
# description:  Start up the Tomcat servlet engine.

# Source function library.
. /etc/init.d/functions

RETVAL=$?
CATALINA_HOME="/opt/apache-tomcat-6.0.29"

case "$1" in
 start)
        if [ -f $CATALINA_HOME/bin/startup.sh ];
          then
            echo $"Starting Tomcat"
            $CATALINA_HOME/bin/startup.sh
        fi
        ;;
 stop)
        if [ -f $CATALINA_HOME/bin/shutdown.sh ];
          then
            echo $"Stopping Tomcat"
            /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh
        fi
        ;;
 *)
        echo $"Usage: $0 {start|stop}"
        exit 1
        ;;
esac

exit $RETVAL

Save the file as /etc/init.d/tomcat

Make sure the file has execute permission, chmod +x /etc/init.d/tomcat

2010-05-29 00:00:00.0

2010-05-29 00:00:00.0

2010-05-29 00:00:00.0

Chinese charater in Java, Tomcat, MySQL

Just added a new trade section, dedicated to the sharing of my trading experience and stock selection.

I've decided to write in chinese, so have spent some time to enable chinese character support. Actually it's just 3 simple steps.

Read on for instructions on displaying chinese character for a site powered by Java, Tomcat and Mysql.

Recent Posts    

[ + ]

Category    

[ + ]

IT programming (3)

astronomy (1)

auto (2)

broadband (8)

laptop (2)

mobile (2)

property (7)

sports (2)

trade (12)

travel (2)

Recent Posts