if [ -d /opt/soft/tomcat ];then mv /opt/soft/tomcat /opt/soft/tomcat_$(date +%Y%m%d-%H-%M-%S) fi cd /opt/soft/ wget http://10.4.16.2/pub/tomcat_java/tomcat-7.0.34.tar.gz tar zxvf tomcat-7.0.34.tar.gz yum -y install tomcat-native apr apr-devel rm -f tomcat-7.0.34.tar.gz rm -f /etc/rc3.d/*tomcatd wget -O /etc/rc.d/init.d/tomcat http://10.4.16.2/pub/tomcat_java/tomcat.init chown root:root /etc/rc.d/init.d/tomcat chmod 755 /etc/rc.d/init.d/tomcat chkconfig --add tomcat chkconfig --level 345 tomcat on |