How to deploy Tomcat 7 and enable port 80 in Ubuntu

Source: Internet
Author: User

Recently used. Deploy Tomcat 7 in Ubuntu and enable port 80. Because the new version of Ubuntu requires root to use ports lower than 1024 by default, the root user is used during deployment. The procedure is as follows.

1. Install Tomcat 7

Apt-get update
Apt-get install tomcat7
After the installation is complete, visit directly to see if the page can be opened:

Http:/// ip: 8080
If you can, just put the corresponding project in:

/Var/lib/tomcat7/webapps
, Restart the service:

Service tomcat7 restart
2. Configure port 80

If you need to configure port 80 for access, install authbind first:

Apt-get install authbind
Then

Sudo touch/etc/authbind/byport/80
Modify the Tomcat configuration file again:

Vi/etc/default/tomcat7
Find the last line, remove # AUTHBIND = no #, and change it:

AUTHBIND = yes
Save and restart the Tomcat service.

If you want to deploy multiple projects under Tomcat, that is, multiple war packages, you can decompress the war package and copy the folder to the webapps directory;
Unzip the command:

Unzip-oq web. war-d web
Copy to the/var/lib/tomcat7/webapps directory and restart Tomcat.

Supplement: tomcat7.0 port 80 for windows Deployment

 

1: enter netstat-ano in the command line to obtain the PID corresponding to the port number.

Pid to display

 

 

The port display has been changed, so no pid is displayed.

It is found that the process pid occupies port 80. 4. The process is system. I guess.

SQL Server Reporting Services (MSSQLSERVER) (from experience, this service generally occupies port 80), so as shown in the figure below, disable the service OK!

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.