Tomcat is a well known and widely used java servlet container. These days I am planning a project, which needs a tomcat 6 in ubuntu server. I found that to make tomcat work in ubuntu is very easy, but you need have a little trick to change your server listening port from 8080 to 80. Here I give you the way that I make it work.
1. Install tomcat 6 in ubuntu
normally, you just need to type the following command to install it
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
2. Start tomcat
sudo /etc/init.d/tomcat6 start
Now, you can use your browser to navigate this address:
http://<your ip>:8080
And you will see the tomcat It works! page
Usually, HTTP server works with the port 80, but the default port for tomcat is 8080, that is why we need specify 8080 after your ip address. To change the default port from 8080 to 80, type the following command in the terminal:sudo vim /etc/tomcat6/server.xml
Find the line contains the following content:
<Connector port="8080" protocol=...
Change it to
<Connector port="80" protocol=...
Now restart your tomcat server, you will find the following error if you browse your tomcat log in /var/log/tomcat6/catalina_<your date>.log:
SEVERE: Error starting endpoint
java.net.BindException: Permission denied <null>:80
This is because you dont have the permission to use the port number lower than 1024 in ubuntu. To make it happen, open the /etc/default/tomcat6 file:
sudo vim /etc/default/tomcat6
Find the text:
# If you run Tomcat on port numbers that are all higher than 1023, then you # do not need authbind. It is used for binding Tomcat to lower port numbers. # NOTE: authbind works only with IPv4. Do not enable it when using IPv6. # (yes/no, default: no) #AUTHBIND=no
uncomment the last line and change it to
AUTHBIND=yes
Save it, and restart your tomcat
sudo /etc/init.d/tomcat6 start
Now you can access your server with the address:
http://<your ip>
相关推荐
Ubuntu虚拟机tomcat服务器...这篇文章讲解了如何在Ubuntu虚拟机上搭建tomcat服务器,设置数据库,解决常见问题,并实现虚拟机访问主机的服务器、主机访问虚拟机上的服务器、局域网的其他主机访问我虚拟机上的服务器。
确保你的服务器8080端口打开了 https://blog.csdn.net/WernerZeiss/article/details/80887763 远端OS是Ubuntu 18.04,服务器在日本 注释掉 5写一个html网页,重命名为index.html,在apache-tomcat-8.5.51/...
xe-ubuntu Image安装 docker pull parana/tomcat-xe-ubuntu在您的 .bash_profile 中定义此实用程序函数: docker-ip() { boot2docker ip 2> /dev/null }作为守护程序运行,打开并映射了1443、8080、22和1521端口,...
tomcat8.0在腾讯云ubuntu14.04上有bug。 问题原因: 随机数引起线程阻塞。 tomcat不断启动,关闭, 启动关闭。几次后会出现卡死状况。需很久才能加载完成 阿里云同样配置,同样系统,则很难出现卡
在阿里云买了一台Ubuntu16.04的ECS服务器,安装完Tomcat 9 和JDK 1.8之后,兴致勃勃的访问服务器的8080端口,发现竟然报错:org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp....
因此需要配置防火墙规则,避免非法访问和未经许可的探测。 操作系统:Ubuntu 16.04 LTS 数据库:Mysql 8.0.22 Web组件:Apache Tomcat/8.0.0-RC1 防火墙版本:iptables v1.6.0 实施目标:服务器本机及指定...
org.apache.catalina.core.AprLifecycleListener myeclipse tomcat 無法啟動 用這個文件
把java开发的war包后更新到linux服务器后,通过本资源的配置nginx+tomcat实现两台服务器负载均衡,并配置了https的访问方式,并同时支持ipv6网络的访问
要求TILT要求在Ubuntu或其他平台上安装aspell和libaspell-dev。 您还必须安装 。 对于本地使用,您将需要安装Web服务器。 如果使用Apache和mod-proxy,则应将以下行添加到proxy.conf中: ProxyPass / tilt / 重试= 0...
系统:Ubuntu 16.04 dev_desktop 1.Java安装并配置环境变量 (1)从Java官方网站下载最新版JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html 下载jdk压缩包 jdk-8u144-linux-x64.tar.gz ...
曾经在Linux系统下自己配置过LAMP的php环境,详见《Ubuntu下LAMP环境配置教程(linux)》(点击打开链接)与《Ubuntu下图形化LAMP环境配置教程(linux)》(点击打开链接),但由于各种原因,在Windows2003系统下如何...
1.首先通过第三方镜像库(c.163.com)拉取相应的信息比如centos,ubuntu,tomcat等作为基础镜像。 Docker pull xxxx 2.运行下载好的镜像。 Docker run -dt -p 宿主机端口:镜像端口 –name起一个名字 镜像id/镜像名字...
悬崖峭壁该存储库包含在虚拟机中轻松... 我已经在 Ubuntu 虚拟机中设置了它,在那里我可以最大程度地减少混乱和混乱,并将其端口转发到我的主机,以便我可以与它交谈。 此存储库包含在您的计算机上设置相同系统的说明。