温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

centos下如何安装tomcat

发布时间:2021-11-15 16:20:41 来源:亿速云 阅读:167 作者:小新 栏目:编程语言

这篇文章主要介绍centos下如何安装tomcat,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

1.下载tomcat
[admin@ticent app]$ wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.0.44/bin/apache-tomcat-8.0.44.tar.gz
--2017-06-04 13:06:33--  http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.0.44/bin/apache-tomcat-8.0.44.tar.gz
正在解析主机 mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.6.177, 2402:f000:1:416:101:6:6:178
正在连接 mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.6.177|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:9334254 (8.9M) [application/octet-stream]
正在保存至: “apache-tomcat-8.0.44.tar.gz”

100%[=============================================================================>] 9,334,254    430KB/s 用时 17s    

2017-06-04 13:06:49 (541 KB/s) - 已保存 “apache-tomcat-8.0.44.tar.gz” [9334254/9334254])
2.解压
[admin@ticent app]$ tar -zxf apache-tomcat-8.0.44.tar.gz
3.启动
[admin@ticent bin]$ ./startup.sh 
Using CATALINA_BASE:   /home/admin/app/apache-tomcat-8.0.44
Using CATALINA_HOME:   /home/admin/app/apache-tomcat-8.0.44
Using CATALINA_TMPDIR: /home/admin/app/apache-tomcat-8.0.44/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/jre
Using CLASSPATH:       /home/admin/app/apache-tomcat-8.0.44/bin/bootstrap.jar:/home/admin/app/apache-tomcat-8.0.44/bin/tomcat-juli.jar
Tomcat started.
4.验证是否启动
[admin@ticent bin]$ wget http://127.0.0.1:8080/
--2017-06-04 13:11:22--  http://127.0.0.1:8080/
正在连接 127.0.0.1:8080... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:未指定 [text/html]
正在保存至: “index.html”

5.清除CentOS中iptables自带防火墙默认规则
[root@ticent java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64]# iptables -F
6.从远程机器访问
http://192.168.128.128:8080/

以上是“centos下如何安装tomcat”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI