5-JEESZ分布式框架-CentOs下安装Tomcat7(环境准备)

声明:因为JEESZ分布式框架运行环境是基于linux系统的,这边也总结了网上的一些资料,考虑到后期博客作为框架的原生教程,故这边做详细的安装记录,也希望能够帮助到各位朋友


1. 安装tomcat
通过ssh将apache-tomcat-7.0.61.tar.gz文件上传到/usr/local中执行以下操作:        

[root@cloud  /]cd /usr/local

[root@cloud  /]tar -zxvf apache-tomcat-7.0.61.tar.gz

[root@cloud  /]mv apache-tomcat-7.0.61 tomcat

2. 启动Tomcat
[root@cloud ~]# /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /home/java/jdk1.7/
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
出现以上信息说明已成功启动。

3. 防火墙开放8080端口
[root@cloud  /]vi + /etc/sysconfig/iptables

#增加以下代码
#Tomcat 8080
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

4. 重启防火墙
[root@cloud  /]service iptables restart

5. 检验Tomcat安装运行,通过你自己的服务器IP查看tomcat是否运行正常:
http://xxx.xxx.xxx.xxx:8080/
看到tomcat系统界面,说明安装成功!

6. 停止Tomcat

[root@cloud ~]# /usr/local/tomcat/bin/shutdown.sh
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /home/java/jdk1.7
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

7. 查看启动、停止日志

[root@cloud ~]# cd /usr/local/tomcat/logs/
[root@cloud logs]# ls
catalina.2016-02-13.log  catalina.out                 host-manager.2016-02-14.log  localhost.2016-02-14.log             localhost_access_log.2016-02-14.txt  manager.2016-02-14.log
catalina.2016-02-14.log  host-manager.2016-02-13.log  localhost.2016-02-13.log     localhost_access_log.2016-02-13.txt  manager.2016-02-13.log
[root@cloud logs]# tail -f catalina.out
Feb 14, 2016 1:25:33 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

 

声明:该框架面向企业,是大型互联网分布式企业架构,后期会介绍linux上部署高可用集群项目。

有愿意了解框架技术或者源码的朋友直接加Q(2137028325)一起学习

你可能感兴趣的:(5-JEESZ分布式框架-CentOs下安装Tomcat7(环境准备))