how to install tomcat6 in ubuntu 16.04 using apt-get install
You'll have to download the tar file, decompress and move to a directory of your choice. You can choose a mirror here and get a different download link.
My steps:
$ wget http://ftp.unicamp.br/pub/apache/tomcat/tomcat-6/v6.0.53/bin/apache-tomcat-6.0.53.tar.gz
$ tar xvzf apache-tomcat-6.0.47.tar.gz
$ sudo mkdir /usr/local/tomcat
$ sudo mv apache-tomcat-6.0.47 /usr/local/tomcat
I'm almost sure that Tomcat 6 works in Java 6, so additional steps are required if your Ubuntu is using, for instance, Java 8.
As Java 6 is no longer distributed for Ubuntu, you'll need to download a legacy package and install manually, according to this answer.
$ chmod a+x jdk-6u45-linux-x64.bin
$ sudo ./jdk-6u45-linux-x64.bin
$ mv jdk1.6.0_45 java-6-oracle
$ sudo mv java-6-oracle /usr/lib/jvm
And now, you can switch java version using either update-alternatives
or galternatives
.
Additionally, modify your .bashrc
file to set JAVA_HOME
variable:
export JAVA_HOME=/usr/lib/jvm/java-6-oracle
Related videos on Youtube
Satya N
Updated on September 18, 2022Comments
-
Satya N over 1 year
Is it possible to install tomcat6 in ubuntu 16.04? does ubuntu 16.04 supports tomcat6? when I try to install tomcat 6 using
apt-get install
i got the following messageReading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package tomcat6
and when I try to install
libtomcat6-java
got following message.Reading package lists... Done Building dependency tree Reading state information... Done Package libtomcat6-java is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libtomcat6-java' has no installation candidate
help me to install tomcat6 using apt-get Thank You.
-
edwinksl over 7 years
tomcat6
is considered legacy and is not in the official Ubuntu repositories for 16.04.
-
-
edwinksl over 7 years
tomcat6
doesn't exist for Ubuntu 16.04. -
SPRBRN over 7 yearsBut won't a tar download work?
-
Satya N over 7 yearsmy application is tomcat 6 compatible, and my unix administration skills are limited.
-
edwinksl over 7 years@SPRBRN Untarring the tar from tomcat.apache.org/download-60.cgi would work but that's not what your answer is advocating.
-
SPRBRN over 7 yearsYou're in an XY situation. Give us info about the app that you want to install. If it's Tomcat 6 compatible, it might just work under 7 of 8. As those are easy to install, have you tried that?
-
SPRBRN over 7 yearsIf you really need Tomcat 6, you could install it in docker maybe? But first try 8, then 7, via apt. Tomcat is lots of work, when you start out. It can be complex to figure it out, but it's all possible.
-
TheVillageIdiot over 7 yearsThis has more details: howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu