Linux下tomcat离线安装
2022/9/17 5:16:19
本文主要是介绍Linux下tomcat离线安装,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
1.使用xshell把已下载的apache-tomcat-8.5.50.tar.gz传到服务器
2.解压包
[root@localhost ~]# tar -zxvf apache-tomcat-8.5.50.tar.gz -C /usr/local apache-tomcat-8.5.50/bin/catalina.sh apache-tomcat-8.5.50/bin/configtest.sh apache-tomcat-8.5.50/bin/daemon.sh apache-tomcat-8.5.50/bin/digest.sh apache-tomcat-8.5.50/bin/setclasspath.sh apache-tomcat-8.5.50/bin/shutdown.sh apache-tomcat-8.5.50/bin/startup.sh apache-tomcat-8.5.50/bin/tool-wrapper.sh apache-tomcat-8.5.50/bin/version.sh apache-tomcat-8.5.50/conf/ apache-tomcat-8.5.50/conf/catalina.policy apache-tomcat-8.5.50/conf/catalina.properties apache-tomcat-8.5.50/conf/context.xml |
或者是zip格式的用
[root@localhost~]# unzip apache-tomcat-8.5.50.zip -d /usr/local [root@localhost ~]# cd /usr/local [root@localhost local]# ls apache-tomcat-8.5.50 bin etc games include lib lib64 libexec sbin share src [root@localhost local]# cd apache-tomcat-8.5.50 [root@localhost local]# ls bin etc games include lib lib64 libexec sbin share src tomcat |
然后输入命令:mv /usr/local/apache-tomcat-8.5.50 /usr/local/tomcat重命名刚解压出的tomcat目录apache-tomcat-8.5.50的名称为 tomcat
[root@localhost local]#mv /usr/local/apache-tomcat-8.5.50 /usr/local/tomcat |
重命名刚解压出的tomcat目录
输入命令:cd /usr/local/tomcat 切换到/usr/local/tomcat目录下
[root@localhost local]#cd /usr/local/tomcat --进入重命名目录 [root@localhost tomcat]# ls --查看目录下的东西 bin conf lib LICENSE logs NOTICE RELEASE-NOTES RUNNING.txt temp web |
3.启动服务:
下面我们来启动tomcat服务,只要进入到tomcat下的bin目录下,找到sartup.sh就可以启动服务了,为了启动服务,我们来输入命令:./bin/startup.sh回车后,你会看到服务启动的状态信息
[root@localhost tomcat]# cd/usr/local/tomcat/bin |
进入bin目录下找到startup.sh
[root@localhost bin]# ls bootstrap.jar configtest.bat setclasspath.sh tomcat-native.tar.gz catalina.bat configtest.sh shutdown.bat tool-wrapper.bat catalina.sh daemon.sh shutdown.sh tool-wrapper.sh catalina-tasks.xml digest.bat startup.bat version.bat commons-daemon.jar digest.sh startup.sh version.sh commons-daemon-native.tar.gz setclasspath.bat tomcat-juli.jar [root@localhost bin]#pwd -----查看当前目录 /usr/local/tomcat/bin [root@localhost bin]#./startup.sh |
如果权限不够,
[root@localhost bin]#chmod +x *.sh |
再执行一遍./startup.sh
启动时看日志
[root@localhost bin]#tailf ../logs/catalina.out |
启动完毕
4.访问验证
打开浏览器,输入http://192.168.150.128:8080,回车,看到猫咪图即安装成功。
这篇关于Linux下tomcat离线安装的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-22[开源]10.3K+ Star!轻量强大的开源运维平台,超赞!
- 2024-11-21Flutter基础教程:新手入门指南
- 2024-11-21Flutter跨平台教程:新手入门详解
- 2024-11-21Flutter跨平台教程:新手入门与实践指南
- 2024-11-21Flutter列表组件教程:初学者指南
- 2024-11-21Flutter列表组件教程:新手入门指南
- 2024-11-21Flutter入门教程:初学者必看指南
- 2024-11-21Flutter入门教程:从零开始的Flutter开发指南
- 2024-11-21Flutter升级教程:新手必读的升级指南
- 2024-11-21Flutter升级教程:轻松掌握Flutter版本更新