#!/bin/bash
cd /root
tar -xzvf tomcat-new.tar.gz
mv tomcat/ /usr/local/tomcat

echo "CATALINA_HOME=/usr/local/tomcat" >> /etc/profile
echo "CATALINA_PID=\$CATALINA_HOME/catalina.pid" >> /etc/profile
echo "export CATALINA_HOME CATALINA_PID" >> /etc/profile

source /etc/profile

echo -e "\033[32m tomcat安装完毕!!! \033[0m"