Monday, May 19, 2008

Useful Linux Commands

Installing Java:
1. chmod 744 jre-1_5_0_15-linux-amd64-rpm.bin
2. Run ./jre-1_5_0_15-linux-amd64-rpm.bin \
java is intalled.
Now to make it active do following:
1. edit .bashrc
2. add PATH=$PATH:/usr/local/bin
where /usr/local/bin is the pate where java is installed.
If you dont want to edit Path variable than create symbolic link (ln) in directory /usr/bin for java, javac , and other utilities you want to use of jre.

Installing Tomcat:
1. Unjar tomcat.tar in the directory you wish to set up tomcat.
2. put following tomcat script in /etc/init.d/
---------------script tomcat----------------------
# This is the init script for starting up the
# Jakarta Tomcat server
#
# chkconfig: 345 91 10
# description: Starts and stops the Tomcat daemon.
#
# Source function library. . /etc/rc.d/init.d/functions
# Get config. . /etc/sysconfig/network
# Check that networking is up.[ "${NETWORKING}" = "no" ] && exit 0
tomcat=/usr/local/tomcat/apache-tomcat-6.0.16
startup=$tomcat/bin/startup.sh
shutdown=$tomcat/bin/shutdown.sh
start(){
echo -n $"Starting Tomcat service: "
#daemon -c
$startup
RETVAL=$?
echo
}
stop(){
action $"Stopping Tomcat service: " $shutdown
RETVAL=$?
echo
}
restart(){
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
# This doesn't work ;)
status tomcat
;;
restart )
restart
;;
*)
echo $"Usage: $0 {startstopstatusrestart}"
exit 1
esac
exit 0
-----------------------------------------------------------------------------------
3. chmod a+x tomcat
4. chkconfig --add tomcat and your service is set :
use "service tomcat start" command to test your service
5. to check tomcat is running ------------------ netstat -vatn grep 8080
6. " dos2unix tomcat" to fix dos to unix conversion issue tomcat" to fix dos to unix conversion issue

Wednesday, May 14, 2008

Swimming Pool in Noida

Hi,
I have joined the swimming pool in Sector-24 , Kendriya Vidhalaya.
Monthly Fee- 1200/-
Seasonal Fee- 4000/- valid till 15-oct-08.
You can visit the pool in morning and evening.

Tuesday, May 13, 2008

My first post

Hi All,
Yesterday was my birthday and it came in my mind to start blogging.
Here I will be share  the purpose of creating this blog . Through this  blog I will be publishing information related to computer science , nature , places around and anything which I found useful to share.
Well thats all for the first blog of mine.
Hope i will be writing continuously here.
Regards,
Himanshu