共计 1589 个字符,预计需要花费 4 分钟才能阅读完成。
1. 检查 Java 版本信息
java -version
java version “1.7.0_65”
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
如果没有则安装:
yum -y install java-1.7.0-openjdk
2. 下载并解压缩 tomcat
# cd /tmp
# wget http://www.us.apache.org/dist/tomcat/tomcat-7/v7.0.54/bin/apache-tomcat-7.0.54.tar.gz
# tar xzf apache-tomcat-7.0.54.tar.gz
# mv apache-tomcat-7.0.54 /usr/local/tomcat7
3. 启动 tomcat
# cd /usr/local/tomcat7
# ./bin/startup.sh
[输出样例]
Using CATALINA_BASE: /usr/local/tomcat7
Using CATALINA_HOME: /usr/local/tomcat7
Using CATALINA_TMPDIR: /usr/local/tomcat7/temp
Using JRE_HOME: /opt/jdk1.8.0_05/jre
Using CLASSPATH: /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Tomcat started.
4. 访问 http://ip:8080
5. 设置用户账户
<role rolename=”admin-gui”/>
<role rolename=”admin-script”/>
<role rolename=”manager-gui”/>
<role rolename=”manager-script”/>
<role rolename=”manager-jmx”/>
<role rolename=”manager-status”/>
<user username=”tomcat” password=”tomcat” roles=”manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui”/>
6. 重启 tomcat 服务
# ./bin/shutdown.sh
# ./bin/startup.sh
在 Ubuntu 12.04 LTS 上通过 Tomcat 部署 Solr 4 http://www.linuxidc.com/Linux/2012-09/71158.htm
Ubuntu 下部署 Solr(4.4)到 Tomcat(7.0.53) http://www.linuxidc.com/Linux/2014-05/101443.htm
Linux 下 Apache 与多个 Tomcat 集群负载均衡 http://www.linuxidc.com/Linux/2012-01/51731.htm
Nginx Tomcat 集群负载均衡解决笔记 http://www.linuxidc.com/Linux/2013-07/86827.htm
实例详解 Tomcat 组件安装 +Nginx 反向代理 Tomcat+Apache 使用 mod_jk 和 mod_proxy 反向代理和负载均衡 http://www.linuxidc.com/Linux/2013-06/85290.htm
Apache+Tomcat 环境搭建(JK 部署过程)http://www.linuxidc.com/Linux/2012-11/74474.htm
Tomcat 的详细介绍 :请点这里
Tomcat 的下载地址 :请点这里