系统相关
首页 > 系统相关> > Linux下tomcat离线安装

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,回车,看到猫咪图即安装成功。

标签:bin,8.5,tomcat,离线,50,sh,Linux,apache
来源: https://www.cnblogs.com/dabao150114/p/16700996.html