apache tomcat

1、已经实现封装绿色包
2、实现tomcat服务开机自动运行
3、实现开机或注销后在次登陆,重新打开IE并跳转的对应链接。
4、设置IE的默认主页


封装过程
1、下载apache-tomcat-6.0.20.zip,解压
2、在tomcat目录中新建jdk目录
3、把jdk1.7.0_45拷贝到jdk目录
4、在tomcat的bin目录下startup.bat、shutdown.bat、service.bat 中的第一行添加
SET JAVA_HOME=C:\apache-tomcat-irad\jdk\jdk1.7.0_45
SET CATALINA_HOME=C:\apache-tomcat-irad
5、在最后:end前添加以下两行
sc config Tomcat6 start= auto -- 设置服务开机启动 Tomcat6为服务器名
sc start Tomcat6 -- 启动服务
:end
6、配置三个bat文件,init.bat、init-irad.bat、autoStartIE.bat
init.bat:用于把init-irad.bat、autoStartIE.bat拷贝到C:\WINDOWS\system32,然后进入该目录执行init-irad.bat
copy init-irad.bat C:\WINDOWS\system32
copy autoStartIE.bat C:\WINDOWS\system32
cd C:\WINDOWS\system32
init-irad.bat

init-irad.bat:用于建立tomcat服务,并设置开机自动启动,然后启动服务。并打开IE浏览器,跳转对应链接,同时建立自动启动IE的服务
-- 设置IE的默认主页
reg add "HKcu\Software\Microsoft\Internet Explorer\Main" /d http://localhost:8080/  /v "Start Page" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /d C:\WINDOWS\system32\autoStartIE.bat /v "autoStartIE" /f
start iexplore "http://localhost:8080/"
cd C:\apache-tomcat-7.0.57\bin
service.bat install

autoStartIE.bat:是用于添加到服务中自动启动执行的脚本,就是用来打开IE,跳转到对应连接,设置IE的默认打开链接
reg add "HKcu\Software\Microsoft\Internet Explorer\Main" /d http://localhost:8080/  /v "Start Page" /f
start iexplore "http://localhost:8080/"



安装过程
1、获取压缩包
2、拷贝到C盘,解压到当前目录
3、双击运行目录中的init.bat

猜你喜欢

转载自sqchenc102201.iteye.com/blog/2220133