1. 安装环境
系统环境:centos7.0-x86_64(最小化安装)
软件环境:jdk1.8
软件下载目录:/usr/lcoal/software
软件安装目录:/usr/local/
2. 前置条件
需要JDK支持;(如果不知道如何安装JDK,请访问我写的 《【Linux运维入门】Linux环境安装配置JDK 》)
3.安装tomcat
① 进入软件包所在目录
[root@localhost local]# cd /usr/local/software/
[root@localhost software]# ls
apache-tomcat-8.0.30.tar.gz jdk-8u45-linux-x64.rpm redis-3.0.5.tar.gz
② 解压tomcat
[root@localhost software]# tar -zxvf apache-tomcat-8.0.30.tar.gz
apache-tomcat-8.0.30/bin/catalina.sh
apache-tomcat-8.0.30/bin/configtest.sh
apache-tomcat-8.0.30/bin/daemon.sh
apache-tomcat-8.0.30/bin/digest.sh
apache-tomcat-8.0.30/bin/setclasspath.sh
apache-tomcat-8.0.30/bin/shutdown.sh
apache-tomcat-8.0.30/bin/startup.sh
apache-tomcat-8.0.30/bin/tool-wrapper.sh
.
.
.
③ 移动并更名
[root@localhost software]# mv apache-tomcat-8.0.30 /usr/local/tomcat8
④ 启动tomcat
[root@localhost local]# cd /usr/local/tomcat8/bin/
[root@localhost bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat8
Using CATALINA_HOME: /usr/local/tomcat8
Using CATALINA_TMPDIR: /usr/local/tomcat8/temp
Using JRE_HOME: /usr/local/jdk1.8
Using CLASSPATH: /usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar
Tomcat started.
[root@localhost bin]#
⑤ 远程查看
PS:远程测试前,需要将Linux防火墙关闭。
CentOS7关闭防火墙命令:
systemctl stop firewalld (临时关闭防火墙)
systemctl disable firewalld (永久关闭防火墙)