cnetos6.4搭建tomcat7

  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




本文出自 “菜鸟玩运维” 博客,请务必保留此出处http://5323197.blog.51cto.com/5313197/1529716

cnetos6.4搭建tomcat7,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。