I can't install tomcat 9 in ubuntu-15.10.Can anyone tell me the process how to install tomcat 9 in ubuntu-15.10?

share|improve this question
3  
When you say you can't do it, what exactly have you tried? There are instructions everywhere, such as these: tecadmin.net/install-tomcat-9-on-ubuntu which should work. – XtrmJosh May 25 '16 at 14:42

You can find the instructions for install right here.

They run through 4 steps to install, with superseding steps to run tomcat. Here they are:

1. Verify Java

Tomcat 9 is designed to run on Java SE 8 or later. To check your version, run this command:

java -version

For instructions on installing java, visit this link.

2. Download Tomcat Archive

Download the archive using these commands or download it from tomcat's official download page.

cd /opt
wget http://www.us.apache.org/dist/tomcat/tomcat-9/v9.0.0.M1/bin/apache-tomcat-9.0.0.M1.tar.gz
tar xzf apache-tomcat-9.0.0.M1.tar.gz
mv apache-tomcat-9.0.0.M1 tomcat9

3. Configure Environment Variables

Before starting, you'll have to define your CATALINA_HOME variable:

echo "export CATALINA_HOME="/opt/tomcat9"" >> /etc/environment
echo "export JAVA_HOME="/usr/lib/jvm/java-8-oracle"" >> /etc/environment
echo "export JRE_HOME="/usr/lib/jvm/java-8-oracle/jre"" >> /etc/environment
source ~/.bashrc

4. Setup User Accounts

In the terminal run:

sudo nano $CATALINA_BASE/conf/tomcat-users.xml

and add the following lines between the <tomcat-users> and </tomcat-users> open and close tags:

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Hope it works!

share|improve this answer

The link of the mirror provided in tecadmin site might not always work. It gave 404 when I tried to download.

However, the archive always works. Open this link and download your preferred file. There is a documentation at the end of this page, explaining what are the purpose of each of the files.

For ubuntu users:

  1. download the .zip/.tar.gz file from the archive,
  2. extract it in your desired location,
  3. update manager roles in {tomcat-base-dir}/conf/tomcat-users.html(see this link for help).

Hope this works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.