cd /var/downloads/
wget http://mirror.switch.ch/mirror/apache/dist/tomcat/tomcat-7/v7.0.5-beta/bin/apache-tomcat-7.0.5.tar.gz
tar xvzf apache-tomcat-7.0.5.tar.gz
mv apache-tomcat-7.0.5 tomcat7
sudo cp -rf tomcat7 /usr/share/tomcat7
sudo ln -s /usr/share/tomcat7 /usr/share/tomcat
sudo chmod 777 /usr/share/tomcat7/bin/*.sh
sudo useradd -d /usr/share/tomcat -s /sbin/nologin tomcat
Create Start Script
If you plan not to configure more than one instance, you can also change the variables INSTANCE_NAME and CATALINA_BASE.
The JVM Arguments (e.g. JAVA_OPTS) may not fit your needs, thus you should tweak them.
sudo vim /etc/init.d/<TOMCATINSTANCENAME>
/etc/init.d/<TOMCATINSTANCENAME>
001 #!/bin/sh
002 #
003 # /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
004 #
005 ### BEGIN INIT INFO
006 # Provides: tomcat
007 # Required-Start: $local_fs $remote_fs $network
008 # Required-Stop: $local_fs $remote_fs $network
009 # Should-Start: $named
010 # Should-Stop: $named
011 # Default-Start: 2 3 4 5
012 # Default-Stop: 0 1 6
013 # Short-Description: Start Tomcat.
014 # Description: Start the Tomcat servlet engine.
015 ### END INIT INFO
016
017 set -e
018
019 #PATH=/bin:/usr/bin:/sbin:/usr/sbin
020 NAME=tomcat7
021 INSTANCE_NAME=tomcat1
022 #For Default installations
023 #INSTANCE_NAME=$NAME
024 DESC="Tomcat servlet engine"
025 DAEMON_HOME=/usr/share/$NAME
026 DAEMON=$DAEMON_HOME/bin/jsvc
027 CATALINA_HOME=/usr/share/$NAME
028 TMP_DIR=/var/tmp/$INSTANCE_NAME
029
030 # Run Tomcat 7 as this user ID
031 TOMCAT_USER=tomcat
032
033 # Directory for per-instance configuration files and webapps
034 CATALINA_BASE=/var/lib/$INSTANCE_NAME
035 #For Default installations
036 #CATALINA_BASE=$CATALINA_HOME
037
038 ERR_LOG_FILE=$CATALINA_BASE/logs/$INSTANCE_NAME\_err.log
039 OUT_LOG_FILE=$CATALINA_BASE/logs/$INSTANCE_NAME\_out.log
040
041 if [ `id -u` -ne 0 ]; then
042 echo "You need root privileges to run this script"
043 exit 1
044 fi
045
046 # Make sure tomcat is started with system locale
047 if [ -r /etc/default/locale ]; then
048 . /etc/default/locale
049 export LANG
050 fi
051
052 . /lib/lsb/init-functions
053 . /etc/default/rcS
054
055
056
057 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
058 # defined in $DEFAULT)
059 JDK_DIRS="/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
060
061 # Look for the right JVM to use
062 for jdir in $JDK_DIRS; do
063 if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
064 JAVA_HOME="$jdir"
065 fi
066 done
067 export JAVA_HOME
068
069 if [ -z "$JAVA_OPTS" ]; then
070 #JAVA_OPTS="-jvm server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Djava.awt.headless=true -Xms128M -Xmx512M -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=30 -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:ParallelCMSThreads=2 -XX:+UseCMSCompactAtFullCollection -XX:+DisableExplicitGC -XX:MaxHeapFreeRatio=70 -XX:MinHeapFreeRatio=40 -XX:MaxTenuringThreshold=30 -XX:MaxNewSize=384m -XX:SurvivorRatio=2 -Dsun.rmi.dgc.client.gcInterval=1200000 -Dsun.rmi.dgc.server.gcInterval=1200000"
071 JAVA_OPTS="-jvm server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Djava.awt.headless=true -Xss256K -Xms128M -Xmx512M -XX:MaxPermSize=128m -XX:NewSize=256M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=80"
072 fi
073
074 if [ ! -f "$CATALINA_HOME/bin/bootstrap.jar" ]; then
075 log_failure_msg "$NAME is not installed"
076 exit 1
077 fi
078
079 [ -f "$DAEMON" ] || exit 0
080
081 JAVA_OPTS="$JAVA_OPTS -Dcatalina.base=$CATALINA_BASE -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$TMP_DIR"
082
083 # Set juli LogManager if logging.properties is provided
084 if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
085 JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
086 fi
087
088 # Define other required variables
089 CATALINA_PID="/var/run/$INSTANCE_NAME.pid"
090 BOOTSTRAP_CLASS=org.apache.catalina.startup.Bootstrap
091 JSVC_CLASSPATH="$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar"
092
093 case "$1" in
094 start)
095 if [ -z "$JAVA_HOME" ]; then
096 log_failure_msg "no JDK found - please set JAVA_HOME"
097 exit 1
098 fi
099
100 if [ ! -d "$CATALINA_BASE/conf" ]; then
101 log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE"
102 exit 1
103 fi
104
105 log_daemon_msg "Starting $DESC" "$NAME"
106 if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
107 --user $TOMCAT_USER --startas "$JAVA_HOME/bin/java" \
108 >/dev/null; then
109
110 # Remove / recreate JVM_TMP directory
111 rm -rf "$TMP_DIR"
112 mkdir "$TMP_DIR" || {
113 log_failure_msg "could not create JVM temporary directory"
114 exit 1
115 }
116 chown $TOMCAT_USER "$TMP_DIR"
117 cd "$TMP_DIR"
118
119
120 $DAEMON -user "$TOMCAT_USER" -cp "$JSVC_CLASSPATH" \
121 -outfile "$OUT_LOG_FILE" -errfile "$ERR_LOG_FILE" \
122 -pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"
123
124
125 sleep 5
126 if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
127 --user $TOMCAT_USER --startas "$JAVA_HOME/bin/java" \
128 >/dev/null; then
129 log_end_msg 1
130 else
131 log_end_msg 0
132 fi
133 else
134 log_progress_msg "(already running)"
135 log_end_msg 0
136 fi
137 ;;
138 stop)
139 log_daemon_msg "Stopping $DESC" "$NAME"
140 if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
141 --user "$TOMCAT_USER" --startas "$JAVA_HOME/bin/java" \
142 >/dev/null; then
143 log_progress_msg "(not running)"
144 else
145 $DAEMON -cp "$JSVC_CLASSPATH" -pidfile "$CATALINA_PID" \
146 -stop "$BOOTSTRAP_CLASS"
147 fi
148 rm -rf "$TMP_DIR"
149 log_end_msg 0
150 ;;
151 status)
152 if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
153 --user $TOMCAT_USER --startas "$JAVA_HOME/bin/java" \
154 >/dev/null; then
155
156 if [ -f "$CATALINA_PID" ]; then
157 log_success_msg "$DESC is not running, but pid file exists."
158 exit 1
159 else
160 log_success_msg "$DESC is not running."
161 exit 3
162 fi
163 else
164 log_success_msg "$DESC is running with pid `cat $CATALINA_PID`"
165 fi
166 ;;
167 restart|force-reload)
168 if start-stop-daemon --test --stop --pidfile "$CATALINA_PID" \
169 --user $TOMCAT_USER --startas "$JAVA_HOME/bin/java" \
170 >/dev/null; then
171 $0 stop
172 sleep 1
173 fi
174 $0 start
175 ;;
176 try-restart)
177 if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
178 --user $TOMCAT_USER --startas "$JAVA_HOME/bin/java" \
179 >/dev/null; then
180 $0 start
181 fi
182 ;;
183 *)
184 log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
185 exit 1
186 ;;
187 esac
188
189 exit 0
#########3
sudo chmod +x /etc/init.d/<TOMCATINSTANCENAME>
sudo chmod 755 /etc/init.d/<TOMCATINSTANCENAME>
/etc/profile.d/env.sh
1 export JAVA_HOME=/usr/lib/jvm/java-6-sun
2 export JRE_HOME=$JAVA_HOME/jre
3 export TOMCAT_HOME=/usr/share/tomcat7
4 export PATH=$PATH:$JAVA_HOME/bin
5 export CLASSPATH=.:$JRE_HOME/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
sudo chmod +x /etc/profile.d/env.sh
Native APR Support
cd /usr/share/tomcat7/bin
sudo tar xvzf tomcat-native.tar.gz
JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME
CATALINA_HOME=/usr/share/tomcat7
export CATALINA_HOMEcd /usr/share/tomcat/bin/tomcat-native-1.1.20-src/jni/native/
sudo ./configure --with-apr=/usr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$CATALINA_HOME
sudo make
sudo make install
cd /usr/lib
sudo rm -f libtcnative-1.so
sudo ln -s /usr/local/apr/lib/libtcnative-1.so libtcnative-1.so
Daemon Support
cd /usr/share/tomcat7/bin
sudo tar xvfz commons-daemon-native.tar.gz
cd commons-daemon-1.0.4-native-src/unix/
sudo ./configure --with-java=$JAVA_HOME
sudo make
sudo cp jsvc ../..
Create a Tomcat Instance
This procedure is the same for every instance. As home for instances I chose /var/lib.
cd /var/lib/
sudo mkdir -p tomcat<InstanceNr>
sudo mkdir -p tomcat<InstanceNr>/conf
sudo mkdir -p tomcat<InstanceNr>/logs
sudo mkdir -p tomcat<InstanceNr>/temp
sudo mkdir -p tomcat<InstanceNr>/work
sudo mkdir -p tomcat<InstanceNr>/webapps
sudo cp /usr/share/tomcat7/conf/server.xml ./tomcat<InstanceNr>/conf/
sudo cp /usr/share/tomcat7/conf/web.xml ./tomcat<InstanceNr>/conf/
sudo cp /usr/share/tomcat7/conf/tomcat-users.xml ./tomcat<InstanceNr>/conf/
sudo cp -R /usr/share/tomcat7/conf/Catalina ./tomcat<InstanceNr>/conf/
###
New Note 36
export CATALINA_HOME
cd /usr/share/tomcat/bin/tomcat-native-1.1.20-src/jni/native/
sudo ./configure --with-apr=/usr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$CATALINA_HOME
sudo mkdir -p
sudo cp /usr/share/tomcat7/conf/server.xml ./tomcat1/conf/
tomcat1
[...]
<Server port="8105" shutdown="SHUTDOWN">
[...]
<Connector port="8<InstanceNr>80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8<InstanceNr>43" />
[...]
<Connector port="8<InstanceNr>09" protocol="AJP/1.3" redirectPort="8<InstanceNr>43" />
[...]
##########
Troubleshooting Steps Of Tomcat Server
12/10/2010 09:25:00 PM Posted by Meghana M Bhombhore
Labels: Tomcat, Troubleshooting
Share
Troubleshooting Steps to check whether the Tomcat server is runing or not?
Step1 : Check ps command output
#ps -ef | grep tomcat
Step2 : Check with nmap whether port 8080 is opened or not?
#nmap localhost
Step3 : Check with telnet command as shown in below by executing GET / HTTP/1.0 Host: localhost command once logged in to server at 8080 port.
#telnet localhost 8080 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. GET / HTTP/1.0 Host: localhost
This command should output hte test tomcat page.
Enjoy the troubleshooting:)
#########3
sudo apt-get install sun-java6-bin sun-java6-jre
sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java-6-sun
sudo apt-get install libapr1-dev libssl-dev gcc
sudo vim /etc/jvm
java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
##########
sudo apt-get install sun-java6-jdk
sudo apt-get install ant
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export ANT_HOME=/usr/share/ant
You can put those two commands in your /home/username/.profile if you want to make them permanent.
sudo apt-get install openjdk-6-jdk
How To Change The Java Version In Linux?
12/10/2010 01:16:00 AM Posted by Surendra Kumar Chowdary
Labels: How-To's
Share
This post is regarding how to change java version if multiple java versions are installed?
Check what are the java versions are installed on your system
#java -version
Example output
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
So now I want to change the one version to another version.
If more than one java is installed. Execute below command to see how many java versions are installed? And what is the default version (Default version will be indicated by *)
#update-alternatives --config java
This command will display which is default java version used by your machine..
Example output.
# update-alternatives --config java
There are 2 programs which provided 'java'.
Selection Command
-----------------------------------------------
1. /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
Enter to keep the current selection[+], or type selection number:
So if you want to change the java version from 1.6 (now 2 is default version as shown) to 1.4 just press “1” with out quotes.
Please let us know if you know other way of changing java version.
#cd /opt
#wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
#tar xvfz apache-tomcat-6.0.29.tar.g
UFW is installed by default, but if you need a graphical interface, install GUFW.
sudo apt-get install gufw
update-alternatives --config java
How to set java path in Linux?
Ans : Check where java is installed by using below command
#update-alternatives --config java
This command will show installed java packages in your machine.
Example output :
# update-alternatives --config java
There are 2 programs which provide 'java'.
Selection ----------------------------------------------- 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java *+ 2
From above you can see java version in use it. 1.6.
Setting java path(In Temporary way)
#JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk #export $JAVA_HOME
Setting java path (In Permanent way)
Edit ~/.bashrc and place below two lines in that file and save the file.
Vi ~/.bashrc
JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk export $JAVA_HOME
Now save the file and exit, then logout and login to make those changes to reflect.
Command
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java
$$$$$$$$$$$
How To Change The Java Version In Linux?
12/10/2010 01:16:00 AM Posted by Surendra Kumar Chowdary
Labels: How-To's
Share
This post is regarding how to change java version if multiple java versions are installed?
Check what are the java versions are installed on your system
#java -version
Example output
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
So now I want to change the one version to another version.
If more than one java is installed. Execute below command to see how many java versions are installed? And what is the default version (Default version will be indicated by *)
#update-alternatives --config java
This command will display which is default java version used by your machine..
Example output.
# update-alternatives --config java
There are 2 programs which provided 'java'.
Selection Command
-----------------------------------------------
1. /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
Enter to keep the current selection[+], or type selection number:
So if you want to change the java version from 1.6 (now 2 is default version as shown) to 1.4 just press “1” with out quotes.
Please let us know if you know other way of changing java version.
###############
Install Java
sudo gedit /etc/apt/sources.list
# Add at the buttom
deb http://archive.canonical.com/ lucid partner
#
sudo apt-get update
#
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
# check
java -version
# resuts :
java version “1.6.0.20″
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
#
locate libjavaplugin
Results
/usr/lib/jvm/java-6-sun-1.6.0.22/jre/plugin/i386/ns7/libjavaplugin_oji.so
#
cd /usr/lib/mozilla/plugins
# Look for
/usr/lib/jvm/java-6-sun1.6.0.20/jre/plugin/i386/ns7/libjavaplugin_oji.so.
ln -s /usr/lib/jvm/java-6-sun-1.6.0.22/jre/plugin/i386/ns7/libjavaplugin_oji.so
# Now that you know the path you need to create a link to this in the /usr/lib/mozilla/plugins directory
#
restart Firefox and then enter about:plugins in the address bar to see that Java is now enabled in your browser.
# Another option :
ln -s /usr/lib/jvm/java-6-sun-1.6.0.20/jre/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin.so
#############
Install JDK on UBUNTU (any version) Without Internet Connection
These are the steps I used to install the Java JDK binary,Externally on my System which ain't have Internet.
1.Dowload the latest Java JDK for Linux Platform (in my case,jdk-6u22-linux-i586.bin) from the Sun Java site.Using any System Which Have Internet.
(you can also use jdk-6u3-linux-i586.bin and many other versions)
[*Note:Do not download ".rpm" version of jdk(like jdk-6u22-linux-i586-rpm.bin)]
2.In Terminal Change directory to /usr/local/lib [using comand $cd /usr/local/lib]
3.From there extract the JRE or JDK archive file you downloaded:
$ sudo sh /some/path/jdk-6u3-linux-i586.bin
[In the above commands, replace /some/path with where the JRE/JDK .bin resides and of course replace the filename with what it actually is in your case.]
(In my case: $sudo sh /home/Kishor/Downloads/jdk-6u22-linux-i586.bin)
4.Now Lets create some symlinks so that the executables can be run easily:
Change directory to /usr/local/bin [$ cd /usr/local/bin]
From there execute the following set of commands:
$ sudo ln -sf ../lib/jdk1.6.0_22/bin/* .
[Please Pay attention to the "dot(.)" at the end of the command, it is required and IMPORTENT.
And adjust the directory as well to what you have (e.g. jdk1.6.0_03 in folder /usr/local/lib)
(in mycase it is: jdk1.6.0_22/bin)]
5.Verify installation
To verify that the installation was successful, execute
$ java -version
The output should look something like this if everything is well
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
6. Now you can Execute Java Programs From any directory from your system,here is a small example of mine:
kishor@ubuntu:~/Desktop$ javac HelloWorld.java
kishor@ubuntu:~/Desktop$ java HelloWorld
Hello World!!
kishor@ubuntu:~/Desktop$
#####
5) Download Ubuntu Tweak and VLC
Download Ubuntu Tweak here and install it by double clicking the .deb file
Download VLC by this command
sudo apt-get install vlc
######
4) Ubuntu-Restricted-extras
YouTube, LLCCan’t listen to MP3? Can’t watch Youtube video? Can’t run Java? Don’t worry, all you need to do is to install the ubuntu-restricted-extras package and it will install all the necessary files/codecs for you. Some common applications in the package include MP3 codec, Adobe Flash player, Java runtime and Microsoft core fonts.
sudo apt-get install ubuntu-restricted-extras
###
2) Enable the repositories
Every time I do a fresh install of Ubuntu, the first thing that I do is to enable the universe, multiverse, backport and Canonical’s ‘partner’ repositories. These repositories open up new application choices and allow you to install popular third party software easily and quickly.
Go to System -> Administration -> Synaptic Package Manager.
Click on Settings -> Repositories.
Check all the boxes.
Go to the Third-Party Software tab. Check all the boxes.
Click on Close button and press the Reload button at the top left corner to update the repositories.
###
ubuntu-restricted-extras
sudo apt-get install ubuntu-restricted-extras
###
http://www.linuxnix.com/2010/05/how-to-kill-defunct-or-zombie-process.html
* How To Access Web Server Through IP Address?
* How To Configure And Install Sendmail In Linux?
* How To Upgrade An Installed Source Package?
* How To Install Apache Tomcat on Linux(Redhat/Ubuntu)?
* How To Set Java Path In Linux?
######3
GDebi Package Installer
###
sudo apt-get install nautilus-open-terminal
##############################################
How To Install Apache Tomcat on Linux(Redhat/Ubuntu)?
12/10/2010 09:08:00 PM Posted by Meghana M Bhombhore
Labels: Advanced Servers, How-To's
Share
How to install Apache tomcat on Linux(Redhat/Ubuntu)?
What is Apache tomcat?
Ans : ApacheTomcat is an open source web application server which supports J2ee Servlets, JavaServer, Pages(JSP) and API's. Tomcat should not be confused with Apache web server which an HTTP web server.
---Wikipedia.
Some terminology about Apache tomcat.
Apache Tomcat can be configured by editing server.xml file. Those who knows apache web server. This server.xml can be taken as synonimas to httpd.conf file.
Servlet is defined as a way add dynamic content to a Web server using the Java platform. And a servlet container is a compiled, executable program. The servlet container name is tomcat is catalina.
Pre requists for Apache tomcat are
1. java
2. JDK
Step by step for installing Apache tomcat
Note : Avoide installing tomcat from reposatories, always prefer to install it from source downloaded from apache site.
Step1 : Install all the prequistes
Redhat :
#yum install java
Ubuntu :
#apt-get install java
Step2 : Download tomcat source package and uncompress it.
Redhat/Ubuntu
#cd /opt
#wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
#tar xvfz apache-tomcat-6.0.29.tar.gz
Step3 : Setup the paths for Catalina and others.
Setting catalina paths
Redhat/ubuntu
CATALINA_HOME=/opt/apache-tomcat-6.0.29
CATALINA_BASE=/opt/apache-tomcat-6.0.29
Setting java paths
Check what java versions are installed in your system
#update-alternatives --config java
This command will display which is default java version used by your machine.
Example output :
# update-alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1
/usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java
Enter to keep the current selection[+], or type selection number:
If you see above the default java version is 1.6 so set the path to /usr/lib/jvm/jre-1.6.0-openjdk
JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk
JDK_HOMe=$JAVA_HOME
Step4 : Now start tomcat server
#/opt/apache-tomcat-6.0.29/bin/sartup.sh
Sample output.
Using CATALINA_BASE: /opt/apache-tomcat-5.5.26
Using CATALINA_HOME: /opt/apache-tomcat-5.5.26
Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.26/temp
Using JRE_HOME:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/
Step5 : By default Apache Tomcat will be hosted onlocalhost : 8080 port by default. So try to access the site with web browser
http://localhost:8080
or
http://localhost:8080
or
http://systemname:8080
Stay tuned to other posts about troubleshooting tomcat installation.
###########3
Wine
Wine is a must-have application for those who can’t live without their Windows applications, It allows you to install your Windows application in your Ubuntu machine and run them like native Windows apps.
sudo apt-get install wine
Once you have installed Wine, remember to run the configuration (Applications -> Wine -> Configure Wine) before attempting to install your favorite Windows app.
No comments:
Post a Comment