#!/bin/bash
#this is jdk+tomcat of server allocation
touch /home/aaaaa
jk="/home/aaaaa"
echo "#!/bin/bash
service vsftpd stop
" >$jk
chmod a+x $jk
cd /home
./aaaaa
rm -rf /home/aaaaa
echo "select 'N' is withdraws from ;
select 'Y' Will be able to carry out JDK + TOMCAT server allocation .
if select 'Y' You need to wait for several minutes ,
If you do not want to wait to invite note CTRL + C, the key withdraws from"
echo -n "select Y or N:"
read NAME
if [ "$NAME" == "N" ]
then
echo "select 'N' is exit"
else
find / -name jakarta-tomcat-5.0.28.tar.gz > /aaa
tar -zxvf `cat /aaa`
mkdir /opt/tomcat
find / -name jakarta-tomcat-5.0.28 > /la
echo "Torture fatigued jakarta-tomcat-5.0.28/ in course of waiting for one meeting to opt/tomcat/, please"
cp -r `cat /la`/* /opt/tomcat
find / -name j2sdk-1.4.2-03-linux-i586.bin > /aaa
chmod a+x `cat /aaa`
cp `cat /aaa` /
cd /
./j2sdk-1.4.2-03-linux-i586.bin
rm -rf /aaa
mkdir /usr/jdk
cp -r /j2sdk1.4.2/* /usr/jdk
rm -rf /j2sdk1.4.2 /j2sdk-1.4.2-03-linux-i586.bin
mv /etc/profile /etc/zuan
sed 's/export/& JAVA_HOME CLASS_PASS TOMCAT_HOME /' /etc/zuan>/etc/yirehe
sed '/local/a pathmunge /usr/jdk/bin' /etc/yirehe>/etc/ewang
sed '/LOGNAME=$USER/a\CLASS_PATH="/usr/jdk/lib/tools.jar" JAVA_HOME="/usr/jdk/" TOMCAT_HOME="/opt/tomcat/"' /etc/ewang>/etc/profile