Debian 7 install Tomcat 7

Source: Internet
Author: User
Tags nginx reverse proxy

Debian 7 install Tomcat 7

The Tomcat 7 installed on CentOS7 is started and CentOS7 comes with the httpd service. Port 80 is occupied. After the httpd service is uninstalled, install Tomcat 7 after openjdk is installed, then we found that the default port is 8080, and we used the netstat command to check the port usage. We found that CentOS7 did not have this command. This is not scientific. The specific reason was not analyzed, what's more, the service tomcat iptables command is changed to systemctl start iptables... It's speechless, and the result is not tossed out on CentOS7. It's good to change the port to 1024 or above, but not to the port lower than 1024. I guess it's a permission problem, the default port 1024 does not grant permissions.

Debian is installed with an angry version, and apache2 is included in Debian. This is annoying.

Apt-get remove apache *

Remove all of them, and then install java to save effort. Run the command directly.

Apt-get update

Apt-get install java-package

Apt-get install tomcat7

After everything is done, modify the port number, the/etc/tomcat7/server. xml file, you know. After the modification, I found that port 80 is still difficult to use. It's strange. I thought it might be a permission problem. After some time, I found

Vi/etc/default/tomcat7

# Modify the last AUTHBIND = yes. Remember to remove.

# The effect of setting this parameter to yes is described in English. The general meaning is that you have to do this when you set the port number Xiaoyu 1023.

Restart the service.

Service tomcat7 start

OK.

To change the default webapps directory, edit/etc/tomcat7/server. xml.

Prerequisites: Create the webapps directory under/usr, and then edit the server. xml file. Add a Context at the end of the Directory, that is, </Host>.

<Context path = "" docBase = "/usr/webapps" debug = "0" reloadable = "true"> </Context>

Load Balancing between Apache and multiple Tomcat clusters in Linux

Nginx Tomcat Cluster load balancing solution notes

Instance details Tomcat component installation + Nginx reverse proxy Tomcat + Apache use mod_jk and mod_proxy Reverse Proxy and load balancing

Deploy a log server using Rsyslog + LogAnalyzer + MySQL in CentOS 6.5

Build an Apache + Tomcat environment (JK deployment process)

Tomcat details: click here
Tomcat: click here

This article permanently updates the link address:

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.