install_tomcat7

yum install -y java-1.7.0-openjdk

tar zxf apache-tomcat-7.0.65.tar.gz -C /usr/local/

cd /usr/local/

ln -s apache-tomcat-7.0.65/ tomcat

vim /etc/profile.d/tomcat.sh

export CATALINA_HOME=/usr/local/tomcat

export PATH=$PATH:$CATALINA_HOME/bin

. /etc/profile.d/tomcat.sh

vim /etc/init.d/tomcat

#!/bin/sh

# Tomcat init script for Linux.

#

# chkconfig: 2345 96 14

# description: The Apache Tomcat servlet/JSP container.

JAVA_OPTS=‘-Xms64m -Xmx128m‘

JAVA_HOME=/usr

CATALINA_HOME=/usr/local/tomcat

export JAVA_HOME CATALINA_HOME

exec $CATALINA_HOME/bin/catalina.sh $*

chmod +x /etc/init.d/tomcat

chkconfig --add tomcat

service tomcat start

时间: 2024-12-07 02:05:27

install_tomcat7的相关文章

ansible-playbook之include结合tags的使用

此playbook的作用:通过指定标签(tags),来说明是安装tomcat7还是tomcat8 main.yml: --- - include: install_tomcat7.yml   tags: tomcat7 - include: install_tomcat8.yml   tags: tomcat8 install_tomcat7.yml: --- - name: "复制文件到远程主机"   copy:     src={{ item.src }}     dest={{