Ubuntu安装tomcat

发布日期:2018-02-25    浏览次数:554

1.从官网中下载apache-tomcat-**.tar.gz文件

2.在本地文件新建一个文件夹(tomcat),在文件夹中解压压缩包, 不需要使用root:

tar -zxvf /home/xcx/下载/apache-tomcat-8.5.11.tar.gz 

3.进入解压文件中使用命令,将tomcat中的文件全部设置添加读写权限:

chmod +xr -R *

4. 进入tomcat的conf文件夹下,找到tomcat-users.xml 配置文件,在里面添加用户信息

<role rolename="manager-gui"/>
<user username="admin" password="3.1415926" roles="manager-gui"/>

5.启用tomcat:

xcx@ubuntu-xcx:~/local/tomcat/apache-tomcat-8.5.11$ ./bin/startup.sh
Using CATALINA_BASE:   /home/xcx/local/tomcat/apache-tomcat-8.5.11
Using CATALINA_HOME:   /home/xcx/local/tomcat/apache-tomcat-8.5.11
Using CATALINA_TMPDIR: /home/xcx/local/tomcat/apache-tomcat-8.5.11/temp
Using JRE_HOME:        /usr/lib/jvm/java-8-oracle
Using CLASSPATH:       /home/xcx/local/tomcat/apache-tomcat-8.5.11/bin/bootstrap.jar:/home/xcx/local/tomcat/apache-tomcat-8.5.11/bin/tomcat-juli.jar
Tomcat started.

6. 关闭tomcat:

xcx@ubuntu-xcx:~/local/tomcat/apache-tomcat-8.5.11$ ./bin/shutdown.sh
Using CATALINA_BASE:   /home/xcx/local/tomcat/apache-tomcat-8.5.11
Using CATALINA_HOME:   /home/xcx/local/tomcat/apache-tomcat-8.5.11
Using CATALINA_TMPDIR: /home/xcx/local/tomcat/apache-tomcat-8.5.11/temp
Using JRE_HOME:        /usr/lib/jvm/java-8-oracle
Using CLASSPATH:       /home/xcx/local/tomcat/apache-tomcat-8.5.11/bin/bootstrap.jar:/home/xcx/local/tomcat/apache-tomcat-8.5.11/bin/tomcat-juli.jar

 

本文网址:https://www.wyxxw.cn/blog-detail-22-25-732.html

返回列表

非特殊说明,本文版权归原作者所有,转载请注明出处

提示:本站所有资源仅供学习与参考,请勿用于商业用途。图片来自互联网~如侵犯您的权益,请联系QQ:1067507709.

提示:转载请注明来自:https://www.cnblogs.com/yxdz/p/8434383.html 。 转载人:momo