Ubuntu 16.04 How to install Apache Tomcat _linux

Source: Internet
Author: User
Tags tomcat apache tomcat

Apache Tomcat is an open source software implementation of the Java servlet and Java Server pages technology. You can use OPENJDK tomcat to run your Java application.

Apache Tomcat Installation

To install Tomcat from the Ubuntu Software Library:

Apt-get Install Tomcat8

You may also need to install the Tomcat8-docs,tomcat8-examples and Tomcat8-admin tools, which provide documentation, testing, and allowing your web-based application to manage Tomcat. You can use the following command to install all three:

Apt-get Install Tomcat8-docs tomcat8-examples tomcat8-admin

If you need to start, stop, or restart Tomcat, you can use the following command:

Systemctl start tomcat8
systemctl stop tomcat8
systemctl restart Tomcat8

Test and use Tomcat

You can open http://example.com:8080/in the browser to verify the installation of Tomcat. Note that Tomcat listens on network port 8080 and does not accept forced HTTPS connections by default. By default, the Tomcat configuration file is located in the/var/lib/tomcat8/conf directory.

To use the Tomcat8-admin Web application, replace your own user name and password by adding the following lines to the line of the/var/lib/tomcat8/conf/tomcat-users.xml file. If you are using Tomcat administrator, add the "Manager-gui" role of the manager and the "Admin-gui" role of the Host-manager application.

If you do not deploy a Web application and you only need to run the application from the command line, you should not enter these lines, because doing so may cause your server to suffer unauthorized logon attempts.

/var/lib/tomcat8/conf/tomcat-users.xml:
<role rolename= "Manager-gui"/> <role
" Admin-gui "/> <user username= username" password= "password" roles= "Manager-gui,admin-gui"/>

Reboot for effective configuration:

Systemctl Restart Tomcat8

The above is a small set to introduce the Ubuntu 16.04 installation Apache Tomcat method, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.